3v4l.org

run code in 300+ PHP versions simultaneously
<?php class integer { private $value; public function __construct(int $value = 0) { $this->value = $value; } public function __invoke(int ...$value) : int { if (count($value) === 1) $this->value = $value[0]; else throw new Exception('Multiple values given.'); return $this->value; } } $testi = new integer(1); $testi(2);

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.00716.50
8.3.50.0120.01021.93
8.3.40.0070.00718.72
8.3.30.0140.00018.85
8.3.20.0040.00420.20
8.3.10.0030.00523.69
8.3.00.0000.00819.50
8.2.180.0150.00618.30
8.2.170.0110.00422.96
8.2.160.0070.01020.39
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0060.00319.25
8.2.120.0040.00426.35
8.2.110.0090.00021.00
8.2.100.0060.00617.72
8.2.90.0030.00617.97
8.2.80.0030.00517.97
8.2.70.0030.00517.63
8.2.60.0060.00318.04
8.2.50.0030.00518.07
8.2.40.0060.00319.39
8.2.30.0020.00520.63
8.2.20.0090.00017.67
8.2.10.0030.00518.20
8.2.00.0040.00418.16
8.1.280.0060.00825.92
8.1.270.0030.00623.79
8.1.260.0000.00728.09
8.1.250.0040.00428.09
8.1.240.0060.00322.65
8.1.230.0120.00020.84
8.1.220.0080.00017.78
8.1.210.0040.00418.77
8.1.200.0030.00617.48
8.1.190.0050.00317.25
8.1.180.0040.00418.10
8.1.170.0060.00318.77
8.1.160.0040.00421.94
8.1.150.0040.00418.91
8.1.140.0040.00419.59
8.1.130.0070.00017.59
8.1.120.0040.00417.33
8.1.110.0070.00017.47
8.1.100.0040.00417.48
8.1.90.0000.00717.53
8.1.80.0080.00017.44
8.1.70.0070.00017.35
8.1.60.0030.00717.59
8.1.50.0040.00417.43
8.1.40.0000.00817.54
8.1.30.0000.01017.65
8.1.20.0040.00417.57
8.1.10.0040.00417.52
8.1.00.0040.00817.46
8.0.300.0040.00419.89
8.0.290.0040.00416.63
8.0.280.0040.00418.30
8.0.270.0030.00317.13
8.0.260.0000.00817.10
8.0.250.0000.00716.91
8.0.240.0020.00516.93
8.0.230.0030.00416.95
8.0.220.0000.00716.86
8.0.210.0000.00816.83
8.0.200.0040.00416.89
8.0.190.0040.00416.82
8.0.180.0040.00416.83
8.0.170.0030.00616.85
8.0.160.0090.00916.91
8.0.150.0090.00016.82
8.0.140.0050.00316.82
8.0.130.0000.00513.33
8.0.120.0040.00416.90
8.0.110.0000.00716.80
8.0.100.0050.00316.76
8.0.90.0000.00716.78
8.0.80.0110.01116.86
8.0.70.0050.00316.74
8.0.60.0070.00016.93
8.0.50.0040.00416.93
8.0.30.0100.00916.95
8.0.20.0120.00717.40
8.0.10.0030.00617.00
8.0.00.0060.01216.80
7.4.330.0000.00516.76
7.4.320.0060.00016.49
7.4.300.0040.00416.61
7.4.290.0000.00716.68
7.4.280.0050.00316.51
7.4.270.0000.00716.57
7.4.260.0070.00316.36
7.4.250.0000.00716.57
7.4.240.0010.00616.65
7.4.230.0040.00416.65
7.4.220.0170.00316.70
7.4.210.0040.01116.56
7.4.200.0000.00816.64
7.4.160.0100.00616.45
7.4.150.0100.01017.40
7.4.140.0130.00817.86
7.4.130.0110.00716.47
7.4.120.0100.00716.37
7.4.110.0100.01316.76
7.4.100.0150.00916.67
7.4.90.0090.00916.69
7.4.80.0210.00219.39
7.4.70.0130.00716.47
7.4.60.0100.00616.47
7.4.50.0050.00816.32
7.4.40.0000.01616.43
7.4.30.0130.01016.64
7.4.00.0080.00814.73
7.3.330.0000.00813.40
7.3.320.0000.00513.39
7.3.310.0000.00716.38
7.3.300.0000.00716.40
7.3.290.0060.01316.30
7.3.280.0110.00816.36
7.3.270.0100.01017.40
7.3.260.0150.00916.42
7.3.250.0070.01016.50
7.3.240.0100.00816.30
7.3.230.0160.00016.39
7.3.210.0060.01016.39
7.3.200.0140.00316.46
7.3.190.0090.01316.54
7.3.180.0030.01316.20
7.3.170.0030.01416.52
7.3.160.0030.01316.50
7.2.330.0140.00316.43
7.2.320.0070.01716.39
7.2.310.0100.00716.37
7.2.300.0070.01016.48
7.2.290.0100.00616.54
7.2.60.0060.00816.55
7.2.00.0030.01319.52
7.1.200.0060.00615.96
7.1.100.0080.00317.80
7.1.70.0000.00817.28
7.1.60.0060.01819.48
7.1.50.0110.00716.97
7.1.00.0030.07722.53
7.0.200.0080.00816.77
7.0.60.0030.08319.86
7.0.50.0030.05017.94
7.0.40.0030.04720.13
7.0.30.0300.07720.21
7.0.20.0400.07320.07
7.0.10.0000.04720.07
7.0.00.0170.07320.10
5.6.280.0100.06721.10
5.6.210.0170.07320.70
5.6.200.0030.04318.12
5.6.190.0100.08320.62
5.6.180.0300.06720.63
5.6.170.0270.06720.58
5.6.160.0030.04020.61
5.6.150.0030.05018.23
5.6.140.0000.06318.23
5.6.130.0170.05018.29
5.6.120.0100.06321.15
5.6.110.0030.07720.99
5.6.100.0130.06720.98
5.6.90.0070.09021.13
5.6.80.0130.07020.38
5.5.350.4230.04020.47
5.5.340.0070.06317.98
5.5.330.0030.05020.38
5.5.320.0000.04320.31
5.5.310.0330.06020.21
5.5.300.0100.07718.07
5.5.290.0030.04717.98
5.5.280.0070.07320.88
5.5.270.0000.08720.80
5.5.260.0130.04720.89
5.5.250.0030.09020.63
5.5.240.0300.07020.19

preferences:
56.48 ms | 401 KiB | 5 Q