Well, first off you haven't defined $passlen in that code - and undefined variables, rather than having the parser bitch at you like in JavaScript, are assumed to be null, or if it needs to be assigned an integer value, zero. So it's not passing the gauntlet because 0 < 3. That caused me some head scratching when I first looked at this.
With that bug aside, screaming, "It does damn you!" doesn't work (though I wish it did). To find the root of this issue, we must look at what the eregi function is doing when it's searching the character class. Searching,
eregi("[a-z0-9][0-9]{2,}") is actually looking for an alphanumeric character immediately followed by at least two numbers. Meaning, if the numbers are split up, that alphanumeric character isn't immediately followed by two numbers.
That's a really good question, and in retrospect, something that should have been covered. Oh well, perhaps I'll drive more confused readers to posting in the forums

What you can do to represent
any character is just a period. So if you were to search for
eregi("[0-9].[0-9]{2,}" your abc1d2 passes. But now there has to be something between the two numbers, filling the spot occupied by the period. To fix that, use a quantifier saying that the wildcard may be filled as many times as it needs to be - or maybe not at all! Meaning, search for
.{0,} (or
.*, same thing).
So the finished code is:
CODE
<?php
$passval1 = eregi("[0-9].*[0-9]", $pass); // Look for 2 numbers in $pass.*
$passval1 = (int)$passval1; // Change boolean to integer
$passval2 = eregi("^[^a-z]", $pass); // Look for something other than a letter at the beginning of $pass
$passval2 = (int)$passval2;
$passval3 = eregi("[^a-z0-9]", $pass); // Look for something other than a letter or a number.
$passval3 = (int)$passval3;
$passleng = strlen($pass);
if ($passval1 == 1 && $passval2 == 0 && $passval3 == 0 && $passleng >= 3 && $passleng <= 24)
{
echo "Your password was accepted by the system.<br />";
}
else
{
if ($passval3 == 1) // $passval3 was true; There was a symbol other than a letter or number.
{
echo "Password invalid. Your password may only consist of letters and numbers.<br />";
}
if ($passval2 == 1) // $passval2 was true; There was something other than a letter as the first letter.
{
echo "Password invalid. Your password must begin with a letter.<br />";
}
if ($passval1 == 0) // $passval1 was false; It didn't find two numbers.*
{
echo "Password invalid. Your password must contain at least two numbers.<br />";
}
}
?>