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) { $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.0090.01216.75
8.3.50.0090.00917.87
8.3.40.0040.01118.72
8.3.30.0150.00418.55
8.3.20.0000.00819.14
8.3.10.0050.00323.65
8.3.00.0030.00522.46
8.2.180.0120.00918.29
8.2.170.0070.00722.96
8.2.160.0140.00021.19
8.2.150.0030.00624.18
8.2.140.0030.00524.66
8.2.130.0140.00426.16
8.2.120.0000.00819.77
8.2.110.0030.00721.06
8.2.100.0090.00317.59
8.2.90.0040.00419.08
8.2.80.0090.00017.97
8.2.70.0030.00617.61
8.2.60.0030.00617.80
8.2.50.0060.00318.10
8.2.40.0040.00420.52
8.2.30.0040.00419.08
8.2.20.0000.00817.68
8.2.10.0070.00018.07
8.2.00.0080.00017.80
8.1.280.0070.01025.92
8.1.270.0040.00422.08
8.1.260.0110.00726.35
8.1.250.0080.00028.09
8.1.240.0080.00019.63
8.1.230.0080.00417.45
8.1.220.0030.00517.79
8.1.210.0030.00518.77
8.1.200.0100.00517.35
8.1.190.0060.00317.35
8.1.180.0040.00418.10
8.1.170.0000.00918.64
8.1.160.0050.00322.16
8.1.150.0040.00418.82
8.1.140.0080.00019.63
8.1.130.0000.00717.75
8.1.120.0070.00017.44
8.1.110.0040.00417.37
8.1.100.0040.00417.48
8.1.90.0000.00717.52
8.1.80.0070.00017.50
8.1.70.0030.00317.38
8.1.60.0050.00317.49
8.1.50.0040.00417.55
8.1.40.0030.00717.45
8.1.30.0000.00817.62
8.1.20.0030.00517.69
8.1.10.0050.00317.53
8.1.00.0000.00917.45
8.0.300.0000.00818.77
8.0.290.0070.00016.63
8.0.280.0030.00318.37
8.0.270.0040.00416.80
8.0.260.0030.00316.94
8.0.250.0000.00716.92
8.0.240.0000.00717.00
8.0.230.0080.00016.99
8.0.220.0000.00716.85
8.0.210.0040.00416.89
8.0.200.0000.00717.02
8.0.190.0040.00416.96
8.0.180.0070.00016.92
8.0.170.0070.00016.98
8.0.160.0070.00016.77
8.0.150.0070.00016.97
8.0.140.0000.00716.86
8.0.130.0000.00513.39
8.0.120.0040.00416.83
8.0.110.0050.00217.01
8.0.100.0040.00416.98
8.0.90.0000.00717.01
8.0.80.0080.00916.97
8.0.70.0050.00216.85
8.0.60.0040.00416.84
8.0.50.0040.00416.85
8.0.30.0110.00816.95
8.0.20.0110.00717.40
8.0.10.0080.00017.11
8.0.00.0100.00616.96
7.4.330.0000.00615.15
7.4.320.0040.00416.42
7.4.300.0030.00316.52
7.4.290.0070.00016.41
7.4.280.0000.00716.63
7.4.270.0030.00316.46
7.4.260.0030.00616.59
7.4.250.0030.00516.53
7.4.240.0050.00316.61
7.4.230.0000.00816.38
7.4.220.0050.01516.70
7.4.210.0000.01716.68
7.4.200.0040.00416.53
7.4.160.0090.00716.49
7.4.150.0160.00817.40
7.4.140.0090.00917.86
7.4.130.0050.01516.59
7.4.120.0090.01216.52
7.4.110.0150.00816.46
7.4.100.0030.01316.37
7.4.90.0030.01516.43
7.4.80.0110.01119.39
7.4.70.0110.01116.43
7.4.60.0030.01316.68
7.4.50.0090.00316.46
7.4.40.0170.00016.58
7.4.30.0030.01316.63
7.4.00.0000.01414.97
7.3.330.0030.00313.36
7.3.320.0030.00313.46
7.3.310.0040.00416.39
7.3.300.0070.00016.44
7.3.290.0110.00816.39
7.3.280.0100.00616.35
7.3.270.0090.00917.40
7.3.260.0070.00916.42
7.3.250.0080.01016.42
7.3.240.0090.01216.40
7.3.230.0030.01316.39
7.3.210.0100.00616.45
7.3.200.0030.01316.68
7.3.190.0170.00316.54
7.3.180.0090.01316.65
7.3.170.0090.01316.44
7.3.160.0100.00716.57
7.2.330.0160.00016.54
7.2.320.0080.00816.40
7.2.310.0030.01416.59
7.2.300.0110.00616.79
7.2.290.0160.00316.56
7.2.60.0030.00917.06
7.2.00.0030.00619.32
7.1.200.0090.00315.70
7.1.70.0000.01317.18
7.1.60.0030.00717.19
7.1.50.0070.01417.02
7.1.00.0070.07322.48
7.0.200.0060.00616.82
7.0.100.1430.05320.05
7.0.90.0070.06019.88
7.0.80.0130.05719.94
7.0.70.0100.05319.97
7.0.60.0130.05320.05
7.0.50.0030.06320.35
7.0.40.0100.05720.39
7.0.30.0130.05320.34
7.0.20.0170.05020.39
7.0.10.0170.05020.38
7.0.00.0130.05320.21
5.6.250.0100.05320.79
5.6.240.0100.05320.77
5.6.230.0100.05320.73
5.6.220.0130.05020.67
5.6.210.0070.06020.55
5.6.200.0130.05321.11
5.6.190.0100.06021.15
5.6.180.0170.04721.06
5.6.170.0070.05721.03
5.6.160.0100.06321.14
5.6.150.0130.05721.10
5.6.140.0200.04721.08
5.6.130.0130.07721.06
5.6.120.0200.05321.13
5.6.110.0130.06021.07
5.6.100.0030.08321.11
5.6.90.0130.05721.12
5.6.80.0030.05720.46
5.6.70.0100.06020.52
5.6.60.0200.04320.47
5.6.50.0070.06320.50
5.6.40.0100.05320.35
5.6.30.0170.04320.39
5.6.20.0030.06020.54
5.6.10.0030.06020.54
5.6.00.0070.05720.47

preferences:
53.33 ms | 401 KiB | 5 Q