3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test{ public function test($param){ if(10 == $param){ throw new Exception('The api key must be a string and not empty'); } } } try {$test = new Test(); for($i=0;$i<10;$i++){ $test->test($i); } } catch (Exception $e) { die($e->getMessage()); }

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.60.0100.00718.30
8.3.50.0100.01021.20
8.3.40.0150.00318.63
8.3.30.0100.00718.96
8.3.20.0040.00420.52
8.3.10.0050.00322.14
8.3.00.0080.00022.52
8.2.180.0140.00016.36
8.2.170.0040.01122.96
8.2.160.0160.00019.07
8.2.150.0040.00424.18
8.2.140.0000.00924.66
8.2.130.0040.01526.16
8.2.120.0040.00419.23
8.2.110.0030.00722.29
8.2.100.0120.00019.52
8.2.90.0070.00019.09
8.2.80.0000.00817.97
8.2.70.0030.00717.50
8.2.60.0040.00417.68
8.2.50.0000.00818.07
8.2.40.0050.00319.88
8.2.30.0040.00417.94
8.2.20.0000.00817.49
8.2.10.0000.00817.69
8.2.00.0040.00417.76
8.1.280.0070.01025.92
8.1.270.0040.00422.19
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0090.00023.86
8.1.230.0060.00619.15
8.1.220.0030.00617.74
8.1.210.0050.00318.77
8.1.200.0040.00817.10
8.1.190.0040.00417.16
8.1.180.0050.00318.71
8.1.170.0040.00418.52
8.1.160.0040.00422.03
8.1.150.0040.00418.57
8.1.140.0000.00717.46
8.1.130.0030.00317.84
8.1.120.0060.00317.52
8.1.110.0040.00417.35
8.1.100.0050.00317.45
8.1.90.0000.00717.32
8.1.80.0000.00717.52
8.1.70.0040.00417.44
8.1.60.0050.00317.52
8.1.50.0070.00017.58
8.1.40.0030.00517.52
8.1.30.0080.00017.64
8.1.20.0040.00417.63
8.1.10.0050.00217.53
8.1.00.0050.00317.47
8.0.300.0000.00718.77
8.0.290.0040.00417.18
8.0.280.0030.00318.34
8.0.270.0070.00017.21
8.0.260.0000.00616.68
8.0.250.0000.00716.80
8.0.240.0040.00416.91
8.0.230.0070.00016.81
8.0.220.0000.00716.82
8.0.210.0030.00316.82
8.0.200.0030.00316.92
8.0.190.0000.00716.80
8.0.180.0000.00716.76
8.0.170.0000.00816.87
8.0.160.0040.00416.73
8.0.150.0050.00316.76
8.0.140.0000.00716.82
8.0.130.0060.00013.20
8.0.120.0040.00416.89
8.0.110.0000.00716.85
8.0.100.0040.00416.67
8.0.90.0000.00716.72
8.0.80.0150.00016.72
8.0.70.0070.00016.95
8.0.60.0070.00016.97
8.0.50.0060.00316.96
8.0.30.0160.00616.99
8.0.20.0110.00817.40
8.0.10.0000.00717.01
8.0.00.0050.01216.74
7.4.330.0000.00515.00
7.4.320.0030.00316.42
7.4.300.0050.00216.62
7.4.290.0050.00216.61
7.4.280.0070.00016.52
7.4.270.0050.00216.51
7.4.260.0000.00716.40
7.4.250.0040.00416.43
7.4.240.0000.00716.62
7.4.230.0050.00216.73
7.4.220.0060.01016.65
7.4.210.0050.01116.57
7.4.200.0040.00416.69
7.4.190.0000.00816.58
7.4.160.0170.00716.48
7.4.150.0030.01317.40
7.4.140.0130.00917.86
7.4.130.0110.00616.65
7.4.120.0100.00816.51
7.4.110.0060.01016.51
7.4.100.0060.01016.53
7.4.90.0100.00716.53
7.4.80.0220.00319.39
7.4.70.0120.00916.46
7.4.60.0060.00916.35
7.4.50.0000.00816.43
7.4.40.0060.00622.77
7.4.30.0110.00716.52
7.4.00.0030.01215.16
7.3.330.0050.00013.32
7.3.320.0020.00213.19
7.3.310.0000.00716.41
7.3.300.0000.00716.39
7.3.290.0060.00816.40
7.3.280.0100.00916.40
7.3.270.0160.00617.40
7.3.260.0100.00716.36
7.3.250.0070.01516.50
7.3.240.0060.01016.30
7.3.230.0210.00316.43
7.3.210.0070.01016.57
7.3.200.0100.01019.39
7.3.190.0090.01016.40
7.3.180.0120.00316.43
7.3.170.0040.01216.60
7.3.160.0120.00916.48
7.3.120.0030.01014.52
7.3.10.0150.00016.34
7.3.00.0000.01316.64
7.2.330.0070.01016.54
7.2.320.0110.01116.66
7.2.310.0100.00716.54
7.2.300.0140.00416.40
7.2.290.0090.00616.45
7.2.130.0040.00816.77
7.2.120.0090.00316.79
7.2.110.0070.00316.50
7.2.100.0040.00816.91
7.2.90.0070.01116.92
7.2.80.0040.00716.61
7.2.70.0030.00716.88
7.2.60.0040.01416.88
7.2.50.0000.01116.95
7.2.40.0070.00316.91
7.2.30.0090.00316.88
7.2.20.0000.01016.72
7.2.10.0040.00816.77
7.2.00.0060.00718.18
7.1.250.0060.00315.66
7.1.200.0070.00715.74
7.1.100.0070.01018.22
7.1.70.0030.00917.10
7.1.60.0110.01419.82
7.1.50.0100.01416.86
7.1.00.0070.05722.44
7.0.200.0050.00216.82
7.0.140.0100.07022.10
7.0.60.0070.07719.94
7.0.50.0030.08317.83
7.0.40.0100.04720.18
7.0.30.0270.08020.07
7.0.20.0330.07720.30
7.0.10.0370.07720.15
7.0.00.0130.08320.23
5.6.280.0030.07320.85
5.6.210.0030.06320.57
5.6.200.0100.08018.20
5.6.190.0130.08020.49
5.6.180.3670.04720.50
5.6.170.0330.03720.51
5.6.160.0030.04720.54
5.6.150.0100.08318.21
5.6.140.0100.07718.28
5.6.130.0100.07718.18
5.6.120.0100.08321.00
5.6.110.0000.04320.98
5.6.100.0130.03021.09
5.6.90.0030.08321.00
5.6.80.0100.04020.44
5.6.70.3930.05020.37
5.5.350.0230.07720.35
5.5.340.0000.08317.95
5.5.330.0130.08020.19
5.5.320.0130.04320.32
5.5.310.0300.07320.34
5.5.300.0000.08717.94
5.5.290.0070.08718.00
5.5.280.0100.08320.66
5.5.270.0000.06020.75
5.5.260.0070.08320.96
5.5.250.0000.09020.54
5.5.240.0100.07720.07
5.4.450.0870.04719.58
5.4.440.0630.06019.63
5.4.430.0770.05019.64
5.4.420.0530.06019.63
5.4.410.0000.06019.25
5.4.400.0270.06318.86
5.4.390.0330.05018.71
5.4.380.0200.06718.63
5.4.370.0200.04718.69
5.4.360.0170.05018.59
5.4.350.0100.06018.56
5.4.340.0070.06018.46
5.4.320.0080.04112.50
5.4.310.0100.04112.49
5.4.300.0060.04112.50
5.4.290.0030.04412.50
5.4.280.0080.03412.39
5.4.270.0050.04012.39
5.4.260.0230.04019.04
5.4.250.0170.04318.78
5.4.240.0030.05318.91
5.4.230.0170.05318.92
5.4.220.0100.05318.71
5.4.210.0130.07318.92
5.4.200.0030.05718.90
5.4.190.0100.05718.75
5.4.180.0100.05318.86
5.4.170.0100.05018.91
5.4.160.0070.05018.89
5.4.150.0130.04718.90
5.4.140.0130.07316.41
5.4.130.0070.06716.44
5.4.120.0170.05316.54
5.4.110.0070.05316.40
5.4.100.0030.06016.50
5.4.90.0100.04716.45
5.4.80.0100.05316.56
5.4.70.0130.04716.40
5.4.60.0100.07316.23
5.4.50.0130.04716.38
5.4.40.0100.05016.39
5.4.30.0130.04716.38
5.4.20.0100.05316.54
5.4.10.0170.04716.37
5.4.00.0230.04015.84
5.3.290.0050.03912.80
5.3.280.0070.05314.67
5.3.270.0170.04314.74
5.3.260.0170.04714.67
5.3.250.0030.05714.58
5.3.240.0100.05314.84
5.3.230.0100.05014.57
5.3.220.0000.05714.74
5.3.210.0130.07314.65
5.3.200.0100.07014.73
5.3.190.0070.05314.74
5.3.180.0100.05014.74
5.3.170.0170.06014.63
5.3.160.0070.05014.74
5.3.150.0070.05014.39
5.3.140.0100.04714.69
5.3.130.0070.05314.53
5.3.120.0200.06014.68
5.3.110.0170.05314.38
5.3.100.0270.04014.01
5.3.90.0070.05014.01
5.3.80.0030.06314.10
5.3.70.0070.07314.05
5.3.60.0000.05714.08
5.3.50.0100.04314.17
5.3.40.0070.05313.93
5.3.30.0070.07313.99
5.3.20.0070.05013.88
5.3.10.0100.05313.74
5.3.00.0170.04713.62
5.2.170.0070.04011.22
5.2.160.0000.04311.13
5.2.150.0030.04711.15
5.2.140.0000.04711.21
5.2.130.0070.04711.29
5.2.120.0030.04711.10
5.2.110.0030.04311.07
5.2.100.0030.04711.18
5.2.90.0070.04310.93
5.2.80.0070.04010.99
5.2.70.0030.04711.18
5.2.60.0070.04011.05
5.2.50.0000.05011.08
5.2.40.0070.05710.96
5.2.30.0070.03710.97
5.2.20.0070.03710.94
5.2.10.0030.04710.84
5.2.00.0000.04710.89
5.1.60.0070.03310.00
5.1.50.0000.0379.98
5.1.40.0070.03310.13
5.1.30.0100.03310.42
5.1.20.0070.04010.44
5.1.10.0100.03710.30
5.1.00.0000.04010.13
5.0.50.0070.0278.54
5.0.40.0030.0278.32
5.0.30.0070.0538.38
5.0.20.0100.0308.03
5.0.10.0030.0278.21
5.0.00.0070.0608.07
4.4.90.0000.0237.36
4.4.80.0030.0207.36
4.4.70.0000.0237.36
4.4.60.0000.0337.36
4.4.50.0000.0237.36
4.4.40.0030.0307.36
4.4.30.0070.0177.36
4.4.20.0030.0277.36
4.4.10.0030.0207.36
4.4.00.0030.0437.36
4.3.110.0100.0137.36
4.3.100.0030.0277.36
4.3.90.0000.0237.36
4.3.80.0100.0277.36
4.3.70.0000.0307.36
4.3.60.0000.0237.36
4.3.50.0030.0207.36
4.3.40.0030.0437.36
4.3.30.0000.0337.36
4.3.20.0000.0277.36
4.3.10.0030.0207.36
4.3.00.0130.0177.14

preferences:
33.57 ms | 401 KiB | 5 Q