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.5.30.0090.00817.52
8.5.20.0100.00720.19
8.5.10.0070.01020.08
8.5.00.0110.01020.07
8.4.180.0130.01019.67
8.4.170.0160.00624.02
8.4.160.0120.01024.95
8.4.150.0070.00716.87
8.4.140.0150.00617.85
8.4.130.0140.00718.02
8.4.120.0130.00820.71
8.4.110.0120.00822.61
8.4.100.0090.01118.79
8.4.90.0110.00920.64
8.4.80.0070.01318.76
8.4.70.0110.00918.07
8.4.60.0140.00918.87
8.4.50.0040.00418.73
8.4.40.0090.00920.74
8.4.30.0110.00317.70
8.4.20.0110.01117.59
8.4.10.0100.00717.77
8.3.300.0110.00920.67
8.3.290.0130.00720.76
8.3.280.0040.01618.41
8.3.270.0100.00916.70
8.3.260.0120.00616.68
8.3.250.0120.00518.85
8.3.240.0130.00618.38
8.3.230.0100.00617.23
8.3.220.0090.00918.80
8.3.210.0120.00716.80
8.3.200.0060.00316.82
8.3.190.0100.00717.27
8.3.180.0130.00617.10
8.3.170.0180.00020.82
8.3.160.0120.00617.00
8.3.150.0130.00317.05
8.3.140.0040.00416.90
8.3.130.0040.01216.53
8.3.120.0040.00418.84
8.3.110.0050.00316.63
8.3.100.0120.00324.06
8.3.90.0130.00726.77
8.3.80.0090.00018.16
8.3.70.0040.01118.30
8.3.60.0030.01018.40
8.3.50.0140.00821.09
8.3.40.0170.00319.09
8.3.30.0000.01418.96
8.3.20.0070.00020.15
8.3.10.0050.00321.91
8.3.00.0000.00820.84
8.2.300.0120.00920.23
8.2.290.0100.00920.25
8.2.280.0100.00920.04
8.2.270.0100.00717.03
8.2.260.0060.01216.48
8.2.250.0080.00018.65
8.2.240.0090.00017.18
8.2.230.0060.00320.94
8.2.220.0100.00037.54
8.2.210.0070.01126.77
8.2.200.0060.00318.54
8.2.190.0090.01316.75
8.2.180.0040.01116.50
8.2.170.0120.00322.96
8.2.160.0180.00319.16
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00419.85
8.2.110.0040.00719.21
8.2.100.0110.00317.78
8.2.90.0000.00819.21
8.2.80.0000.00817.97
8.2.70.0090.00017.75
8.2.60.0060.00317.93
8.2.50.0000.00818.10
8.2.40.0030.00620.49
8.2.30.0050.00320.69
8.2.20.0030.00517.76
8.2.10.0070.00018.06
8.2.00.0070.00018.00
8.1.340.0110.00817.88
8.1.330.0060.00422.19
8.1.320.0110.00816.06
8.1.310.0040.00416.81
8.1.300.0040.01120.22
8.1.290.0090.00030.84
8.1.280.0170.00325.92
8.1.270.0030.00523.96
8.1.260.0070.00026.35
8.1.250.0000.00728.09
8.1.240.0090.00022.14
8.1.230.0110.00017.77
8.1.220.0050.00317.74
8.1.210.0030.00618.77
8.1.200.0060.00317.35
8.1.190.0040.00417.23
8.1.180.0040.00418.10
8.1.170.0000.00918.54
8.1.160.0040.00420.88
8.1.150.0030.00618.71
8.1.140.0050.00319.45
8.1.130.0000.00717.59
8.1.120.0030.00317.48
8.1.110.0040.00417.28
8.1.100.0040.00417.38
8.1.90.0030.00517.46
8.1.80.0040.00417.28
8.1.70.0000.00717.38
8.1.60.0040.00417.52
8.1.50.0040.00417.47
8.1.40.0050.00317.38
8.1.30.0050.00317.67
8.1.20.0040.00417.59
8.1.10.0000.00717.39
8.1.00.0000.00717.50
8.0.300.0050.00218.77
8.0.290.0030.00516.75
8.0.280.0030.00518.56
8.0.270.0070.00017.27
8.0.260.0060.00017.22
8.0.250.0000.00716.90
8.0.240.0030.00617.00
8.0.230.0030.00317.00
8.0.220.0070.00016.93
8.0.210.0020.00516.89
8.0.200.0000.00716.93
8.0.190.0030.00516.99
8.0.180.0000.00716.85
8.0.170.0000.00716.86
8.0.160.0040.00416.87
8.0.150.0000.00816.74
8.0.140.0040.00416.74
8.0.130.0030.00313.25
8.0.120.0000.00816.86
8.0.110.0000.00816.77
8.0.100.0000.00716.95
8.0.90.0050.00216.96
8.0.80.0110.00716.85
8.0.70.0070.00016.81
8.0.60.0040.00417.01
8.0.50.0020.00516.91
8.0.30.0130.00817.21
8.0.20.0120.00717.40
8.0.10.0050.00317.06
8.0.00.0090.01016.92
7.4.330.0000.00615.08
7.4.320.0030.00316.46
7.4.300.0060.00016.43
7.4.290.0070.00016.61
7.4.280.0050.00316.61
7.4.270.0070.00016.66
7.4.260.0000.00716.59
7.4.250.0060.00216.49
7.4.240.0000.00716.46
7.4.230.0070.00016.54
7.4.220.0110.01516.54
7.4.210.0070.00816.59
7.4.200.0030.00316.66
7.4.160.0090.00616.29
7.4.150.0110.00717.40
7.4.140.0100.01217.86
7.4.130.0130.00716.57
7.4.120.0120.00516.55
7.4.110.0100.00716.39
7.4.100.0090.00616.64
7.4.90.0130.01016.31
7.4.80.0070.01419.39
7.4.70.0060.00916.37
7.4.60.0070.01016.46
7.4.50.0070.01016.42
7.4.40.0100.01316.38
7.4.30.0090.01216.29
7.3.330.0030.00313.29
7.3.320.0060.00013.20
7.3.310.0060.00315.98
7.3.300.0030.00316.19
7.3.290.0000.00716.13
7.3.280.0080.00716.18
7.3.270.0100.01017.40
7.3.260.0150.00616.41
7.3.250.0090.01016.23
7.3.240.0120.00716.19
7.3.230.0060.01116.39
7.3.210.0060.00916.13
7.3.200.0040.01616.18
7.3.190.0060.01316.34
7.3.180.0100.00716.26
7.3.170.0190.00316.28
7.3.160.0000.01516.23
7.2.330.0120.01216.34
7.2.320.0090.01316.60
7.2.310.0110.01116.38
7.2.300.0030.01416.41
7.2.290.0080.00816.38
7.0.40.0230.05720.23
7.0.30.0200.05720.14
7.0.20.0300.05020.25
7.0.10.0270.06320.32
7.0.00.0200.05320.09
5.6.190.0200.06020.44
5.6.180.0230.05020.68
5.6.170.0200.05720.61
5.6.160.0070.06720.41
5.6.150.0130.06320.36
5.6.140.0230.07720.33
5.6.130.0130.06020.42
5.6.120.0370.07020.59
5.6.110.0400.06020.20
5.6.100.0170.07020.44
5.6.90.0230.06020.38
5.6.80.0300.06319.66
5.6.70.0400.06319.79
5.6.60.0300.07719.77
5.6.50.0400.06319.77
5.6.40.0270.06019.73
5.6.30.0230.06319.57
5.6.20.0270.07019.79
5.6.10.0430.06019.57
5.6.00.0270.06319.64
5.5.330.0200.06020.47
5.5.320.0170.05720.41
5.5.310.0130.06320.39
5.5.300.0200.08020.01
5.5.290.0600.04320.23
5.5.280.0470.06320.19
5.5.270.0530.06720.24
5.5.260.0200.06320.13
5.5.250.0200.05719.89
5.5.240.0230.08319.52
5.5.230.0230.08019.55
5.5.220.0170.07019.54
5.5.210.0500.05319.59
5.5.200.0230.07319.52
5.5.190.0100.07019.57
5.5.180.0400.06319.36
5.5.160.0370.05719.50
5.5.150.0400.08319.52
5.5.140.0530.05019.48
5.5.130.0200.07019.51
5.5.120.0300.07319.44
5.5.110.0230.06019.56
5.5.100.0330.08319.33
5.5.90.0100.09719.26
5.5.80.0200.08019.44
5.5.70.0530.08019.32
5.5.60.0200.05719.31
5.5.50.0230.05319.35
5.5.40.0300.06019.36
5.5.30.0430.07019.41
5.5.20.0470.05019.48
5.5.10.0270.07719.50
5.5.00.0300.07019.36

preferences:
63.41 ms | 1555 KiB | 5 Q