3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $x = 1; function getX() { return $this->x; } function __get($name) { return $this->$name; } } $a = A(); $t = time(); for ($n = 0; $n < 100000; $n++) { $a->getX(); } echo time - $t(); $t = time(); for ($n = 0; $n < 100000; $n++) { $a->x; } echo time - $t();

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.00516.58
7.3.00.0070.00516.66
7.2.130.0050.00916.81
7.2.120.0050.00716.83
7.2.110.0050.00816.59
7.2.100.0030.00916.68
7.2.90.0050.01116.85
7.2.80.0060.00916.72
7.2.70.0050.00816.81
7.2.60.0080.00416.77
7.2.50.0070.00916.76
7.2.40.0010.01016.69
7.2.30.0030.00816.82
7.2.20.0060.00816.78
7.2.10.0030.01016.84
7.2.00.0040.00817.37
7.1.250.0050.00615.56
7.1.200.0080.00415.65
7.1.100.0040.00817.83
7.1.70.0060.00616.83
7.1.60.0070.01719.12
7.1.50.0130.01016.76
7.1.00.0000.08022.51
7.0.200.0220.00816.55
7.0.100.0100.07019.84
7.0.90.0130.08719.88
7.0.80.0170.07719.84
7.0.70.0070.09319.89
7.0.60.0170.05019.97
7.0.50.0030.09320.18
7.0.40.0130.07020.00
7.0.30.0070.04719.91
7.0.20.0070.08320.04
7.0.10.0100.07719.90
7.0.00.0100.08320.05
5.6.280.0030.07321.13
5.6.250.0200.04020.59
5.6.240.0070.08320.59
5.6.230.0170.07020.55
5.6.220.0030.09020.45
5.6.210.0070.08320.61
5.6.200.0000.06020.89
5.6.190.0000.05321.00
5.6.180.0100.04321.00
5.6.170.0030.06721.01
5.6.160.0070.08321.13
5.6.150.0030.05020.97
5.6.140.0070.08021.12
5.6.130.0070.05020.90
5.6.120.0100.08321.00
5.6.110.0000.05320.88
5.6.100.0170.07721.05
5.6.90.0100.08321.07
5.6.80.0070.07720.42
5.6.70.0030.06320.44
5.6.60.0200.05320.43
5.6.50.0030.06020.45
5.6.40.0070.08020.27
5.6.30.0130.07320.32
5.6.20.0070.08320.42
5.6.10.0130.06720.22
5.6.00.0130.07020.41
5.5.380.0130.07020.53
5.5.370.0070.08020.35
5.5.360.0000.07320.49
5.5.350.0030.08720.35
5.5.340.0170.03720.75
5.5.330.0100.08320.82
5.5.320.0100.04020.88
5.5.310.0030.05020.68
5.5.300.0030.05020.85
5.5.290.0130.07720.71
5.5.280.0100.06320.82
5.5.270.0130.04720.59
5.5.260.0070.06720.75
5.5.250.0130.08320.56
5.5.240.0170.07020.26
5.5.230.0170.07319.94
5.5.220.0070.05320.22
5.5.210.0070.07020.07
5.5.200.0130.08019.94
5.5.190.0170.07020.14
5.5.180.0030.08320.22
5.5.160.0270.06720.23
5.5.150.0070.07720.06
5.5.140.0070.04720.20
5.5.130.0030.05320.10
5.5.120.0130.07320.10
5.5.110.0070.04720.21
5.5.100.0030.07020.05
5.5.90.0070.06720.05
5.5.80.0100.07020.00
5.5.70.0100.07720.10
5.5.60.0130.06720.10
5.5.50.0030.08720.09
5.5.40.0130.03319.95
5.5.30.0070.07319.88
5.5.20.0130.06719.91
5.5.10.0070.04320.00
5.5.00.0070.07319.92
5.4.450.0030.04719.41
5.4.440.0070.07719.22
5.4.430.0030.04019.36
5.4.420.0100.07319.17
5.4.410.0200.07719.09
5.4.400.0030.08018.90
5.4.390.0100.07319.12
5.4.380.0070.07019.12
5.4.370.0130.06718.95
5.4.360.0130.06319.03
5.4.350.0100.05318.88
5.4.340.0030.08019.21
5.4.320.0070.07019.04
5.4.310.0030.08018.95
5.4.300.0100.06319.03
5.4.290.0030.04319.21
5.4.280.0030.08019.13
5.4.270.0100.07719.09
5.4.260.0070.04018.90
5.4.250.0130.07319.12
5.4.240.0030.08019.12
5.4.230.0070.06019.20
5.4.220.0130.06018.89
5.4.210.0130.07318.94
5.4.200.0100.05719.03
5.4.190.0100.07319.12
5.4.180.0200.06718.86
5.4.170.0100.06318.88
5.4.160.0030.06019.14
5.4.150.0170.07019.00
5.4.140.0030.07316.32
5.4.130.0100.05716.36
5.4.120.0070.04316.34
5.4.110.0070.05016.44
5.4.100.0130.07016.35
5.4.90.0100.07316.33
5.4.80.0070.07316.41
5.4.70.0100.07016.26
5.4.60.0070.06716.33
5.4.50.0070.05716.36
5.4.40.0070.07716.37
5.4.30.0100.04016.41
5.4.20.0100.04316.45
5.4.10.0000.06016.35
5.4.00.0100.07015.81
5.3.290.0130.07014.64
5.3.280.0070.08014.62
5.3.270.0100.07314.60
5.3.260.0070.07714.70
5.3.250.0070.06714.59
5.3.240.0070.08014.60
5.3.230.0030.06314.57
5.3.220.0100.06714.50
5.3.210.0030.06714.59
5.3.200.0100.06714.59
5.3.190.0100.07714.57
5.3.180.0030.06714.53
5.3.170.0070.07014.67
5.3.160.0130.06314.68
5.3.150.0100.07714.59
5.3.140.0030.08714.57
5.3.130.0070.04314.57
5.3.120.0130.07014.68
5.3.110.0170.07014.50
5.3.100.0070.08014.13
5.3.90.0170.04714.11
5.3.80.0070.05314.04
5.3.70.0030.07314.02
5.3.60.0170.05314.04
5.3.50.0100.07713.84
5.3.40.0170.07014.04
5.3.30.0000.05313.90
5.3.20.0170.06013.79
5.3.10.0000.07713.54
5.3.00.0070.07313.69
5.2.170.0030.06311.18
5.2.160.0070.06311.21
5.2.150.0030.06311.24
5.2.140.0070.06011.21
5.2.130.0070.04011.23
5.2.120.0070.06011.02
5.2.110.0030.06311.01
5.2.100.0070.05711.11
5.2.90.0030.04710.96
5.2.80.0030.03710.98
5.2.70.0000.05711.03
5.2.60.0070.06011.05
5.2.50.0100.05011.04
5.2.40.0130.05311.09
5.2.30.0000.04711.08
5.2.20.0030.06011.08
5.2.10.0100.05310.97
5.2.00.0070.05710.88
5.1.60.0030.02710.88
5.1.50.0000.03010.88
5.1.40.0000.03310.88
5.1.30.0070.05310.88
5.1.20.0030.05310.88
5.1.10.0100.02310.88
5.1.00.0030.05710.88
5.0.50.0000.04710.88
5.0.40.0030.04310.88
5.0.30.0000.05010.88
5.0.20.0000.04710.88
5.0.10.0000.04710.88
5.0.00.0000.06310.88
4.4.90.0000.02710.88
4.4.80.0030.02310.88
4.4.70.0030.03310.88
4.4.60.0030.02710.88
4.4.50.0070.02710.88
4.4.40.0070.05310.88
4.4.30.0030.02010.88
4.4.20.0070.04310.88
4.4.10.0000.02010.88
4.4.00.0000.05710.88
4.3.110.0000.02710.88
4.3.100.0030.03310.88
4.3.90.0030.03310.88
4.3.80.0030.05010.88
4.3.70.0070.03010.88
4.3.60.0030.03010.88
4.3.50.0000.04010.88
4.3.40.0000.04310.88
4.3.30.0070.02310.88
4.3.20.0000.02310.88
4.3.10.0030.02710.88
4.3.00.0070.03010.88

preferences:
33.09 ms | 400 KiB | 5 Q