3v4l.org

run code in 300+ PHP versions simultaneously
<?php class FooNoMoreException extends Exception {} class Foo { protected $count = 500; public function step() { if (!$this->count) { throw new FooNoMoreException('No more steps to take.'); } $this->count--; } } $f = new Foo; try { while ($f->step()) {} } catch {} var_dump($f);

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)
5.4.210.0160.04312.39
5.4.200.0240.03912.39
5.4.190.0140.04512.39
5.4.180.0170.04212.39
5.4.170.0150.05012.40
5.4.160.0230.03912.39
5.4.150.0150.04712.39
5.4.140.0140.04612.08
5.4.130.0180.04412.06
5.4.120.0220.03912.03
5.4.110.0150.04912.02
5.4.100.0180.04512.03
5.4.90.0120.04612.02
5.4.80.0100.04812.02
5.4.70.0140.04612.02
5.4.60.0200.04012.02
5.4.50.0110.04912.02
5.4.40.0130.04412.00
5.4.30.0130.04812.00
5.4.20.0170.04312.00
5.4.10.0210.04012.00
5.4.00.0110.04411.50
5.3.270.0190.04912.72
5.3.260.0170.04912.72
5.3.250.0220.04412.72
5.3.240.0200.05612.72
5.3.230.0170.05212.71
5.3.220.0210.04712.68
5.3.210.0160.04512.68
5.3.200.0190.04512.68
5.3.190.0200.04412.68
5.3.180.0240.04012.68
5.3.170.0230.04012.67
5.3.160.0190.05012.68
5.3.150.0150.04612.67
5.3.140.0210.04612.66
5.3.130.0250.07512.66
5.3.120.0150.04712.66
5.3.110.0190.04812.66
5.3.100.0140.05212.12
5.3.90.0190.04212.09
5.3.80.0180.04912.07
5.3.70.0190.04712.08
5.3.60.0140.05112.06
5.3.50.0160.04912.01
5.3.40.0180.04612.01
5.3.30.0150.04311.98
5.3.20.0110.04711.76
5.3.10.0170.04411.71
5.3.00.0170.04211.70

preferences:
140.4 ms | 1394 KiB | 7 Q