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) { $time = microtime(1); $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.0070.01416.57
7.3.00.0060.01216.50
7.2.130.0060.01517.09
7.2.120.0070.01416.89
7.2.110.0110.01116.53
7.2.100.0070.01416.93
7.2.90.0040.01116.94
7.2.80.0040.01416.99
7.2.70.0100.00916.87
7.2.60.0030.01416.86
7.2.50.0070.01116.73
7.2.40.0120.00317.01
7.2.30.0030.01816.85
7.2.20.0060.01616.65
7.2.10.0100.01016.62
7.2.00.0050.01018.20
7.1.250.0070.00715.58
7.1.70.0040.00816.84
7.1.60.0040.02219.17
7.1.50.0220.00317.10
7.0.200.0070.01116.93

preferences:
36.39 ms | 401 KiB | 5 Q