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 (\Error $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.60.0110.00416.88
8.3.50.0110.00722.05
8.3.40.0090.00618.85
8.3.30.0090.00618.84
8.3.20.0000.00720.30
8.3.10.0000.00821.78
8.3.00.0040.00419.23
8.2.180.0180.00316.50
8.2.170.0110.00322.96
8.2.160.0100.00720.39
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0080.00017.63
8.2.120.0000.00826.35
8.2.110.0070.00321.13
8.2.100.0090.00317.84
8.2.90.0040.00417.84
8.2.80.0050.00317.97
8.2.70.0050.00317.50
8.2.60.0030.00617.93
8.2.50.0090.00018.07
8.2.40.0000.00819.18
8.2.30.0070.00020.54
8.2.20.0030.00617.66
8.2.10.0000.00717.99
8.2.00.0040.00418.05
8.1.280.0170.00325.92
8.1.270.0060.00322.02
8.1.260.0000.00728.09
8.1.250.0050.00328.09
8.1.240.0060.00323.80
8.1.230.0070.00420.95
8.1.220.0060.00317.74
8.1.210.0000.00818.95
8.1.200.0000.01017.35
8.1.190.0040.00417.23
8.1.180.0000.00718.10
8.1.170.0090.00018.79
8.1.160.0000.00721.86
8.1.150.0000.00718.89
8.1.140.0040.00419.39
8.1.130.0050.00217.64
8.1.120.0040.00417.46
8.1.110.0080.00017.48
8.1.100.0050.00317.36
8.1.90.0040.00417.41
8.1.80.0060.00317.30
8.1.70.0030.00317.30
8.1.60.0040.00417.60
8.1.50.0030.00517.51
8.1.40.0080.00017.39
8.1.30.0060.00317.69
8.1.20.0040.00417.53
8.1.10.0060.00317.55
8.1.00.0040.00417.49
8.0.300.0040.00420.09
8.0.290.0050.00216.75
8.0.280.0030.00318.43
8.0.270.0000.00717.16
8.0.260.0030.00617.25
8.0.250.0070.00016.91
8.0.240.0000.01116.89
8.0.230.0040.00417.03
8.0.220.0070.00016.98
8.0.210.0000.00816.99
8.0.200.0070.00017.00
8.0.190.0040.00416.86
8.0.180.0050.00216.89
8.0.170.0030.00716.97
8.0.160.0000.00716.82
8.0.150.0000.00916.73
8.0.140.0040.00416.74
8.0.130.0050.00013.33
8.0.120.0050.00316.75
8.0.110.0040.00416.83
8.0.100.0040.00416.87
8.0.90.0000.00716.77
8.0.80.0110.00416.86
8.0.70.0050.00216.91
8.0.60.0000.00816.91
8.0.50.0020.00516.79
8.0.30.0100.00917.26
8.0.20.0100.01017.40
8.0.10.0080.00016.90
8.0.00.0090.01316.71
7.4.330.0000.00516.72
7.4.320.0000.00616.50
7.4.300.0030.00316.55
7.4.290.0080.00016.49
7.4.280.0070.00016.54
7.4.270.0000.00616.41
7.4.260.0030.00316.41
7.4.250.0000.00716.48
7.4.240.0040.00416.48
7.4.230.0000.00716.71
7.4.220.0070.01116.52
7.4.210.0090.00916.57
7.4.200.0030.00316.70
7.4.160.0090.00616.67
7.4.150.0070.01117.40
7.4.140.0090.01117.86
7.4.130.0130.00716.45
7.4.120.0110.00916.48
7.4.110.0030.01316.59
7.4.100.0100.00716.55
7.4.90.0030.01516.68
7.4.80.0210.00019.39
7.4.70.0140.00316.36
7.4.60.0120.00316.57
7.4.50.0100.00616.55
7.4.40.0100.00716.45
7.4.30.0090.00916.45
7.4.00.0040.01114.85
7.3.330.0050.00013.50
7.3.320.0000.00513.34
7.3.310.0070.00016.42
7.3.300.0040.00416.37
7.3.290.0030.00316.33
7.3.280.0130.00916.42
7.3.270.0100.01017.40
7.3.260.0100.00616.49
7.3.250.0130.00716.58
7.3.240.0150.00716.44
7.3.230.0130.00416.48
7.3.210.0070.01616.39
7.3.200.0060.01116.54
7.3.190.0070.01316.46
7.3.180.0090.00616.60
7.3.170.0100.00716.52
7.3.160.0060.00916.38
7.2.330.0070.01016.50
7.2.320.0110.01416.75
7.2.310.0070.01016.89
7.2.300.0100.00616.55
7.2.290.0060.01216.83
7.2.60.0110.00417.13
7.2.00.0030.00919.27
7.1.200.0030.01015.50
7.1.100.0040.00417.83
7.1.70.0040.00417.16
7.1.60.0090.01619.48
7.1.50.0030.01716.92
7.1.00.0000.08022.48
7.0.200.0160.00614.59
7.0.60.0100.07719.93
7.0.50.0070.04017.96
7.0.40.0170.06720.25
7.0.30.0470.05720.09
7.0.20.0300.07020.25
7.0.10.0170.04720.08
7.0.00.0000.04320.06
5.6.280.0030.07020.82
5.6.210.0100.08020.77
5.6.200.0170.04318.18
5.6.190.0070.08020.66
5.6.180.0330.07320.77
5.6.170.0170.04020.56
5.6.160.0100.08020.70
5.6.150.0030.04018.28
5.6.140.0030.04718.22
5.6.130.0030.04718.18
5.6.120.0070.08321.15
5.6.110.0070.08020.90
5.6.100.0070.08320.95
5.6.90.0070.06720.88
5.6.80.0030.06720.45
5.5.350.4330.04320.31
5.5.340.0070.08018.04
5.5.330.0030.06720.35
5.5.320.0100.08020.42
5.5.310.0200.06720.26
5.5.300.0030.04018.03
5.5.290.0100.04317.98
5.5.280.0030.07320.98
5.5.270.0130.07020.88
5.5.260.0070.04020.98
5.5.250.0030.08320.72
5.5.240.0170.04720.05

preferences:
46.66 ms | 401 KiB | 5 Q