3v4l.org

run code in 300+ PHP versions simultaneously
<?php class F { public int $bar = null; function foo ($bar = null) { $this->bar = $bar; } } $f = new F(); var_dump($f->bar); var_dump($f->foo());

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.0.50.0160.05620.27
7.0.40.0260.04720.30
7.0.30.0190.06320.32
7.0.20.0190.06220.29
7.0.10.0240.05620.28
7.0.00.0190.05920.31
5.6.200.0230.06321.13
5.6.190.0130.06121.14
5.6.180.0270.06121.10
5.6.170.0170.06021.00
5.6.160.0110.05921.10
5.6.150.0140.06021.10
5.6.140.0270.05621.02
5.6.130.0260.05421.02
5.6.120.0130.05821.14
5.6.110.0130.05721.03
5.6.100.0290.05721.05
5.6.90.0390.05921.10
5.6.80.0280.05820.47
5.6.70.0210.05420.52
5.6.60.0290.05220.43
5.6.50.0200.05320.53
5.6.40.0210.05620.44
5.6.30.0290.05420.44
5.6.20.0220.05220.40
5.6.10.0220.05620.36
5.6.00.0260.05320.41
5.5.340.0130.05720.85
5.5.330.0140.05620.85
5.5.320.0230.05220.79
5.5.310.0280.05420.85
5.5.300.0270.05820.80
5.5.290.0280.05720.86
5.5.280.0180.06020.91
5.5.270.0130.05820.88
5.5.260.0290.05620.83
5.5.250.0380.05620.66
5.5.240.0220.05720.24
5.5.230.0280.05720.28
5.5.220.0280.05720.20
5.5.210.0260.04920.24
5.5.200.0220.05120.25
5.5.190.0230.05320.21
5.5.180.0220.05720.21
5.5.160.0180.05120.22
5.5.150.0170.05220.25
5.5.140.0190.05820.25
5.5.130.0180.05820.17
5.5.120.0270.04920.21
5.5.110.0170.06020.20
5.5.100.0190.05920.17
5.5.90.0180.05320.12
5.5.80.0180.05220.11
5.5.70.0140.05920.15
5.5.60.0160.05220.11
5.5.50.0190.05820.17
5.5.40.0110.06420.14
5.5.30.0190.05720.08
5.5.20.0210.05320.14
5.5.10.0230.05120.10
5.5.00.0210.04920.08

preferences:
139.76 ms | 1440 KiB | 7 Q