3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Math { public int $x; public int $y; public function __construct($x, $y) { $this->x = $x; $this->y = $y; } public function add() { return $this->x + $this->y; } } try { (new Math(3, "nonsense"))->add(); } catch (Error $e) { echo "Look, I'm Python!"; }

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.4.120.0070.00524.20
8.4.110.0120.00718.84
8.4.100.0130.00718.93
8.4.90.0130.00619.00
8.4.80.0090.01120.68
8.4.70.0060.01320.59
8.4.60.0100.00618.95
8.4.50.0050.00318.94
8.4.40.0070.01320.53
8.4.30.0110.00717.87
8.4.20.0070.01317.73
8.4.10.0030.00617.81
8.3.250.0100.01016.65
8.3.240.0040.00417.07
8.3.230.0100.00616.81
8.3.220.0040.00318.98
8.3.210.0080.01118.91
8.3.200.0070.00216.84
8.3.190.0120.00716.85
8.3.180.0120.00618.79
8.3.170.0110.00716.64
8.3.160.0040.01517.20
8.3.150.0100.01019.10
8.3.140.0110.00718.97
8.3.130.0000.00818.34
8.3.120.0030.00620.59
8.3.110.0030.00620.94
8.3.100.0070.01024.06
8.3.90.0040.00426.77
8.3.80.0030.00616.50
8.3.70.0100.00716.75
8.3.60.0070.00716.50
8.3.50.0140.00521.15
8.3.40.0100.00718.92
8.3.30.0140.00018.75
8.3.20.0000.00820.39
8.3.10.0050.00321.76
8.3.00.0080.00020.89
8.2.290.0110.00820.63
8.2.280.0150.00818.41
8.2.270.0120.00616.79
8.2.260.0080.01116.63
8.2.250.0000.00816.78
8.2.240.0080.00017.39
8.2.230.0080.00022.58
8.2.220.0160.00337.54
8.2.210.0050.00226.77
8.2.200.0060.00316.63
8.2.190.0100.00716.63
8.2.180.0100.00716.75
8.2.170.0100.00322.96
8.2.160.0030.01019.25
8.2.150.0070.00024.18
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0060.00318.56
8.2.110.0060.00322.27
8.2.100.0140.00317.68
8.2.90.0040.00417.59
8.2.80.0040.00419.20
8.2.70.0040.00417.93
8.2.60.0040.00417.80
8.2.50.0000.00718.16
8.2.40.0040.00420.48
8.2.30.0040.00420.62
8.2.20.0040.00417.69
8.2.10.0030.00617.95
8.2.00.0040.00417.91
8.1.330.0110.00821.93
8.1.320.0140.00518.00
8.1.310.0120.00616.23
8.1.300.0040.00418.52
8.1.290.0000.00918.88
8.1.280.0090.00625.92
8.1.270.0000.00823.76
8.1.260.0120.00026.35
8.1.250.0050.00328.09
8.1.240.0080.00022.10
8.1.230.0090.00322.73
8.1.220.0030.00617.74
8.1.210.0080.00018.77
8.1.200.0000.00817.25
8.1.190.0000.00917.11
8.1.180.0040.00418.10
8.1.170.0050.00218.58
8.1.160.0000.00720.88
8.1.150.0000.00718.80
8.1.140.0040.00419.63
8.1.130.0070.00017.30
8.1.120.0000.00817.41
8.1.110.0040.00417.46
8.1.100.0040.00417.42
8.1.90.0000.00717.48
8.1.80.0070.00017.39
8.1.70.0030.00317.34
8.1.60.0030.00617.50
8.1.50.0100.00017.44
8.1.40.0000.00817.52
8.1.30.0040.00417.59
8.1.20.0040.00417.55
8.1.10.0040.00417.34
8.1.00.0050.00317.37
8.0.300.0040.00420.08
8.0.290.0020.00516.75
8.0.280.0000.00718.42
8.0.270.0040.00417.25
8.0.260.0040.00416.89
8.0.250.0030.00317.00
8.0.240.0060.00316.95
8.0.230.0020.00516.87
8.0.220.0030.00316.96
8.0.210.0000.00816.92
8.0.200.0030.00316.95
8.0.190.0040.00416.98
8.0.180.0040.00416.81
8.0.170.0000.00816.84
8.0.160.0000.00716.88
8.0.150.0040.00416.79
8.0.140.0040.00416.88
8.0.130.0050.00013.33
8.0.120.0050.00516.70
8.0.110.0040.00416.86
8.0.100.0030.00316.78
8.0.90.0070.00016.68
8.0.80.0060.00916.94
8.0.70.0040.00416.91
8.0.60.0040.00416.96
8.0.50.0040.00416.69
8.0.30.0100.00717.06
8.0.20.0110.01017.40
8.0.10.0040.00417.09
8.0.00.0100.00916.88
7.4.330.0000.00515.08
7.4.320.0000.00616.39
7.4.300.0030.00316.40
7.4.290.0040.00416.55
7.4.280.0000.00716.45
7.4.270.0020.00516.61
7.4.260.0030.00316.62
7.4.250.0040.00416.49
7.4.240.0070.00016.50
7.4.230.0000.00716.61
7.4.220.0130.00616.59
7.4.210.0030.01016.54
7.4.200.0000.00716.53
7.4.160.0060.01016.43
7.4.150.0130.00317.40
7.4.140.0130.00517.86
7.4.130.0120.00916.54
7.4.120.0130.00316.57
7.4.110.0100.00716.46
7.4.100.0130.00916.56
7.4.90.0150.00316.48
7.4.80.0030.01319.39
7.4.70.0110.00616.70
7.4.60.0030.01316.71
7.4.50.0080.00416.35
7.4.40.0060.01616.58
7.4.30.0090.01016.69
7.3.330.0050.00012.92
7.3.320.0060.00012.97
7.3.310.0000.00716.21
7.3.300.0030.00316.22
7.3.290.0060.01016.17
7.3.280.0060.01116.21
7.3.270.0190.00317.40
7.3.260.0150.00316.35
7.3.250.0090.00916.34
7.3.240.0070.01016.25
7.3.230.0090.00916.39
7.3.210.0060.01016.22
7.3.200.0090.00616.19
7.3.190.0040.01216.33
7.3.180.0090.00616.22
7.3.170.0100.01016.36
7.3.160.0030.01316.41
7.2.330.0040.01216.25
7.2.320.0120.00616.43
7.2.310.0100.00716.22
7.2.300.0070.01016.30
7.2.290.0090.00616.37
7.0.60.0730.00019.96
7.0.50.0470.03719.00
7.0.40.0650.02820.18
7.0.30.0800.02820.27
7.0.20.0750.03020.33
7.0.10.0750.02720.19
7.0.00.0620.02820.15
5.6.210.0500.04220.58
5.6.200.0450.02319.63
5.6.190.0730.03020.76
5.6.180.0720.03020.78
5.6.170.0770.02320.67
5.6.160.0620.02520.81
5.6.150.0530.02520.81
5.6.140.0600.02820.87
5.6.130.0680.02820.77
5.6.120.0530.03020.71
5.6.110.0650.02520.71
5.6.100.0730.02820.73
5.6.90.0670.03020.78
5.6.80.0520.02220.11
5.6.70.0520.02820.10
5.6.60.0470.02820.11
5.6.50.0420.03220.00
5.6.40.0730.02220.12
5.6.30.0680.02820.14
5.6.20.0530.02220.08
5.6.10.0470.03520.11
5.6.00.0620.02820.15
5.5.350.0730.00020.32
5.5.340.0420.04019.41
5.5.330.0570.02820.61
5.5.320.0530.03220.59
5.5.310.0750.02520.56
5.5.300.0550.03720.39
5.5.290.0620.02720.46
5.5.280.0500.02520.62
5.5.270.0650.03020.45
5.5.260.0600.03220.60
5.5.250.0420.03220.42
5.5.240.0520.03019.94
5.5.230.0470.02819.98
5.5.220.0520.02719.79
5.5.210.0470.02519.85
5.5.200.0500.02319.85
5.5.190.0480.02319.89
5.5.180.0430.02719.92
5.5.160.0500.03020.04
5.5.150.0580.03019.88
5.5.140.0620.02519.76
5.5.130.0600.03219.88
5.5.120.0700.02819.79
5.5.110.0750.02319.86
5.5.100.0620.02319.76
5.5.90.0630.02719.72
5.5.80.0630.02519.77
5.5.70.0720.02519.64
5.5.60.0670.02319.71
5.5.50.0730.02719.64
5.5.40.0680.02719.74
5.5.30.0700.02319.79
5.5.20.0600.03319.80
5.5.10.0670.02819.67
5.5.00.0520.02819.77

preferences:
96.07 ms | 403 KiB | 5 Q