3v4l.org

run code in 500+ 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 rfc.property-hooks, git.master, git.master_jit
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:
76.38 ms | 2683 KiB | 4 Q