3v4l.org

run code in 300+ PHP versions simultaneously
<?php class integer { private $value; public function __construct(int $value) { $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.0090.00616.75
8.3.50.0090.00618.05
8.3.40.0070.00718.97
8.3.30.0040.01118.84
8.3.20.0030.00620.21
8.3.10.0040.00423.45
8.3.00.0080.00019.26
8.2.180.0100.01016.75
8.2.170.0110.00422.96
8.2.160.0060.01220.37
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0100.00019.13
8.2.120.0040.00426.35
8.2.110.0060.00319.27
8.2.100.0040.00817.78
8.2.90.0040.00419.23
8.2.80.0050.00417.97
8.2.70.0040.00417.50
8.2.60.0080.00017.93
8.2.50.0050.00318.07
8.2.40.0030.00519.34
8.2.30.0000.00720.57
8.2.20.0060.00317.75
8.2.10.0050.00318.21
8.2.00.0000.00718.01
8.1.280.0090.00925.92
8.1.270.0060.00622.14
8.1.260.0000.00728.09
8.1.250.0040.00428.09
8.1.240.0060.00322.07
8.1.230.0060.00620.94
8.1.220.0040.00417.77
8.1.210.0050.00318.77
8.1.200.0060.00317.23
8.1.190.0000.00817.25
8.1.180.0050.00318.10
8.1.170.0080.00018.77
8.1.160.0040.00421.95
8.1.150.0000.00718.95
8.1.140.0060.00319.60
8.1.130.0070.00017.63
8.1.120.0000.00717.54
8.1.110.0050.00217.48
8.1.100.0050.00317.39
8.1.90.0000.00717.49
8.1.80.0040.00417.38
8.1.70.0030.00517.44
8.1.60.0030.00617.62
8.1.50.0080.00017.55
8.1.40.0000.00817.55
8.1.30.0080.00417.68
8.1.20.0040.00417.51
8.1.10.0000.00717.50
8.1.00.0050.00617.46
8.0.300.0050.00218.77
8.0.290.0050.00316.63
8.0.280.0030.00318.46
8.0.270.0000.00717.28
8.0.260.0050.00317.21
8.0.250.0080.00016.92
8.0.240.0040.00416.95
8.0.230.0000.00716.91
8.0.220.0070.00016.88
8.0.210.0000.00816.84
8.0.200.0060.00016.90
8.0.190.0050.00216.94
8.0.180.0000.00716.91
8.0.170.0040.00416.91
8.0.160.0070.00316.98
8.0.150.0000.00716.84
8.0.140.0030.00416.84
8.0.130.0000.00613.43
8.0.120.0000.00816.87
8.0.110.0050.00316.97
8.0.100.0000.00716.90
8.0.90.0050.00316.95
8.0.80.0030.01216.95
8.0.70.0040.00416.85
8.0.60.0000.00816.80
8.0.50.0050.00316.74
8.0.30.0100.00917.03
8.0.20.0150.00417.40
8.0.10.0030.00517.00
8.0.00.0080.01016.72
7.4.330.0000.00616.77
7.4.320.0030.00316.60
7.4.300.0000.00616.67
7.4.290.0070.00016.61
7.4.280.0050.00216.49
7.4.270.0060.00016.60
7.4.260.0070.00016.52
7.4.250.0040.00416.39
7.4.240.0050.00216.54
7.4.230.0030.00316.42
7.4.220.0160.01016.56
7.4.210.0040.01116.71
7.4.200.0050.00216.58
7.4.160.0110.00416.49
7.4.150.0070.01017.40
7.4.140.0130.00717.86
7.4.130.0100.01016.50
7.4.120.0140.00316.47
7.4.110.0030.01316.37
7.4.100.0130.00416.47
7.4.90.0090.01316.52
7.4.80.0030.01319.39
7.4.70.0140.00316.48
7.4.60.0070.00716.55
7.4.50.0160.00016.40
7.4.40.0100.00616.59
7.4.30.0090.00916.61
7.4.00.0110.00414.90
7.3.330.0000.00713.46
7.3.320.0000.00513.39
7.3.310.0000.00716.41
7.3.300.0070.00016.42
7.3.290.0040.01116.28
7.3.280.0110.00616.32
7.3.270.0160.00917.40
7.3.260.0180.00616.62
7.3.250.0110.00816.45
7.3.240.0090.01216.45
7.3.230.0130.00316.46
7.3.210.0100.00616.30
7.3.200.0060.00916.45
7.3.190.0000.01616.42
7.3.180.0100.01216.39
7.3.170.0080.00816.40
7.3.160.0130.00316.58
7.3.120.0090.00614.93
7.3.110.0100.00614.78
7.3.100.0060.01014.71
7.3.90.0080.00814.79
7.3.80.0070.01014.83
7.3.70.0030.01314.69
7.3.60.0060.00914.92
7.3.50.0040.01214.75
7.3.40.0040.00814.69
7.3.30.0060.00614.43
7.3.20.0080.00416.65
7.3.10.0140.00516.63
7.3.00.0140.00616.53
7.2.330.0060.01016.59
7.2.320.0090.01216.63
7.2.310.0070.01016.61
7.2.300.0090.00916.67
7.2.290.0110.00616.79
7.2.240.0030.01014.61
7.2.230.0130.00315.04
7.2.220.0040.01214.90
7.2.210.0080.00815.17
7.2.200.0070.00415.00
7.2.190.0060.00614.82
7.2.180.0110.00715.15
7.2.170.0040.00714.84
7.2.160.0060.00614.73
7.2.150.0030.01116.80
7.2.140.0070.00716.88
7.2.130.0060.01116.79
7.2.120.0090.01016.84
7.2.110.0090.01316.72
7.2.100.0080.00916.78
7.2.90.0090.01116.63
7.2.80.0070.00716.65
7.2.70.0070.01316.96
7.2.60.0060.01416.79
7.2.50.0100.00916.74
7.2.40.0110.00216.98
7.2.30.0080.00616.73
7.2.20.0070.00616.85
7.2.10.0110.00616.77
7.2.00.0050.00717.72
7.1.330.0090.00616.00
7.1.320.0040.01115.91
7.1.310.0070.01015.83
7.1.300.0040.01115.64
7.1.290.0090.00615.71
7.1.280.0030.01515.77
7.1.270.0000.00915.58
7.1.260.0070.00815.84
7.1.250.0080.00815.75
7.1.200.0070.00715.38
7.1.100.0060.00618.27
7.1.70.0080.00417.02
7.1.60.0110.01119.48
7.1.50.0100.00016.88
7.1.00.0030.07722.33
7.0.200.0030.00316.54
7.0.60.0130.06719.91
7.0.50.0070.04317.86
7.0.40.0130.03720.11
7.0.30.0200.05320.09
7.0.20.0370.06720.16
7.0.10.0030.04720.12
7.0.00.0030.09020.21
5.6.280.0070.04021.13
5.6.210.0170.07720.52
5.6.200.0030.07018.11
5.6.190.0030.08020.50
5.6.180.0300.05320.61
5.6.170.0400.07020.55
5.6.160.0070.04020.54
5.6.150.0100.07318.19
5.6.140.0000.06018.21
5.6.130.0030.05718.16
5.6.120.0000.04720.99
5.6.110.0100.08721.01
5.6.100.0130.08021.00
5.6.90.0070.08720.89
5.6.80.0070.07020.52
5.5.350.4300.04020.36
5.5.340.0130.07318.04
5.5.330.0170.07020.42
5.5.320.0100.05020.31
5.5.310.0270.05320.30
5.5.300.0100.06317.98
5.5.290.0030.08017.92
5.5.280.0030.06720.88
5.5.270.0070.06720.87
5.5.260.0170.07020.65
5.5.250.0070.04720.69
5.5.240.0270.06020.36

preferences:
41.63 ms | 400 KiB | 5 Q