3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = <<<TXT <?php namespace AAA; require_once '/tmp/dev2/t4.php'; class AAA { } \$class = new AAA(); TXT; $tokens = token_get_all($text); foreach ($tokens as $token) { echo json_encode($token) . "\n"; }
Output for git.master, git.master_jit
[399,"<?php\n",1] [402,"\n",2] [378,"namespace",3] [402," ",3] [313,"AAA",3] ";" [402,"\n\n",3] [263,"require_once",5] [402," ",5] [320,"'\/tmp\/dev2\/t4.php'",5] ";" [402,"\n",5] [372,"class",6] [402," ",6] [313,"AAA",6] [402," ",6] "{" [402,"\n",6] "}" [402,"\n\n",7] [317,"$class",9] [402," ",9] "=" [402," ",9] [324,"new",9] [402," ",9] [313,"AAA",9] "(" ")" ";"
Output for rfc.property-hooks
[396,"<?php\n",1] [399,"\n",2] [376,"namespace",3] [399," ",3] [313,"AAA",3] ";" [399,"\n\n",3] [263,"require_once",5] [399," ",5] [320,"'\/tmp\/dev2\/t4.php'",5] ";" [399,"\n",5] [370,"class",6] [399," ",6] [313,"AAA",6] [399," ",6] "{" [399,"\n",6] "}" [399,"\n\n",7] [317,"$class",9] [399," ",9] "=" [399," ",9] [325,"new",9] [399," ",9] [313,"AAA",9] "(" ")" ";"

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:
61.46 ms | 407 KiB | 5 Q