3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myVariable1 = '2345'; $myVariable2 = 4433; $myVariable3 = 'test'; $myVariable4 = '1345.33'; function makeInteger($val){ return is_numeric($val) ? (int)$val : null; } for($i=1;$i<=4;$i++){ echo makeInteger(${"myVariable".$i}).PHP_EOL; }
Output for git.master, git.master_jit, rfc.property-hooks
2345 4433 1345

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:
127.95 ms | 405 KiB | 5 Q