3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tokens = token_get_all('<?php $a = 1 + 2; echo $a ?>'); foreach($tokens as $token) { echo "{$token[0]} ({$token[1]})"; }
Output for git.master, git.master_jit
394 (<?php )317 ($a)397 ( ) Warning: Uninitialized string offset 1 in /in/nQsBU on line 6 = ()397 ( )311 (1)397 ( ) Warning: Uninitialized string offset 1 in /in/nQsBU on line 6 + ()397 ( )311 (2) Warning: Uninitialized string offset 1 in /in/nQsBU on line 6 ; ()397 ( )328 (echo)397 ( )317 ($a)397 ( )396 (?>)
Output for rfc.property-hooks
396 (<?php )317 ($a)399 ( ) Warning: Uninitialized string offset 1 in /in/nQsBU on line 6 = ()399 ( )311 (1)399 ( ) Warning: Uninitialized string offset 1 in /in/nQsBU on line 6 + ()399 ( )311 (2) Warning: Uninitialized string offset 1 in /in/nQsBU on line 6 ; ()399 ( )329 (echo)399 ( )317 ($a)399 ( )398 (?>)

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:
47.75 ms | 401 KiB | 8 Q