3v4l.org

run code in 300+ PHP versions simultaneously
<?php $vars=array( '^hello', 123, false, 1.23, ); foreach($vars as $var) { echo $var, ' => ', ($var[0]=='^') ? substr($var,1) : 'false', PHP_EOL; }
Output for git.master, git.master_jit
^hello => hello 123 => Warning: Trying to access array offset on value of type int in /in/vIr4J on line 12 false => Warning: Trying to access array offset on value of type bool in /in/vIr4J on line 12 false 1.23 => Warning: Trying to access array offset on value of type float in /in/vIr4J on line 12 false
Output for rfc.property-hooks
^hello => hello 123 => Warning: Trying to access array offset on int in /in/vIr4J on line 12 false => Warning: Trying to access array offset on false in /in/vIr4J on line 12 false 1.23 => Warning: Trying to access array offset on float in /in/vIr4J on line 12 false

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