3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result = PhpToken::tokenize('<?php echo 1;'); var_dump($result);
Output for git.master, git.master_jit
array(5) { [0]=> object(PhpToken)#1 (4) { ["id"]=> int(394) ["text"]=> string(6) "<?php " ["line"]=> int(1) ["pos"]=> int(0) } [1]=> object(PhpToken)#2 (4) { ["id"]=> int(328) ["text"]=> string(4) "echo" ["line"]=> int(1) ["pos"]=> int(6) } [2]=> object(PhpToken)#3 (4) { ["id"]=> int(397) ["text"]=> string(1) " " ["line"]=> int(1) ["pos"]=> int(10) } [3]=> object(PhpToken)#4 (4) { ["id"]=> int(311) ["text"]=> string(1) "1" ["line"]=> int(1) ["pos"]=> int(11) } [4]=> object(PhpToken)#5 (4) { ["id"]=> int(59) ["text"]=> string(1) ";" ["line"]=> int(1) ["pos"]=> int(12) } }
Output for rfc.property-hooks
array(5) { [0]=> object(PhpToken)#1 (4) { ["id"]=> int(396) ["text"]=> string(6) "<?php " ["line"]=> int(1) ["pos"]=> int(0) } [1]=> object(PhpToken)#2 (4) { ["id"]=> int(329) ["text"]=> string(4) "echo" ["line"]=> int(1) ["pos"]=> int(6) } [2]=> object(PhpToken)#3 (4) { ["id"]=> int(399) ["text"]=> string(1) " " ["line"]=> int(1) ["pos"]=> int(10) } [3]=> object(PhpToken)#4 (4) { ["id"]=> int(311) ["text"]=> string(1) "1" ["line"]=> int(1) ["pos"]=> int(11) } [4]=> object(PhpToken)#5 (4) { ["id"]=> int(59) ["text"]=> string(1) ";" ["line"]=> int(1) ["pos"]=> int(12) } }

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
29.06 ms | 409 KiB | 5 Q