3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyException extends Exception { public function __construct($message, $code=0, Exception $previous = null) { if (version_compare(PHP_VERSION, '5.3.0') >= 0) { parent::__construct($message,$code,$previous); } else { parent::__construct($message,$code); } } public function __toString() { return __CLASS__. ":[{$this->code}]:{$this->message}\n"; } } throw new MyException("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)
8.3.60.0090.00916.61
8.3.50.0100.00422.05
8.3.40.0070.01418.92
8.3.30.0100.00319.22
8.3.20.0000.00720.21
8.3.10.0000.00823.48
8.3.00.0040.00419.19
8.2.180.0040.01416.63
8.2.170.0120.00322.96
8.2.160.0060.00920.25
8.2.150.0060.00324.18
8.2.140.0000.00924.66
8.2.130.0040.00426.16
8.2.120.0030.00520.89
8.2.110.0100.01020.38
8.2.100.0040.00719.63
8.2.90.0080.00017.97
8.2.80.0000.00819.39
8.2.70.0000.00817.93
8.2.60.0060.00317.80
8.2.50.0040.00418.10
8.2.40.0000.00720.58
8.2.30.0040.00418.31
8.2.20.0000.00817.74
8.2.10.0030.00618.18
8.2.00.0060.00317.73
8.1.280.0100.00625.92
8.1.270.0080.00023.96
8.1.260.0000.00826.35
8.1.250.0070.00028.09
8.1.240.0060.00322.03
8.1.230.0080.00422.25
8.1.220.0050.00217.74
8.1.210.0040.00418.77
8.1.200.0040.00417.35
8.1.190.0060.00317.13
8.1.180.0040.00418.10
8.1.170.0030.00618.59
8.1.160.0070.00022.10
8.1.150.0030.00618.64
8.1.140.0000.01017.38
8.1.130.0000.00717.82
8.1.120.0050.00217.38
8.1.110.0070.00017.38
8.1.100.0060.00317.44
8.1.90.0040.00417.32
8.1.80.0050.00317.37
8.1.70.0000.00817.36
8.1.60.0080.00317.54
8.1.50.0040.00417.44
8.1.40.0040.00417.43
8.1.30.0040.00417.57
8.1.20.0000.00717.63
8.1.10.0040.00417.50
8.1.00.0070.00017.41
8.0.300.0070.00319.80
8.0.290.0000.00816.75
8.0.280.0040.00418.52
8.0.270.0070.00017.15
8.0.260.0030.00317.27
8.0.250.0070.00016.93
8.0.240.0030.00316.88
8.0.230.0000.00616.95
8.0.220.0000.00816.96
8.0.210.0040.00416.96
8.0.200.0000.00617.04
8.0.190.0070.00017.00
8.0.180.0040.00416.89
8.0.170.0070.00016.94
8.0.160.0040.00416.91
8.0.150.0000.00716.81
8.0.140.0070.00016.90
8.0.130.0000.00513.42
8.0.120.0080.00016.93
8.0.110.0040.00416.94
8.0.100.0040.00416.95
8.0.90.0040.00416.85
8.0.80.0060.00916.96
8.0.70.0080.00017.07
8.0.60.0000.00717.01
8.0.50.0070.00016.86
8.0.30.0110.00817.04
8.0.20.0130.00617.40
8.0.10.0000.00716.95
8.0.00.0080.01316.76
7.4.330.0020.00215.00
7.4.320.0060.00016.41
7.4.300.0000.00616.50
7.4.290.0030.00316.47
7.4.280.0030.00716.43
7.4.270.0040.00416.50
7.4.260.0030.00316.54
7.4.250.0080.00016.42
7.4.240.0030.00316.55
7.4.230.0000.00716.38
7.4.220.0060.01216.42
7.4.210.0100.00316.56
7.4.200.0070.00016.65
7.4.190.0050.00216.68
7.4.160.0150.00716.63
7.4.150.0140.00317.40
7.4.140.0100.00817.86
7.4.130.0100.00916.64
7.4.120.0080.00816.58
7.4.110.0040.01416.63
7.4.100.0120.00616.39
7.4.90.0000.01616.65
7.4.80.0070.01419.39
7.4.70.0030.01316.36
7.4.60.0130.00716.50
7.4.50.0040.00416.32
7.4.40.0140.00716.34
7.4.30.0080.00816.60
7.4.00.0000.01315.15
7.3.330.0000.00513.39
7.3.320.0060.00013.14
7.3.310.0080.00016.50
7.3.300.0000.00716.29
7.3.290.0110.00316.35
7.3.280.0090.01016.31
7.3.270.0150.00917.40
7.3.260.0130.00416.46
7.3.250.0130.00716.49
7.3.240.0120.00616.53
7.3.230.0070.01016.39
7.3.210.0130.01016.43
7.3.200.0040.01419.39
7.3.190.0040.01816.50
7.3.180.0000.01516.41
7.3.170.0030.01216.66
7.3.160.0120.00416.55
7.3.120.0030.01015.05
7.2.330.0070.01016.62
7.2.320.0150.00316.79
7.2.310.0190.00416.68
7.2.300.0110.00916.46
7.2.290.0070.01116.54
7.2.00.0030.01519.35
7.1.100.0040.01118.00
7.1.70.0000.01217.15
7.1.60.0130.01019.70
7.1.50.0180.00716.89
7.1.00.0000.08022.42
7.0.200.0030.00316.78
7.0.140.0030.07322.09
7.0.60.0070.08719.96
7.0.50.0070.03717.95
7.0.40.0070.06320.04
7.0.30.0330.04020.31
7.0.20.0200.05020.10
7.0.10.0200.08720.06
7.0.00.0100.03720.09
5.6.280.0100.06320.87
5.6.210.0070.08020.75
5.6.200.0100.07318.15
5.6.190.0170.07720.64
5.6.180.0170.04720.52
5.6.170.0200.04020.50
5.6.160.0000.09020.52
5.6.150.0100.06018.15
5.6.140.0000.08718.23
5.6.130.0000.04318.14
5.6.120.0100.06021.16
5.6.110.0070.03721.02
5.6.100.0170.03321.03
5.6.90.0070.07721.04
5.6.80.0130.07020.48
5.6.70.4030.04720.37
5.5.350.0100.03020.49
5.5.340.0070.08317.96
5.5.330.0070.06720.42
5.5.320.3200.03020.36
5.5.310.0200.04020.23
5.5.300.0070.08318.08
5.5.290.0130.07318.04
5.5.280.0070.07720.80
5.5.270.0030.07020.73
5.5.260.0000.06720.65
5.5.250.0030.08320.61
5.5.240.0370.06320.34
5.4.450.0170.04019.55
5.4.440.0270.04719.30
5.4.430.0430.04019.63
5.4.420.0570.04319.54
5.4.410.0470.05019.36
5.4.400.0230.04719.09
5.4.390.0630.04019.31
5.4.380.0230.04718.78
5.4.370.0000.06318.65
5.4.360.0070.07318.46
5.4.350.0100.06018.74
5.4.340.0130.06018.78
5.4.320.0050.04012.50
5.4.310.0050.03912.50
5.4.300.0080.05012.50
5.4.290.0080.05212.50
5.4.280.0150.06412.40
5.4.270.0180.05912.40
5.4.260.0180.08712.40
5.4.250.0190.07612.40
5.4.240.0130.06412.39
5.4.230.0220.05612.39
5.4.220.0120.04812.39
5.4.210.0060.07312.39
5.4.200.0090.04712.39
5.4.190.0110.04612.39
5.4.180.0130.05512.39
5.4.170.0070.04912.40
5.4.160.0080.04712.39
5.4.150.0120.04912.39
5.4.140.0080.04912.07
5.4.130.0060.05612.06
5.4.120.0060.05612.02
5.4.110.0090.03712.02
5.4.100.0070.03812.02
5.4.90.0080.03912.01
5.4.80.0120.03912.02
5.4.70.0080.05712.02
5.4.60.0120.06112.01
5.4.50.0110.07412.01
5.4.40.0130.06912.00
5.4.30.0100.04512.00
5.4.20.0050.04012.00
5.4.10.0050.03912.00
5.4.00.0110.03711.49
5.3.290.0050.04012.80
5.3.280.0060.04412.70
5.3.270.0080.04012.73
5.3.260.0090.04112.71
5.3.250.0110.03712.72
5.3.240.0060.04812.72
5.3.230.0110.06612.71
5.3.220.0080.03612.68
5.3.210.0130.06612.68
5.3.200.0180.05812.68
5.3.190.0140.06412.68
5.3.180.0100.05312.68
5.3.170.0180.06112.67
5.3.160.0110.04912.68
5.3.150.0070.05812.67
5.3.140.0100.05612.66
5.3.130.0130.06712.66
5.3.120.0120.05712.65
5.3.110.0100.05912.66
5.3.100.0110.08312.13
5.3.90.0060.06212.11
5.3.80.0110.05712.10
5.3.70.0080.05012.10
5.3.60.0150.07212.08
5.3.50.0110.06912.03
5.3.40.0100.05012.04
5.3.30.0170.10111.99
5.3.20.0190.10511.77
5.3.10.0330.07311.74
5.3.00.0210.09211.72
5.2.170.0090.0469.23
5.2.160.0060.0429.23
5.2.150.0060.0479.23
5.2.140.0080.0459.22
5.2.130.0100.0609.19
5.2.120.0060.0449.19
5.2.110.0040.0459.19
5.2.100.0050.0459.19
5.2.90.0050.0439.19
5.2.80.0050.0429.18
5.2.70.0060.0419.18
5.2.60.0030.0439.13
5.2.50.0080.0399.11
5.2.40.0040.0399.08
5.2.30.0050.0429.06
5.2.20.0110.0469.05
5.2.10.0080.0468.95
5.2.00.0080.0368.82
5.1.60.0070.0338.11
5.1.50.0110.0648.10
5.1.40.0170.0588.09
5.1.30.0130.0638.43
5.1.20.0170.0668.45
5.1.10.0180.0598.18
5.1.00.0070.0598.18
5.0.50.0040.0256.65
5.0.40.0020.0326.51
5.0.30.0050.0416.32
5.0.20.0050.0436.29
5.0.10.0110.0626.27
5.0.00.0050.0386.26
4.4.90.0050.0194.78
4.4.80.0070.0244.76
4.4.70.0050.0204.75
4.4.60.0050.0224.75
4.4.50.0290.0964.77
4.4.40.0040.0334.71
4.4.30.0030.0204.76
4.4.20.0020.0244.85
4.4.10.0140.0634.85
4.4.00.0180.1074.76
4.3.110.0090.0364.67
4.3.100.0200.0324.67
4.3.90.0030.0354.64
4.3.80.0000.0824.58
4.3.70.0040.0224.63
4.3.60.0080.0374.63
4.3.50.0080.0374.63
4.3.40.0070.0434.54
4.3.30.0030.0233.30
4.3.20.0030.0203.28
4.3.10.0040.0193.23
4.3.00.0030.01716.92

preferences:
44.46 ms | 401 KiB | 5 Q