PHP 4.0 Bug #10154: Function ereg array results
| From: | crash at musichall dot cz | Date: | Wed, 04 Apr 2001 10:44:26 +0000 |
| Subject: | PHP 4.0 Bug #10154: Function ereg array results | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-50824@lists.php.net to get a copy of this message | ||
From: crash@musichall.cz
Operating system: Linux/NT
PHP version: 4.0.4pl1
PHP Bug Type: *Regular Expressions
Bug description: Function ereg array results
I'm not sure, if it's really an error or "feature" :). I would like to get
$regs[10] value, but the output is always empty.
<script language="php">
$string = "1234567890";
ereg( "^(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)", $string, $regs);
echo "Whole string: " . $regs[ 0 ] . "<br>";
for ( $i = 1; $i <= 10; $i++ )
{
echo "<br>" . $i . " -> " . $regs[$i];
}
</script>
--
Edit Bug report at: http://bugs.php.net/?id=10154&edit=1