Is Tokenizer Extension changed since PHP 5.2.6
| From: | Laurent Laville | Date: | Wed, 17 Dec 2008 17:30:26 +0000 |
| Subject: | Is Tokenizer Extension changed since PHP 5.2.6 | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-29517@lists.php.net to get a copy of this message | ||
I've today upgrade my windows version of PHP from 5.2.6 to 5.2.8.
While I play back the unit tests of PHP_CompatInfo, I've noticed a test failed while it was ok with PHP 5.2.6
1) testTokenizerWithEmptyFile(PHP_CompatInfo_TestSuite_Standard)
array key <integer:0>: array key <integer:0>: expected integer <311>
difference < 1>
got integer <310>
Is someone can confirm me that you got the same result on a unix like platform ?
A minimal script to run is :
<?php
require_once 'PHP/CompatInfo.php';
$info = new PHP_CompatInfo();
$input = 'C:\wamp\bin\php\php5.2.8\tests\PHP_CompatInfo\tests\parseFile\empty.php';
$is_string = false;
$debug = true;$r = $info->parser->_tokenize($input, $is_string, $debug); var_export($r); ?> empty.php is a real empty file (nothing inside). I got these results array ( 0 => array (
0 => 310,
1 => '
',
2 => 1,
3 => 'T_INLINE_HTML',
),
)
In PHP 5.2.6 I got 311 for T_INLINE_HTML token