3v4l.org

run code in 300+ PHP versions simultaneously
<?php // pre-requisite $a = 'a'; const ab = 'ab'; class ab { function __construct() { echo __METHOD__.PHP_EOL; } } // create classes new ab; new ab(); new (ab); new ($a.'b'); new (ab::class); // PHP 9, a wish! //new ()ab; ?>
Output for git.master, git.master_jit
ab::__construct ab::__construct ab::__construct ab::__construct ab::__construct

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:
45.52 ms | 850 KiB | 4 Q