<?php
$code = <<<'EOT'
if(TRUE)
echo "test";
if(TRUE){
echo "test2";
}
EOT;
print_r(token_get_all($code));
- Output for 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.1, 8.3.3, 8.3.5 - 8.3.6
- Array
(
[0] => Array
(
[0] => 267
[1] =>
if(TRUE)
echo "test";
if(TRUE){
echo "test2";
}
[2] => 1
)
)
- Output for 8.3.0, 8.3.2, 8.3.4
- Array
(
[0] => Array
(
[0] => 318
[1] =>
if(TRUE)
echo "test";
if(TRUE){
echo "test2";
}
[2] => 1
)
)
- Output for 8.0.0 - 8.0.29
- Array
(
[0] => Array
(
[0] => 316
[1] =>
if(TRUE)
echo "test";
if(TRUE){
echo "test2";
}
[2] => 1
)
)
- Output for 7.4.0 - 7.4.33
- Array
(
[0] => Array
(
[0] => 313
[1] =>
if(TRUE)
echo "test";
if(TRUE){
echo "test2";
}
[2] => 1
)
)
- Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33
- Array
(
[0] => Array
(
[0] => 321
[1] =>
if(TRUE)
echo "test";
if(TRUE){
echo "test2";
}
[2] => 1
)
)
- Output for 5.6.8 - 5.6.28
- Array
(
[0] => Array
(
[0] => 314
[1] =>
if(TRUE)
echo "test";
if(TRUE){
echo "test2";
}
[2] => 1
)
)
- Output for 5.5.24 - 5.5.35
- Array
(
[0] => Array
(
[0] => 312
[1] =>
if(TRUE)
echo "test";
if(TRUE){
echo "test2";
}
[2] => 1
)
)
- Output for 5.4.8 - 5.4.45
- Array
(
[0] => Array
(
[0] => 311
[1] =>
if(TRUE)
echo "test";
if(TRUE){
echo "test2";
}
[2] => 1
)
)
preferences:
251.82 ms | 402 KiB | 263 Q