3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Hack declaration function _expr($v) { return $v; } $_expr = '_expr'; // Our playground define('qwe', 'asd'); define('zxc', 5); $a=3; $b=4; function c($a, $b) { return $a+$b; } // Usage echo "pre {$_expr(1+2)} post\n"; // outputs 'pre 3 post' echo "pre {$_expr(qwe)} post\n"; // outputs 'pre asd post' echo "pre {$_expr(c($a, $b)+zxc*2)} post\n"; // outputs 'pre 17 post' // General syntax is {$_expr(...)}
Output for git.master_jit, git.master, rfc.property-hooks
pre 3 post pre asd post pre 17 post

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