3v4l.org

run code in 500+ PHP versions simultaneously
<?php $foo = 42; class X { private $bar = $foo; public function getBar() { return $this->bar; } } $x = new X; echo $x->getBar();

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)
8.3.50.0050.00416.66
7.0.50.0200.05720.24
7.0.40.0400.04720.28
7.0.30.0230.06720.23
7.0.20.0270.06720.23
7.0.10.0370.05320.29
7.0.00.0330.05720.27
5.6.200.0430.04721.07
5.6.190.0170.05321.03
5.6.180.0300.06321.09
5.6.170.0200.06720.92
5.6.160.0200.05721.05
5.6.150.0200.04721.14
5.6.140.0270.06020.98
5.6.130.0200.06721.03
5.6.120.0200.06321.15
5.6.110.0230.06720.98
5.6.100.0370.05320.98
5.6.90.0230.06720.98
5.6.80.0170.05020.47
5.6.70.0170.05320.53
5.6.60.0070.06320.34
5.6.50.0200.05320.39
5.6.40.0130.05720.24
5.6.30.0130.05020.43
5.6.20.0130.06320.27
5.6.10.0170.05320.46
5.6.00.0300.04020.43
5.5.340.0270.05720.77
5.5.330.0300.05020.77
5.5.320.0370.05020.84
5.5.310.0230.06320.81
5.5.300.0330.05320.76
5.5.290.0330.05720.66
5.5.280.0170.05720.89
5.5.270.0270.05721.00
5.5.260.0070.07720.89
5.5.250.0300.05320.76
5.5.240.0170.05320.11
5.5.230.0170.05320.01
5.5.220.0200.05020.11
5.5.210.0030.06320.22
5.5.200.0070.06020.16
5.5.190.0170.05720.08
5.5.180.0270.04320.16
5.5.160.0200.05020.29
5.5.150.0270.04020.11
5.5.140.0130.05320.22
5.5.130.0130.05320.14
5.5.120.0170.05320.26
5.5.110.0200.06320.23
5.5.100.0230.07320.06
5.5.90.0270.06020.11
5.5.80.0200.06020.10
5.5.70.0170.06020.04
5.5.60.0200.05020.03
5.5.50.0230.04720.09
5.5.40.0230.04720.00
5.5.30.0230.06320.07
5.5.20.0170.05320.02
5.5.10.0170.05720.20
5.5.00.0170.06020.06

preferences:
41.94 ms | 739 KiB | 4 Q