Re: cvs: ZendEngine2(PHP_5_3) / Zend.m4 zend.c zend_compile.c zend_globals.h zend_highlight.c zend_language_scanner.c zend_language_scanner.h zend_language_scanner.l zend_language_scanner_defs.h zend_multibyte.h

Derick Rethans <[email protected]>
Newsgroups gmane.comp.php.cvs.zend,gmane.comp.php.devel
Message-ID <[email protected]>
On Sun, 29 Jun 2008, Rui Hirokawa wrote:

> hirokawa		Sun Jun 29 08:21:36 2008 UTC
> 
>   Modified files:              (Branch: PHP_5_3)
>     /ZendEngine2	Zend.m4 zend.c zend_compile.c zend_globals.h 
>                 	zend_highlight.c zend_language_scanner.c 
>                 	zend_language_scanner.h zend_language_scanner.l 
>                 	zend_language_scanner_defs.h zend_multibyte.h 
>   Log:
>   implemented again zend-multibyte for PHP 5.3

I found a bug with this, run the attached script with both multi-byte on 
and off, and you'll see it.

regards,
Derick

-- 
Zend Engine CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
z.php (text/plain, 656 B)
<pre>

<?php



echo "<h3>Testing all bytes 0 to 255</h3>";



$str = "<?php\n";

for ($i = 0; $i < 256; $i++ )

{

  $str = $str . "\$a[$i]='" . str_replace(array("\\", "'"),array("\\\\", "\\'"),chr($i)) . "';\n";

}

$str .= "// THIS SHOULD NOT SHOW!!!";

file_put_contents('zz.php', $str);



include('zz.php');



var_dump($a);



echo "<hr><h3>Testing BOM</h3>";



$str = "<?php\n";



$str = $str . "\$b[]='" . chr(255) . chr(254) . "';\n";

$str = $str . "\$b[]='" . chr(254) . chr(255) . "';\n";

$str .= "// THIS SHOULD NOT SHOW!!!";

file_put_contents('zzz.php', $str);



include('zzz.php');



var_dump($b);

?>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.