3v4l.org

run code in 300+ PHP versions simultaneously
<?php class QueroBatataException extends UnexpectedValueException { } class QueroCebolaException extends UnexpectedValueException { } function batata($nomeLegume) { if ($nomeLegume !== 'batata') { throw new QueroBatataException('Me dê batata'); } echo 'Huuun Batata!' . PHP_EOL; } function cebola($nomeLegume) { if ($nomeLegume !== 'cebola') { throw new QueroCebolaException('Me dê cebola'); } echo 'Huuun Cebola!' . PHP_EOL; } $legume = 'batata'; try { batata($legume); cebola($legume); } catch (UnexpectedValueException $e) { echo $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.130.0030.00517.12
8.3.120.0090.00018.85
8.3.110.0040.00420.94
8.3.100.0080.00016.61
8.3.90.0040.00426.77
8.3.80.0090.00019.36
8.3.70.0120.00916.50
8.3.60.0100.00716.63
8.3.50.0240.01021.95
8.3.40.0100.00718.79
8.3.30.0130.00618.71
8.3.20.0000.00819.15
8.3.10.0050.00323.51
8.3.00.0050.00322.40
8.2.250.0040.00417.40
8.2.240.0130.00617.21
8.2.230.0090.00022.58
8.2.220.0040.00424.06
8.2.210.0060.01226.77
8.2.200.0040.00418.88
8.2.190.0070.01416.63
8.2.180.0140.00318.25
8.2.170.0150.00618.77
8.2.160.0040.01121.14
8.2.150.0060.00324.18
8.2.140.0080.00024.66
8.2.130.0110.00426.16
8.2.120.0080.00019.71
8.2.110.0000.00920.94
8.2.100.0080.00417.84
8.2.90.0050.00318.05
8.2.80.0030.00618.78
8.2.70.0090.00017.75
8.2.60.0040.00417.80
8.2.50.0030.00518.07
8.2.40.0000.00718.16
8.2.30.0050.00317.94
8.2.20.0040.00417.74
8.2.10.0000.00718.01
8.2.00.0000.00817.82
8.1.300.0110.00717.94
8.1.290.0060.00330.84
8.1.280.0150.00025.92
8.1.270.0040.00424.66
8.1.260.0130.00326.35
8.1.250.0070.01028.09
8.1.240.0080.00322.04
8.1.230.0000.01119.14
8.1.220.0000.00817.77
8.1.210.0000.00818.77
8.1.200.0060.00317.25
8.1.190.0000.00917.35
8.1.180.0030.00618.10
8.1.170.0040.00418.64
8.1.160.0040.00418.81
8.1.150.0040.00418.81
8.1.140.0070.00019.50
8.1.130.0000.00717.38
8.1.120.0030.00517.50
8.1.110.0000.00717.34
8.1.100.0030.00317.45
8.1.90.0000.00817.49
8.1.80.0000.00717.48
8.1.70.0070.00017.35
8.1.60.0000.00917.63
8.1.50.0030.00617.45
8.1.40.0030.00717.43
8.1.30.0030.00617.67
8.1.20.0050.00217.57
8.1.10.0070.00017.59
8.1.00.0040.00417.56
8.0.300.0050.00219.74
8.0.290.0050.00316.75
8.0.280.0000.00718.41
8.0.270.0000.00816.97
8.0.260.0050.00316.83
8.0.250.0030.00317.00
8.0.240.0040.00416.91
8.0.230.0030.00316.95
8.0.220.0030.00316.91
8.0.210.0070.00016.76
8.0.200.0060.00016.92
8.0.190.0070.00016.96
8.0.180.0090.00016.81
8.0.170.0020.00516.93
8.0.160.0000.00716.86
8.0.150.0040.00416.93
8.0.140.0050.00216.85
8.0.130.0030.00313.43
8.0.120.0040.00416.99
8.0.110.0040.00416.81
8.0.100.0070.00016.91
8.0.90.0050.00216.86
8.0.80.0090.00616.91
8.0.70.0040.00416.87
8.0.60.0000.00716.94
8.0.50.0000.00716.78
8.0.30.0080.00917.06
8.0.20.0080.01117.40
8.0.10.0050.00316.93
8.0.00.0110.00617.07
7.4.330.0000.00515.14
7.4.320.0030.00316.70
7.4.300.0060.00016.38
7.4.290.0000.00716.52
7.4.280.0000.00716.60
7.4.270.0000.00616.41
7.4.260.0070.00316.57
7.4.250.0040.00416.50
7.4.240.0030.00316.44
7.4.230.0000.00716.71
7.4.220.0100.00716.48
7.4.210.0070.01116.57
7.4.200.0000.00816.42
7.4.160.0080.01016.51
7.4.150.0070.02017.40
7.4.140.0090.01317.86
7.4.130.0050.01616.65
7.4.120.0140.00516.64
7.4.110.0070.01516.50
7.4.100.0050.01016.58
7.4.90.0110.00616.53
7.4.80.0110.01019.39
7.4.70.0060.01016.55
7.4.60.0190.00316.59
7.4.50.0070.01016.61
7.4.40.0110.00616.27
7.4.30.0040.01216.50
7.4.10.0090.00914.97
7.4.00.0090.00814.96
7.3.330.0000.00513.35
7.3.320.0050.00013.45
7.3.310.0060.00316.25
7.3.300.0040.00416.37
7.3.290.0090.00816.39
7.3.280.0070.01116.35
7.3.270.0100.00717.40
7.3.260.0100.00916.51
7.3.250.0110.00616.47
7.3.240.0130.00616.60
7.3.230.0100.00716.47
7.3.210.0090.00916.48
7.3.200.0160.00716.37
7.3.190.0060.01116.66
7.3.180.0090.01216.32
7.3.170.0060.01616.39
7.3.160.0110.01116.32
7.3.130.0140.00314.99
7.3.120.0090.00914.88
7.3.110.0040.01514.80
7.3.100.0090.00314.88
7.3.90.0060.00615.00
7.3.80.0090.00614.74
7.3.70.0170.00014.71
7.3.60.0070.00714.87
7.3.50.0030.01114.95
7.3.40.0100.00314.72
7.3.30.0000.01614.84
7.3.20.0030.01316.67
7.3.10.0100.00716.49
7.3.00.0060.01516.63
7.2.330.0130.00316.81
7.2.320.0070.01016.46
7.2.310.0070.01116.80
7.2.300.0130.00316.41
7.2.290.0040.01416.80
7.2.260.0110.00515.16
7.2.250.0150.00414.98
7.2.240.0070.01114.84
7.2.230.0070.01014.96
7.2.220.0060.01014.98
7.2.210.0100.00715.05
7.2.200.0070.00314.95
7.2.190.0100.00315.13
7.2.180.0060.00614.95
7.2.170.0000.01414.97
7.2.160.0060.00915.04
7.2.150.0100.00716.75
7.2.140.0030.01216.62
7.2.130.0070.01016.71
7.2.120.0090.00616.81
7.2.110.0060.01116.78
7.2.100.0080.00816.68
7.2.90.0060.00816.74
7.2.80.0090.00516.65
7.2.70.0090.00716.80
7.2.60.0440.00616.27
7.2.50.0550.00916.22
7.2.40.0560.01116.40
7.2.30.0500.00816.28
7.2.20.0630.00616.40
7.2.10.0550.00816.32
7.2.00.0550.00916.33
7.1.330.0070.01016.00
7.1.320.0030.01015.59
7.1.310.0110.00315.63
7.1.300.0040.00415.78
7.1.290.0060.00315.78
7.1.280.0060.01015.57
7.1.270.0030.01315.66
7.1.260.0070.00715.86
7.1.250.0040.01115.61
7.1.240.0040.01115.86
7.1.230.0100.00115.73
7.1.220.0070.00915.55
7.1.210.0100.00515.56
7.1.200.0060.00715.77
7.1.190.0050.01015.60
7.1.180.0020.01115.72
7.1.170.0550.00415.08
7.1.160.0490.01216.03
7.1.150.0570.01016.02
7.1.140.0480.00916.16
7.1.130.0580.01116.23
7.1.120.0500.00916.04
7.1.110.0600.01015.93
7.1.100.0450.01015.83
7.1.90.0510.00915.88
7.1.80.0610.00815.80
7.1.70.0300.01015.91
7.1.60.0380.00920.40
7.1.50.0580.00921.50
7.1.40.0560.01121.40
7.1.30.0700.01321.27
7.1.20.0540.00921.34
7.1.10.0630.01015.39
7.1.00.0480.02417.05
7.0.330.0070.00715.03
7.0.320.0030.01015.10
7.0.310.0060.00815.19
7.0.300.0590.00714.64
7.0.290.0500.01415.50
7.0.280.0050.00815.27
7.0.270.0590.00815.51
7.0.260.0550.00815.48
7.0.250.0570.00815.44
7.0.240.0790.00715.42
7.0.230.0510.01215.46
7.0.220.0480.00915.47
7.0.210.0550.01215.13
7.0.200.0420.00815.04
7.0.190.0640.00715.10
7.0.180.0550.01015.01
7.0.170.0600.01315.00
7.0.160.0640.00515.10
7.0.150.0670.01115.01
7.0.140.0840.00715.14
7.0.130.0630.00715.02
7.0.120.0710.00615.12
7.0.110.0610.00914.93
7.0.100.0470.02116.34
7.0.90.0530.02116.29
7.0.80.0470.02216.24
7.0.70.0620.01716.30
7.0.60.0400.02316.20
7.0.50.0470.02016.34
7.0.40.0680.02016.19
7.0.30.0550.02316.06
7.0.20.0480.02316.17
7.0.10.0500.02216.06
7.0.00.0560.02216.55
5.6.400.0140.00714.61
5.6.390.0070.01014.06
5.6.380.0080.00614.31
5.6.370.0080.01114.28
5.6.360.0110.00714.16
5.6.350.0030.01414.24
5.6.340.0110.00714.25
5.6.330.0070.00914.21
5.6.320.0110.00814.20
5.6.310.0040.01714.26
5.6.300.0130.03216.48
5.6.290.0140.02916.61
5.6.280.0100.03016.49
5.6.270.0130.02516.62
5.6.260.0170.02316.51
5.6.250.0140.03617.43
5.6.240.0130.03617.52
5.6.230.0120.03617.54
5.6.220.0130.03717.47
5.6.210.0090.03717.50
5.6.200.0140.03717.73
5.6.190.0130.03817.59
5.6.180.0100.04017.67
5.6.170.0140.03617.60
5.6.160.0110.03417.63
5.6.150.0160.03317.66
5.6.140.0130.03817.70
5.6.130.0200.02717.61
5.6.120.0130.03717.65
5.6.110.0140.03717.59
5.6.100.0110.03717.54
5.6.90.0160.03217.55
5.6.80.0120.03417.28
5.6.70.0140.03417.30
5.6.60.0140.03117.23
5.6.50.0130.03217.27
5.6.40.0090.03917.20
5.6.30.0110.03817.33
5.6.20.0100.03817.22
5.6.10.0130.03317.23
5.6.00.0110.03717.27

preferences:
52.57 ms | 403 KiB | 5 Q