3v4l.org

run code in 300+ PHP versions simultaneously
<?php gc_enable(); class test { public $spl; public function __construct() { $this->spl = new SplPriorityQueue(); $this->spl->insert($this, 1); } } $i = 0; while($i < 50000) { $test = new test(); unset($test); gc_collect_cycles(); echo sprintf('%1$04d: ', $i) . number_format(memory_get_usage()) . " B\n"; $i++; }

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
7.3.10.0100.01016.81
7.3.00.0060.00616.64
7.2.130.0030.01616.72
7.2.120.0080.00816.59
7.2.110.0090.00917.13
7.2.100.0100.00316.91
7.2.90.0130.00917.05
7.2.80.0070.01116.98
7.2.70.0070.00717.13
7.2.60.0100.01316.80
7.2.50.0130.00617.06
7.2.40.0060.00916.86
7.2.30.0090.01216.90
7.2.20.0100.00716.93
7.2.10.0000.02116.89
7.2.00.0080.01018.21
7.1.250.0000.01415.88
7.1.70.0070.00317.11
7.1.60.0130.02019.32
7.1.50.0140.01416.92
7.0.200.0080.01216.96

preferences:
34.58 ms | 401 KiB | 5 Q