3v4l.org

run code in 500+ PHP versions simultaneously
<?php class x { function __construct($i = 0) { echo __METHOD__.PHP_EOL;} function __invoke() { echo __METHOD__.PHP_EOL;} } $x = new x; $y = new $x()(); // identical to //$y = (new $x(0)) () var_dump($y); // NULL ?>
Output for git.master_jit, git.master
x::__construct x::__construct x::__invoke NULL

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:
42.88 ms | 683 KiB | 3 Q