3v4l.org

run code in 300+ PHP versions simultaneously
var_dump(gc_status()); <?php class Container { private array $services; public function __construct() { $this->services = [ fn() => doStuff($this), ]; } } $container = new Container; unset($container); var_dump(gc_status()); class Container2 { private array $services; public function __construct() { $this->services = [ fn(self $self) => doStuff($self), ]; } public function build() { foreach ($this->services as $service) { $service($this); } } } $container = new Container2; unset($container); var_dump(gc_status());
Output for git.master_jit
Warning: Module "Zend OPcache" is already loaded in Unknown on line 0 Warning: Zend OPcache: module registration failed! in Unknown on line 0 var_dump(gc_status()); array(12) { ["running"]=> bool(false) ["protected"]=> bool(false) ["full"]=> bool(false) ["runs"]=> int(0) ["collected"]=> int(0) ["threshold"]=> int(10001) ["buffer_size"]=> int(16384) ["roots"]=> int(1) ["application_time"]=> float(0.000290049) ["collector_time"]=> float(0) ["destructor_time"]=> float(0) ["free_time"]=> float(0) } array(12) { ["running"]=> bool(false) ["protected"]=> bool(false) ["full"]=> bool(false) ["runs"]=> int(0) ["collected"]=> int(0) ["threshold"]=> int(10001) ["buffer_size"]=> int(16384) ["roots"]=> int(2) ["application_time"]=> float(0.000342009) ["collector_time"]=> float(0) ["destructor_time"]=> float(0) ["free_time"]=> float(0) }
Output for git.master
Warning: Module "Zend OPcache" is already loaded in Unknown on line 0 Warning: Zend OPcache: module registration failed! in Unknown on line 0 var_dump(gc_status()); array(12) { ["running"]=> bool(false) ["protected"]=> bool(false) ["full"]=> bool(false) ["runs"]=> int(0) ["collected"]=> int(0) ["threshold"]=> int(10001) ["buffer_size"]=> int(16384) ["roots"]=> int(1) ["application_time"]=> float(0.000255389) ["collector_time"]=> float(0) ["destructor_time"]=> float(0) ["free_time"]=> float(0) } array(12) { ["running"]=> bool(false) ["protected"]=> bool(false) ["full"]=> bool(false) ["runs"]=> int(0) ["collected"]=> int(0) ["threshold"]=> int(10001) ["buffer_size"]=> int(16384) ["roots"]=> int(2) ["application_time"]=> float(0.000318699) ["collector_time"]=> float(0) ["destructor_time"]=> float(0) ["free_time"]=> float(0) }

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:
57.28 ms | 410 KiB | 5 Q