#29761 [Fbk->Opn]: token_get_all()
ID: 29761
User updated by: steemann at globalpark dot de
Reported By: steemann at globalpark dot de
-Status: Feedback
+Status: Open
Bug Type: Scripting Engine problem
Operating System: Linux 2.4.22
-PHP Version: 4.3.8
+PHP Version: 5.0.3
New Comment:
Can not test this with PHP 4.3.8 any more because I moved
to PHP 5.
With PHP 5.0.3 everything is fine (token_get_all returns
the same result for every try). The problem seems fixed
there.
Previous Comments:
------------------------------------------------------------------------
[2005-02-03 04:51:17] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
------------------------------------------------------------------------
[2005-01-13 17:05:43] randy at rcs-comp dot com
This might help...
PHP 5.0.2, Apache 2.0.52
Test code:
----------------------------
<?php
echo '<pre>';
print_r( token_get_all('<?php $a=$b;'));
echo '</pre>';
?>
Expected result (I think):
----------------------------
Array
(
[0] => Array
(
[0] => 365
[1] => <?php
)
[1] => Array
(
[0] => 308
[1] => $a
)
[2] => =
[3] => Array
(
[0] => 308
[1] => $b
)
[4] => ;
)
Result:
------------------------
Array
(
[0] => <
[1] => ?
[2] => Array
(
[0] => 307
[1] => php
)
[3] => Array
(
[0] => 369
[1] =>
)
[4] => Array
(
[0] => 309
[1] => $a
)
[5] => =
[6] => Array
(
[0] => 309
[1] => $b
)
[7] => ;
)
Result after restarting Apache:
---------------------------------
Array
(
[0] => Array
(
[0] => 366
[1] => Array
(
[0] => 309
[1] => $a
)
[2] => =
[3] => Array
(
[0] => 309
[1] => $b
)
[4] => ;
)
Hope it helps...
------------------------------------------------------------------------
[2004-12-02 17:31:54] fpoeydomenge at free dot fr
Same problem with PHP 5.0.2, but I only get the version where :
T_OPEN_TAG: '<?php '
is replaced by :
<
?
T_STRING: 'php'
------------------------------------------------------------------------
[2004-10-19 21:58:52] bloudon at townnews dot com
Bug is reproducible only when tokenizer is loaded dynamically.
If tokenizer is compiled into PHP then the bug does not occur.
Same behavior on Linux 2.4.24 and Linux 2.6.8.1.
------------------------------------------------------------------------
[2004-10-04 11:11:22] guth at fiifo dot u-psud dot fr
Same problem with PHP 5.0.*, with any PHP script.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/29761
--
Edit this bug report at http://bugs.php.net/?id=29761&edit=1
Thread (8 messages)