Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_execute.c zend_execute.h
| From: | Sterling Hughes | Date: | Mon, 19 Jan 2004 17:08:49 +0000 |
| Subject: | Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_execute.c zend_execute.h | ||
| References: | 1 | Groups: | php.zend-engine.cvs |
| Request: | Send a blank email to php-zend-engine-cvs+get-2239@lists.php.net to get a copy of this message | ||
> andi Mon Jan 19 07:22:02 2004 EDT
>
> Modified files:
> /ZendEngine2 zend_execute.c zend_execute.h
> Log:
> - Hopefully fix bug #26696.
> - Please let me know if hell-breaks loose
>
Hell breaks loose.
Take the following example (ripped from bug report #26696):
<?php
//$str = Array('a', 's', 'd', 'd', '/',
'?');
$str = 'asdd/?';
$len = strlen($str);
for ($i = 0; $i < $len; $i++) {
switch ($str[$i]) {
case '?':
echo '?';
break;
}
}
?>
This doesn't properly report '?'
Change the example so that '?' is at the beginning of the string, and it reports
it everytime, change the example so that '?' is the second letter of the string,
it never reports it. The iteration over the string works fine, as I can print out
every character with print $str[$i] . "\n";
-Sterling