3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Test; class Test { private $s; private $i; public function __construct(string $s, int $i) { $this->s = $s; $this->i = $i / 0; } public function foo() { return 's: ' . $this->s . ', i: ' . $this->i; } } try { $a = new Test('Hello, world!', 2015); echo $a->foo(); } catch (\Throwable $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.40.0090.00618.96
8.3.30.0070.00718.64
8.3.20.0080.00020.04
8.3.10.0080.00021.85
8.3.00.0080.00019.38
8.2.170.0070.00722.96
8.2.160.0150.00020.35
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0030.00517.63
8.2.120.0070.00026.35
8.2.110.0070.00322.13
8.2.100.0120.00018.03
8.2.90.0040.00419.22
8.2.80.0050.00317.97
8.2.70.0000.00817.50
8.2.60.0000.00818.04
8.2.50.0080.00018.07
8.2.40.0090.00019.27
8.2.30.0000.00820.62
8.2.20.0070.00317.74
8.2.10.0050.00218.11
8.2.00.0040.00417.95
8.1.270.0070.00323.82
8.1.260.0030.00728.09
8.1.250.0040.00428.09
8.1.240.0030.00722.55
8.1.230.0080.00417.61
8.1.220.0000.00817.74
8.1.210.0060.00318.77
8.1.200.0040.00417.35
8.1.190.0030.00517.35
8.1.180.0030.00518.10
8.1.170.0040.00418.87
8.1.160.0040.00421.92
8.1.150.0040.00418.87
8.1.140.0050.00319.41
8.1.130.0000.00717.51
8.1.120.0040.00417.34
8.1.110.0040.00417.32
8.1.100.0000.00817.30
8.1.90.0040.00417.38
8.1.80.0050.00217.29
8.1.70.0030.00317.24
8.1.60.0030.00517.47
8.1.50.0030.00617.41
8.1.40.0030.00517.40
8.1.30.0040.00417.64
8.1.20.0080.00017.54
8.1.10.0080.00017.46
8.1.00.0000.00717.48
8.0.300.0070.00018.77
8.0.290.0000.00716.75
8.0.280.0000.00718.45
8.0.270.0000.00717.27
8.0.260.0000.01017.21
8.0.250.0070.00017.02
8.0.240.0000.01016.89
8.0.230.0030.00317.03
8.0.220.0000.00816.86
8.0.210.0000.00716.99
8.0.200.0040.00417.03
8.0.190.0030.00516.89
8.0.180.0050.00216.89
8.0.170.0000.00816.95
8.0.160.0070.00016.94
8.0.150.0030.00616.93
8.0.140.0000.00716.76
8.0.130.0000.00613.24
8.0.120.0030.00516.86
8.0.110.0030.00516.85
8.0.100.0050.00316.94
8.0.90.0040.00416.88
8.0.80.0090.01316.84
8.0.70.0000.00716.95
8.0.60.0000.00816.85
8.0.50.0040.00416.76
8.0.30.0060.01217.19
8.0.20.0110.00717.40
8.0.10.0050.00216.88
8.0.00.0070.01416.70
7.4.330.0050.00016.66
7.4.320.0000.00616.59
7.4.300.0030.00316.50
7.4.290.0050.00216.45
7.4.280.0030.00516.48
7.4.270.0030.00316.53
7.4.260.0050.00216.57
7.4.250.0040.00416.57
7.4.240.0000.00716.60
7.4.230.0030.00316.66
7.4.220.0120.00616.52
7.4.210.0000.01416.50
7.4.200.0040.00416.43
7.4.160.0120.00316.56
7.4.150.0090.00917.40
7.4.140.0130.00817.86
7.4.130.0100.00816.40
7.4.120.0110.00716.52
7.4.110.0100.00716.53
7.4.100.0100.01016.63
7.4.90.0110.00716.66
7.4.80.0070.01619.39
7.4.70.0130.00916.50
7.4.60.0060.00916.46
7.4.50.0040.01116.41
7.4.40.0090.01216.19
7.4.30.0060.01216.60
7.4.00.0090.00615.01
7.3.330.0000.00513.44
7.3.320.0000.00513.39
7.3.310.0030.00316.46
7.3.300.0000.00716.24
7.3.290.0030.00316.25
7.3.280.0050.01116.38
7.3.270.0130.01017.40
7.3.260.0070.01016.49
7.3.250.0090.01016.38
7.3.240.0100.01116.31
7.3.230.0060.01016.39
7.3.210.0090.01316.57
7.3.200.0090.00616.41
7.3.190.0110.01116.64
7.3.180.0100.00616.35
7.3.170.0030.01316.56
7.3.160.0130.00316.56
7.3.10.0040.00716.66
7.3.00.0030.00616.71
7.2.330.0120.00616.67
7.2.320.0140.00916.78
7.2.310.0070.01016.78
7.2.300.0100.00716.74
7.2.290.0110.00616.68
7.2.130.0030.01016.89
7.2.120.0080.00317.09
7.2.110.0080.00616.80
7.2.100.0120.00017.04
7.2.90.0040.01116.98
7.2.80.0000.01216.93
7.2.70.0040.01117.04
7.2.60.0050.00816.95
7.2.50.0050.00517.05
7.2.40.0110.00316.99
7.2.30.0060.00616.96
7.2.20.0030.00617.04
7.2.10.0000.01316.92
7.2.00.0020.01018.05
7.1.250.0070.00415.82
7.1.200.0030.01015.67
7.1.100.0100.00318.22
7.1.70.0040.00717.03
7.1.60.0130.01319.48
7.1.50.0140.00716.79
7.1.00.0130.06722.43
7.0.200.0440.01014.45
7.0.60.0100.03320.01
7.0.50.0030.04017.86
7.0.40.0100.03720.11
7.0.30.0330.07720.09
7.0.20.0230.06320.15
7.0.10.0070.07020.13
7.0.00.0100.04320.24
5.6.280.0100.05321.13
5.6.210.0100.07320.48
5.6.200.0070.05318.15
5.6.190.0170.07720.51
5.6.180.0170.06320.43
5.6.170.0100.04720.71
5.6.160.0170.07320.43
5.6.150.0000.04018.22
5.6.140.0070.08318.14
5.6.130.0100.06718.17
5.6.120.0070.07721.00
5.6.110.0130.07321.02
5.6.100.0100.08321.14
5.6.90.0100.09020.97
5.6.80.0100.05320.38
5.5.350.5030.05020.51
5.5.340.0070.05717.98
5.5.330.0070.04020.31
5.5.320.0030.05720.51
5.5.310.0300.03720.30
5.5.300.0000.07017.95
5.5.290.0030.04017.98
5.5.280.0070.07720.88
5.5.270.0030.08720.80
5.5.260.0100.07320.77
5.5.250.0100.08020.80
5.5.240.0070.04720.27

preferences:
69.96 ms | 400 KiB | 5 Q