3v4l.org

run code in 300+ PHP versions simultaneously
<?php class class1 { protected $prop; public function __construct($prop) { $this->prop = $prop; } public function getThing($arg) { assert('$arg->isValid();'); $this->prop->method(); } } class class2 { public function method() { echo "here\n"; } } class class3 { public function isValid() { return false; } } $tmp = new class1(new class2()); $tmp->getThing(new class3());

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.1.110.0000.00717.29
8.1.100.0040.00417.38
8.1.90.0040.00417.30
8.1.80.0000.00717.37
8.1.70.0030.00317.38
8.1.60.0040.00417.48
8.1.50.0040.00417.51
8.1.40.0040.00417.56
8.1.30.0030.00517.52
8.1.20.0040.00417.70
8.1.10.0040.00417.43
8.1.00.0000.00817.47
8.0.240.0000.00716.79
8.0.230.0000.00816.97
8.0.220.0100.00016.80
8.0.210.0040.00416.87
8.0.200.0030.00316.97
8.0.190.0000.00816.85
8.0.180.0060.00316.82
8.0.170.0000.00716.99
8.0.160.0030.00516.68
8.0.150.0000.00716.87
8.0.140.0000.00716.86
8.0.130.0000.00613.27
8.0.120.0040.00416.92
8.0.110.0000.00716.86
8.0.100.0020.00516.96
8.0.90.0030.00616.70
8.0.80.0160.00316.94
8.0.70.0040.00416.83
8.0.60.0000.00716.85
8.0.50.0040.00416.76
8.0.30.0070.01017.31
8.0.20.0070.01117.40
8.0.10.0080.00017.08
8.0.00.0080.01116.96
7.4.300.0040.00416.42
7.4.290.0030.00316.50
7.4.280.0000.00816.53
7.4.270.0000.00816.47
7.4.260.0050.00316.58
7.4.250.0030.00616.48
7.4.240.0030.00416.50
7.4.230.0070.00016.54
7.4.220.0070.01716.57
7.4.210.0040.01116.54
7.4.200.0040.00416.63
7.4.160.0060.00916.52
7.4.150.0140.00317.40
7.4.140.0090.00817.86
7.4.130.0100.00816.47
7.4.120.0140.00316.48
7.4.110.0090.01816.61
7.4.100.0110.00816.49
7.4.90.0080.00916.39
7.4.80.0140.01019.39
7.4.70.0070.01016.78
7.4.60.0080.00816.45
7.4.50.0090.00016.66
7.4.40.0130.00316.56
7.4.30.0060.01616.81
7.4.00.0060.00814.69
7.3.330.0050.00013.39
7.3.320.0050.00013.13
7.3.310.0040.00416.30
7.3.300.0050.00316.16
7.3.290.0080.00616.31
7.3.280.0090.00816.30
7.3.270.0070.01017.40
7.3.260.0030.01416.31
7.3.250.0110.00816.31
7.3.240.0180.00416.52
7.3.230.0130.00516.39
7.3.210.0100.00716.48
7.3.200.0130.00919.39
7.3.190.0140.00616.36
7.3.180.0100.00716.53
7.3.170.0080.00816.27
7.3.160.0090.00916.38
7.2.330.0090.01516.62
7.2.320.0080.01216.52
7.2.310.0170.00016.52
7.2.300.0090.00616.32
7.2.290.0160.00616.41
7.2.60.0040.01116.62
7.2.00.0080.00819.64
7.1.200.0040.00715.72
7.1.100.0100.01017.96
7.1.70.0080.00016.95
7.1.60.0140.01019.59
7.1.50.0140.00316.51
7.1.00.0100.06322.40
7.0.200.0040.00416.78
7.0.100.0070.04319.84
7.0.90.0100.05019.91
7.0.80.0130.03719.80
7.0.70.0100.04319.93
7.0.60.0070.04319.85
7.0.50.0030.05020.24
7.0.40.0070.03320.03
7.0.30.0030.08019.99
7.0.20.0070.04020.05
7.0.10.0000.04019.97
7.0.00.0030.06719.99
5.6.280.0070.06020.93
5.6.250.0030.04320.77
5.6.240.0070.04020.71
5.6.230.0000.04320.45
5.6.220.0000.04320.57
5.6.210.0100.03020.48
5.6.200.0100.03721.00
5.6.190.0070.04321.13
5.6.180.0000.04321.00
5.6.170.0070.04021.13
5.6.160.0100.04320.98
5.6.150.0000.04320.91
5.6.140.0070.04021.03
5.6.130.0030.09320.90
5.6.120.0100.08020.99
5.6.110.0170.08021.04
5.6.100.0100.05721.05
5.6.90.0030.08720.95
5.6.80.0100.07020.29
5.6.70.0130.07020.33
5.6.60.0070.08020.25
5.6.50.0170.04320.42
5.6.40.0030.05720.39
5.6.30.0100.07720.36
5.6.20.0130.07720.26
5.6.10.0170.06720.32
5.6.00.0100.07020.21
5.5.380.0100.06020.36
5.5.370.0000.04320.31
5.5.360.0030.04720.30
5.5.350.0030.06020.38
5.5.340.0100.05320.86
5.5.330.0070.04020.87
5.5.320.0070.03720.60
5.5.310.0100.03720.84
5.5.300.0030.08320.73
5.5.290.0070.08320.89
5.5.280.0100.07320.84
5.5.270.0100.08720.84
5.5.260.0100.07020.59
5.5.250.0100.08020.66
5.5.240.0000.08720.21
5.5.230.0000.08720.26
5.5.220.0170.06020.21
5.5.210.0100.07320.07
5.5.200.0100.08020.22
5.5.190.0100.06320.08
5.5.180.0030.08020.08
5.5.160.0030.07320.20
5.5.150.0130.07320.14
5.5.140.0100.07020.19
5.5.130.0200.06320.11
5.5.120.0100.07720.20
5.5.110.0030.08020.17
5.5.100.0070.08320.02
5.5.90.0070.07720.05
5.5.80.0070.07720.12
5.5.70.0230.05719.96
5.5.60.0170.06720.11
5.5.50.0070.07320.05
5.5.40.0030.05320.06
5.5.30.0070.07720.06
5.5.20.0100.07320.01
5.5.10.0130.07319.99
5.5.00.0000.08720.08
5.4.450.0070.06019.54
5.4.440.0000.08319.42
5.4.430.0070.05019.55
5.4.420.0100.07319.20
5.4.410.0030.06319.39
5.4.400.0000.08319.13
5.4.390.0070.07019.09
5.4.380.0100.06719.03
5.4.370.0100.07318.87
5.4.360.0170.06718.88
5.4.350.0070.07719.21
5.4.340.0070.08319.23
5.4.320.0100.04019.23
5.4.310.0070.08319.21
5.4.300.0100.07018.84
5.4.290.0070.08019.18
5.4.280.0070.06319.16
5.4.270.0100.05019.03
5.4.260.0070.07719.16
5.4.250.0070.07319.20
5.4.240.0030.05319.13
5.4.230.0030.07319.11
5.4.220.0030.08319.12
5.4.210.0000.08319.03
5.4.200.0100.07318.94
5.4.190.0000.08719.04
5.4.180.0100.07719.08
5.4.170.0100.07319.22
5.4.160.0130.07319.19
5.4.150.0000.08019.07
5.4.140.0030.05316.26
5.4.130.0030.06716.43
5.4.120.0100.05016.25
5.4.110.0070.05316.56
5.4.100.0100.06716.55
5.4.90.0130.06016.61
5.4.80.0100.03316.41
5.4.70.0170.06016.54
5.4.60.0170.06016.43
5.4.50.0070.07316.29
5.4.40.0070.04316.41
5.4.30.0100.05716.32
5.4.20.0130.06716.45
5.4.10.0130.06316.49
5.4.00.0100.06715.81
5.3.290.0000.08014.81
5.3.280.0100.07314.66
5.3.270.0130.07314.58
5.3.260.0070.07714.61
5.3.250.0070.06714.61
5.3.240.0030.07714.68
5.3.230.0070.07714.66
5.3.220.0130.07014.68
5.3.210.0100.07714.55
5.3.200.0100.07314.68
5.3.190.0130.06714.58
5.3.180.0000.07314.52
5.3.170.0070.06714.55
5.3.160.0030.07714.58
5.3.150.0070.04314.60
5.3.140.0070.07314.58
5.3.130.0100.03314.61
5.3.120.0130.07014.50
5.3.110.0130.05314.58
5.3.100.0030.08314.15
5.3.90.0100.06313.96
5.3.80.0030.06314.00
5.3.70.0070.07314.05
5.3.60.0100.06314.00
5.3.50.0100.05713.86
5.3.40.0100.07713.97
5.3.30.0100.07313.82
5.3.20.0170.05713.63
5.3.10.0100.06313.58
5.3.00.0200.03713.55
5.2.170.0100.04311.20
5.2.160.0030.06011.01
5.2.150.0030.06011.14
5.2.140.0130.05011.22
5.2.130.0030.03311.13
5.2.120.0030.06011.25
5.2.110.0070.05711.00
5.2.100.0130.05011.10
5.2.90.0030.05011.13
5.2.80.0100.03311.06
5.2.70.0000.06710.97
5.2.60.0070.06011.11
5.2.50.0070.06011.04
5.2.40.0130.05010.89
5.2.30.0030.06711.00
5.2.20.0070.05710.97
5.2.10.0070.04310.98
5.2.00.0070.06010.78
5.1.60.0000.05710.07
5.1.50.0070.0479.84
5.1.40.0030.06010.07
5.1.30.0030.05310.35
5.1.20.0070.05710.48
5.1.10.0070.05710.13
5.1.00.0030.06010.15
5.0.50.0100.0408.68
5.0.40.0070.0438.41
5.0.30.0000.0708.32
5.0.20.0030.0338.21
5.0.10.0030.0438.26
5.0.00.0000.0478.16
4.4.90.0130.0237.55
4.4.80.0070.0237.55
4.4.70.0000.0377.55
4.4.60.0000.0177.55
4.4.50.0070.0307.55
4.4.40.0070.0477.55
4.4.30.0070.0337.55
4.4.20.0100.0307.55
4.4.10.0030.0377.55
4.4.00.0000.0477.55
4.3.110.0030.0277.55
4.3.100.0000.0377.55
4.3.90.0030.0277.55
4.3.80.0000.0537.55
4.3.70.0030.0337.55
4.3.60.0000.0307.55
4.3.50.0030.0337.55
4.3.40.0000.0507.55
4.3.30.0000.0377.55
4.3.20.0000.0377.55
4.3.10.0000.0277.55
4.3.00.0000.0277.55

preferences:
12.65 ms | 406 KiB | 5 Q