#29761 [Opn->Csd]: token_get_all()
| From: | derick@php.net | Date: | Thu, 03 Feb 2005 13:18:08 +0000 |
| Subject: | #29761 [Opn->Csd]: token_get_all() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-73380@lists.php.net to get a copy of this message | ||
ID: 29761
Updated by: derick@php.net
Reported By: steemann at globalpark dot de
-Status: Open
+Status: Closed
Bug Type: Scripting Engine problem
Operating System: Linux 2.4.22
PHP Version: 5.0.3
New Comment:
Considered closed then.
Previous Comments:
------------------------------------------------------------------------
[2005-02-03 14:10:30] steemann at globalpark dot de
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.
------------------------------------------------------------------------
[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.
------------------------------------------------------------------------
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