3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyException extends Exception { public function __construct($message, $code=0) { if (version_compare(PHP_VERSION, '5.3.0') >= 0) { $previous = func_get_arg(2); 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.40.0120.00318.69
8.3.30.0070.00719.00
8.3.20.0040.00420.21
8.3.10.0000.00823.65
8.3.00.0080.00019.20
8.2.170.0070.00722.96
8.2.160.0130.00020.29
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00420.68
8.2.110.0120.00020.91
8.2.100.0060.01217.91
8.2.90.0040.00419.22
8.2.80.0000.00817.97
8.2.70.0030.00517.63
8.2.60.0040.00418.03
8.2.50.0060.00318.10
8.2.40.0090.00021.06
8.2.30.0000.00818.11
8.2.20.0030.00517.80
8.2.10.0000.00718.16
8.2.00.0060.00317.66
8.1.270.0060.00923.96
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0030.00623.84
8.1.230.0090.00317.82
8.1.220.0050.00317.74
8.1.210.0050.00318.77
8.1.200.0070.00317.22
8.1.190.0040.00417.36
8.1.180.0040.00418.10
8.1.170.0040.00418.46
8.1.160.0050.00221.93
8.1.150.0050.00218.46
8.1.140.0060.00317.41
8.1.130.0080.00017.83
8.1.120.0040.00417.48
8.1.110.0000.00817.29
8.1.100.0030.00617.45
8.1.90.0060.00317.45
8.1.80.0040.00417.24
8.1.70.0000.00717.34
8.1.60.0060.00317.54
8.1.50.0040.00417.36
8.1.40.0040.00417.37
8.1.30.0030.00517.55
8.1.20.0000.00717.59
8.1.10.0000.00717.57
8.1.00.0000.00817.40
8.0.300.0040.00418.77
8.0.290.0000.00916.75
8.0.280.0030.00318.40
8.0.270.0030.00317.28
8.0.260.0060.00017.25
8.0.250.0000.00816.99
8.0.240.0040.00417.07
8.0.230.0070.00016.99
8.0.220.0030.00316.95
8.0.210.0040.00417.01
8.0.200.0060.00016.91
8.0.190.0000.00716.93
8.0.180.0000.00716.97
8.0.170.0000.00716.96
8.0.160.0040.00416.89
8.0.150.0000.00717.03
8.0.140.0040.00416.86
8.0.130.0060.00013.37
8.0.120.0050.00316.92
8.0.110.0000.00816.82
8.0.100.0080.00016.94
8.0.90.0040.00417.08
8.0.80.0090.01316.88
8.0.70.0000.00816.91
8.0.60.0040.00416.95
8.0.50.0040.00416.93
8.0.30.0090.01017.08
8.0.20.0080.01217.40
8.0.10.0030.00516.84
8.0.00.0110.00916.67
7.4.330.0000.00415.00
7.4.320.0030.00316.42
7.4.300.0000.00616.62
7.4.290.0040.00416.62
7.4.280.0060.00316.48
7.4.270.0070.00016.62
7.4.260.0030.00316.59
7.4.250.0030.00516.49
7.4.240.0050.00216.62
7.4.230.0030.00316.41
7.4.220.0130.00616.66
7.4.210.0100.00316.45
7.4.200.0020.00516.40
7.4.190.0000.00816.33
7.4.160.0080.00816.52
7.4.150.0130.00417.40
7.4.140.0090.00917.86
7.4.130.0080.01416.54
7.4.120.0120.00516.60
7.4.110.0150.00316.59
7.4.100.0070.01016.53
7.4.90.0070.01116.58
7.4.80.0120.00919.39
7.4.70.0100.00616.65
7.4.60.0140.00316.54
7.4.50.0030.00616.71
7.4.40.0140.00616.59
7.4.30.0110.00516.55
7.4.10.0060.01215.04
7.4.00.0080.00715.00
7.3.330.0050.00013.33
7.3.320.0050.00013.33
7.3.310.0030.00316.43
7.3.300.0070.00016.38
7.3.290.0110.00416.30
7.3.280.0090.00916.39
7.3.270.0030.01417.40
7.3.260.0150.00316.62
7.3.250.0110.00816.60
7.3.240.0120.00616.51
7.3.230.0130.00316.39
7.3.210.0090.01316.50
7.3.200.0090.00919.39
7.3.190.0040.01816.55
7.3.180.0090.00716.43
7.3.170.0140.00316.49
7.3.160.0070.01116.37
7.3.130.0170.00015.08
7.3.120.0070.01214.85
7.3.110.0040.01414.62
7.3.100.0040.01115.00
7.3.90.0040.01514.52
7.3.80.0060.01314.72
7.3.70.0060.00914.78
7.3.60.0060.00614.95
7.3.50.0030.00914.88
7.3.40.0100.00314.90
7.3.30.0030.01014.79
7.3.20.0070.01016.50
7.3.10.0090.00516.41
7.3.00.0050.01016.58
7.2.330.0160.00316.72
7.2.320.0040.01416.61
7.2.310.0000.01816.63
7.2.300.0100.00716.41
7.2.290.0070.01116.64
7.2.260.0030.01314.86
7.2.250.0100.00714.98
7.2.240.0030.01214.75
7.2.230.0120.00615.07
7.2.220.0000.01515.29
7.2.210.0070.00315.11
7.2.200.0030.01015.10
7.2.190.0070.01114.77
7.2.180.0040.00815.11
7.2.170.0130.00615.07
7.2.160.0030.01015.02
7.2.150.0120.00316.71
7.2.140.0090.00616.80
7.2.130.0130.00616.82
7.2.120.0070.00916.63
7.2.110.0060.01016.52
7.2.100.0080.00516.77
7.2.90.0020.01516.70
7.2.80.0060.00916.70
7.2.70.0070.00816.75
7.2.60.0100.00616.73
7.2.50.0070.00916.59
7.2.40.0100.00516.69
7.2.30.0020.01116.78
7.2.20.0080.00816.93
7.2.10.0140.00616.75
7.2.00.0090.00717.62
7.1.330.0040.01115.88
7.1.320.0110.00415.64
7.1.310.0130.00315.64
7.1.300.0060.00715.68
7.1.290.0120.00015.58
7.1.280.0030.01615.66
7.1.270.0030.01015.53
7.1.260.0030.00715.72
7.1.250.0090.00715.57
7.1.240.0050.00315.33
7.1.230.0070.00415.78
7.1.220.0070.00715.73
7.1.210.0070.01015.82
7.1.200.0030.00815.65
7.1.190.0040.01215.73
7.1.180.0030.01015.86
7.1.170.0040.00715.86
7.1.160.0060.00915.43
7.1.150.0050.00515.71
7.1.140.0030.01315.82
7.1.130.0080.00615.89
7.1.120.0060.00615.55
7.1.110.0040.00415.81
7.1.100.0030.01116.92
7.1.90.0070.00715.79
7.1.80.0000.00915.60
7.1.70.0060.00616.50
7.1.60.0030.01517.68
7.1.50.0070.01016.19
7.1.40.0070.00715.45
7.1.30.0080.00815.62
7.1.20.0100.00715.74
7.1.10.0070.00415.78
7.1.00.0100.03819.11
7.0.330.0060.00615.40
7.0.320.0030.00715.37
7.0.310.0000.01315.35
7.0.300.0080.00315.37
7.0.290.0030.01015.23
7.0.280.0060.00615.27
7.0.270.0000.01115.20
7.0.260.0030.01015.36
7.0.250.0060.00615.23
7.0.240.0000.01615.50
7.0.230.0090.00615.28
7.0.220.0000.01215.44
7.0.210.0060.00615.40
7.0.200.0070.00715.89
7.0.190.0070.00715.53
7.0.180.0110.00315.30
7.0.170.0030.00915.17
7.0.160.0070.00715.55
7.0.150.0030.01015.38
7.0.140.0050.04018.67
7.0.130.0060.00915.51
7.0.120.0090.00615.23
7.0.110.0090.00315.46
7.0.100.0040.00715.38
7.0.90.0070.00715.31
7.0.80.0030.00615.63
7.0.70.0040.01115.57
7.0.60.0080.04118.62
7.0.50.0060.03216.76
7.0.40.0080.03016.89
7.0.30.0130.02616.68
7.0.20.0150.03916.81
7.0.10.0110.04316.85
7.0.00.0080.04316.66
5.6.400.0030.01014.54
5.6.390.0000.01314.51
5.6.380.0030.01014.67
5.6.370.0030.00814.57
5.6.360.0040.00714.22
5.6.350.0030.00614.62
5.6.340.0040.01214.25
5.6.330.0000.01514.55
5.6.320.0120.00414.67
5.6.310.0000.00914.47
5.6.300.0030.01314.12
5.6.290.0060.00914.39
5.6.280.0030.04417.55
5.6.270.0090.00314.03
5.6.260.0000.01514.41
5.6.250.0040.01214.49
5.6.240.0040.01114.62
5.6.230.0040.01114.29
5.6.220.0060.01014.27
5.6.210.0050.04117.50
5.6.200.0070.04316.34
5.6.190.0090.03017.45
5.6.180.0050.03417.38
5.6.170.0220.02517.46
5.6.160.0060.03317.49
5.6.150.0070.02916.33
5.6.140.0060.02416.17
5.6.130.0080.04016.30
5.6.120.0030.04117.77
5.6.110.0090.03817.79
5.6.100.0060.04517.64
5.6.90.0060.04317.72
5.6.80.0070.03517.30
5.6.70.0000.01614.32
5.6.60.0040.01114.35
5.6.50.0030.00914.29
5.6.40.0130.00614.51
5.6.30.0100.00314.20
5.6.20.0040.00414.48
5.6.10.0070.00414.32
5.6.00.0040.01114.27
5.5.380.0000.00914.50
5.5.370.0030.00914.23
5.5.360.0030.01014.26
5.5.350.2120.02417.40
5.5.340.0100.02515.96
5.5.330.0100.04317.25
5.5.320.0200.02717.30
5.5.310.0200.04017.36
5.5.300.0060.04316.22
5.5.290.0080.04016.32
5.5.280.0090.02717.51
5.5.270.0080.02017.46
5.5.260.0080.03317.53
5.5.250.0090.03317.23
5.5.240.0120.04317.23
5.5.230.0000.00913.94
5.5.220.0090.00614.44
5.5.210.0040.00814.03
5.5.200.0060.01314.21
5.5.190.0030.00613.91
5.5.180.0030.01014.41
5.5.170.0040.00414.30
5.5.160.0070.00714.52
5.5.150.0000.00914.36
5.5.140.0000.01314.20
5.5.130.0030.01014.09
5.5.120.0090.00614.30
5.5.110.0100.00614.45
5.5.100.0040.00714.27
5.5.90.0060.00614.34
5.5.80.0030.01014.40
5.5.70.0140.00014.39
5.5.60.0070.00714.05
5.5.50.0090.00313.83
5.5.40.0000.00814.13
5.5.30.0060.00614.50
5.5.20.0070.00714.19
5.5.10.0030.00914.12
5.5.00.0100.00314.26
5.4.450.0180.02516.28
5.4.440.0120.02616.33
5.4.430.0230.02116.35
5.4.420.0330.02516.32
5.4.410.0200.03016.31
5.4.400.0150.02116.12
5.4.390.0150.02031.94
5.4.380.0090.04116.02
5.4.370.0050.03515.90
5.4.360.0030.03415.85
5.4.350.0130.02615.93
5.4.340.0140.02316.04
5.4.330.0040.00413.25
5.4.320.0080.02012.88
5.4.310.0050.02212.88
5.4.300.0060.02012.88
5.4.290.0040.02512.87
5.4.280.0080.02612.83
5.4.270.0050.03012.82
5.4.260.0090.03212.82
5.4.250.0110.02512.82
5.4.240.0070.02912.83
5.4.230.0100.02112.82
5.4.220.0040.02512.82
5.4.210.0050.02912.82
5.4.200.0050.03312.82
5.4.190.0120.02312.82
5.4.180.0040.03112.82
5.4.170.0090.04712.82
5.4.160.0110.04512.82
5.4.150.0070.03112.82
5.4.140.0120.04212.66
5.4.130.0060.04212.65
5.4.120.0020.03112.63
5.4.110.0050.03212.63
5.4.100.0070.01912.63
5.4.90.0030.02812.63
5.4.80.0060.02412.63
5.4.70.0050.02512.63
5.4.60.0130.03712.63
5.4.50.0080.02712.63
5.4.40.0040.02512.63
5.4.30.0030.02412.62
5.4.20.0070.02112.62
5.4.10.0180.07212.62
5.4.00.0090.03712.37
5.3.290.0070.02313.03
5.3.280.0080.04012.98
5.3.270.0130.04412.99
5.3.260.0110.05212.99
5.3.250.0060.03912.99
5.3.240.0070.03912.98
5.3.230.0070.03612.98
5.3.220.0110.02512.96
5.3.210.0070.03812.96
5.3.200.0040.02412.96
5.3.190.0110.03812.96
5.3.180.0040.02312.96
5.3.170.0070.01912.96
5.3.160.0060.02512.96
5.3.150.0040.02112.96
5.3.140.0040.02212.96
5.3.130.0080.02112.95
5.3.120.0050.03212.95
5.3.110.0080.03412.95
5.3.100.0090.02612.69
5.3.90.0040.02712.68
5.3.80.0070.02712.67
5.3.70.0080.03812.68
5.3.60.0060.03112.67
5.3.50.0070.03012.65
5.3.40.0070.03612.64
5.3.30.0040.03512.62
5.3.20.0040.02012.51
5.3.10.0030.02412.50
5.3.00.0060.02112.49
5.2.170.0060.0319.23
5.2.160.0080.0359.23
5.2.150.0130.0549.23
5.2.140.0050.0359.23
5.2.130.0060.0329.19
5.2.120.0060.0339.19
5.2.110.0040.0339.19
5.2.100.0050.0319.19
5.2.90.0070.0319.19
5.2.80.0020.0359.18
5.2.70.0060.0319.19
5.2.60.0070.0399.13
5.2.50.0070.0369.11
5.2.40.0040.0319.08
5.2.30.0070.0339.06
5.2.20.0050.0349.04
5.2.10.0070.0408.95
5.2.00.0110.0348.82
5.1.60.0080.0388.11
5.1.50.0060.0578.11
5.1.40.0140.0838.09
5.1.30.0100.0458.43
5.1.20.0140.0538.45
5.1.10.0230.1228.18
5.1.00.0090.0468.18
5.0.50.0030.0476.66
5.0.40.0080.0456.52
5.0.30.0160.0696.33
5.0.20.0090.0586.29
5.0.10.0110.0356.27
5.0.00.0110.0576.27
4.4.90.0070.0424.78
4.4.80.0090.0464.75
4.4.70.0090.0484.76
4.4.60.0110.0384.76
4.4.50.0090.0474.77
4.4.40.0040.0404.71
4.4.30.0060.0234.76
4.4.20.0050.0244.84
4.4.10.0060.0234.85
4.4.00.0020.0444.76
4.3.110.0140.0284.67
4.3.100.0030.0294.66
4.3.90.0010.0254.64
4.3.80.0150.0414.59
4.3.70.0060.0464.63
4.3.60.0130.0354.63
4.3.50.0090.0434.63
4.3.40.0150.0474.53
4.3.30.0020.0253.30
4.3.20.0040.0433.28
4.3.10.0030.0363.24
4.3.00.0100.01348.14

preferences:
43.52 ms | 400 KiB | 5 Q