3v4l.org

run code in 300+ PHP versions simultaneously
<?php class FakeStringIntTuple { private $data = []; public function returnsCallable() { return $this; } public function __invoke(string $a, int $b) { $this->data[] = [$a, $b]; return $this; } } $tuple = (new FakeStringIntTuple())('foo', 123); var_dump($tuple); $tuple = new FakeStringIntTuple(); $tuple->returnsCallable()('bar', 456); var_dump($tuple); $tuple = (new FakeStringIntTuple()) ('foo', 123) ('bar', 456) ('baz', 789); var_dump($tuple);

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.4.20.0110.01119.19
8.4.10.0100.01019.21
8.3.150.0170.00316.99
8.3.140.0110.00720.39
8.3.130.0030.00618.59
8.3.120.0000.01019.00
8.3.110.0060.00316.73
8.3.100.0030.00618.34
8.3.90.0170.00326.77
8.3.80.0030.00716.50
8.3.70.0160.00616.63
8.3.60.0090.01218.53
8.3.50.0110.00617.45
8.3.40.0150.00318.77
8.3.30.0130.00618.62
8.3.20.0070.00721.84
8.3.10.0040.00423.60
8.3.00.0080.00023.48
8.2.260.0050.00316.91
8.2.250.0040.00416.73
8.2.240.0060.00317.43
8.2.230.0060.00320.94
8.2.220.0100.00037.54
8.2.210.0050.00326.77
8.2.200.0060.00318.16
8.2.190.0060.01216.88
8.2.180.0160.00316.63
8.2.170.0080.00818.71
8.2.160.0070.00722.96
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0070.00419.77
8.2.110.0030.00620.38
8.2.100.0080.00817.91
8.2.90.0040.00417.63
8.2.80.0060.00317.97
8.2.70.0030.00617.50
8.2.60.0040.00417.50
8.2.50.0030.00618.05
8.2.40.0090.00017.93
8.2.30.0000.00720.54
8.2.20.0080.00018.14
8.2.10.0030.00618.03
8.2.00.0040.00418.20
8.1.310.0060.01316.09
8.1.300.0040.00420.40
8.1.290.0060.00318.88
8.1.280.0040.01425.92
8.1.270.0130.00723.77
8.1.260.0080.00026.35
8.1.250.0070.00728.09
8.1.240.0070.00321.86
8.1.230.0110.00022.63
8.1.220.0080.00017.77
8.1.210.0060.00318.96
8.1.200.0060.00317.35
8.1.190.0090.00017.39
8.1.180.0030.00518.10
8.1.170.0000.00917.63
8.1.160.0000.00718.92
8.1.150.0040.00420.24
8.1.140.0040.00417.79
8.1.130.0070.00017.46
8.1.120.0030.00417.38
8.1.110.0020.00517.50
8.1.100.0040.00417.41
8.1.90.0090.00017.38
8.1.80.0000.00817.50
8.1.70.0050.00317.44
8.1.60.0080.00017.65
8.1.50.0040.00417.54
8.1.40.0040.00417.57
8.1.30.0040.00417.58
8.1.20.0000.00717.57
8.1.10.0040.00417.61
8.1.00.0040.00417.55
8.0.300.0090.00019.90
8.0.290.0030.00516.75
8.0.280.0030.00318.48
8.0.270.0040.00416.76
8.0.260.0000.00716.86
8.0.250.0000.00716.98
8.0.240.0070.00016.99
8.0.230.0040.00416.91
8.0.220.0030.00316.90
8.0.210.0080.00016.88
8.0.200.0080.00016.87
8.0.190.0020.00517.02
8.0.180.0040.00416.90
8.0.170.0030.00616.91
8.0.160.0030.00316.96
8.0.150.0000.00816.79
8.0.140.0000.00816.79
8.0.130.0000.00513.41
8.0.120.0000.00716.88
8.0.110.0000.00716.75
8.0.100.0040.00416.88
8.0.90.0040.00416.74
8.0.80.0090.00616.91
8.0.70.0050.00216.72
8.0.60.0040.00416.96
8.0.50.0040.00416.77
8.0.30.0110.00717.06
8.0.20.0100.01417.45
8.0.10.0040.00417.06
8.0.00.0120.00816.80
7.4.330.0060.00015.55
7.4.320.0040.00416.64
7.4.300.0030.00316.49
7.4.290.0000.00716.61
7.4.280.0040.00416.66
7.4.270.0070.00016.48
7.4.260.0070.00016.65
7.4.250.0040.00416.41
7.4.240.0000.00716.64
7.4.230.0030.00316.70
7.4.220.0000.00816.50
7.4.210.0000.01716.56
7.4.200.0030.00316.73
7.4.160.0080.00916.47
7.4.140.0140.00817.86
7.4.130.0120.00616.54
7.4.120.0110.00916.52
7.4.110.0170.00016.46
7.4.100.0160.00316.47
7.4.90.0070.01416.46
7.4.80.0100.01419.39
7.4.70.0100.01416.51
7.4.60.0070.01116.66
7.4.50.0090.00316.61
7.4.40.0120.00916.72
7.4.10.0100.01114.79
7.4.00.0060.00914.93
7.3.330.0000.00613.16
7.3.320.0000.00613.20
7.3.310.0030.00316.37
7.3.300.0030.00316.15
7.3.290.0040.00416.34
7.3.280.0050.01216.33
7.3.260.0100.00816.48
7.3.240.0090.01016.45
7.3.230.0060.01216.38
7.3.210.0070.01016.32
7.3.200.0070.01016.56
7.3.190.0060.01316.47
7.3.180.0030.01216.37
7.3.170.0200.00316.30
7.3.160.0060.00916.52
7.3.130.0070.01214.74
7.3.120.0100.00914.92
7.3.110.0100.00814.72
7.3.100.0040.01214.82
7.3.90.0060.01214.77
7.3.80.0070.00814.63
7.3.70.0080.00914.85
7.3.60.0090.00714.69
7.3.50.0030.01314.79
7.3.40.0060.00814.68
7.3.30.0080.00814.63
7.3.20.0080.00915.66
7.3.10.0030.01215.76
7.3.00.0020.01615.61
7.2.330.0060.01216.74
7.2.320.0140.00716.38
7.2.310.0090.00916.69
7.2.300.0120.01216.58
7.2.290.0110.00716.54
7.2.260.0080.01315.02
7.2.250.0070.01214.93
7.2.240.0040.01114.87
7.2.230.0050.01514.85
7.2.220.0080.00914.90
7.2.210.0060.01014.96
7.2.200.0050.01314.99
7.2.190.0110.00714.96
7.2.180.0090.00914.80
7.2.170.0130.00714.89
7.2.160.0060.01315.07
7.2.150.0020.01316.03
7.2.140.0080.00715.73
7.2.130.0050.01415.94
7.2.120.0100.00615.86
7.2.110.0110.00515.82
7.2.100.0130.00815.98
7.2.90.0030.01516.01
7.2.80.0080.01115.94
7.2.70.0100.00915.81
7.2.60.0080.00716.18
7.2.50.0080.01015.94
7.2.40.0140.00516.05
7.2.30.0080.01217.37
7.2.20.0100.00717.27
7.2.10.0090.00917.19
7.2.00.0050.01417.21
7.1.330.0100.00414.90
7.1.320.0110.00714.78
7.1.310.0130.00514.77
7.1.300.0080.00814.91
7.1.290.0060.01114.67
7.1.280.0110.00614.75
7.1.270.0120.00814.80
7.1.260.0080.00914.74
7.1.250.0140.00314.67
7.1.240.0090.00914.63
7.1.230.0090.01214.81
7.1.220.0440.01414.64
7.1.210.0120.01014.86
7.1.200.0060.00915.13
7.1.190.0090.00614.63
7.1.180.0090.01114.88
7.1.170.0080.00814.86
7.1.160.0140.00314.62
7.1.150.0120.00715.95
7.1.140.0070.01215.76
7.1.130.0110.00716.12
7.1.120.0120.00715.94
7.1.110.0120.01015.91
7.1.100.0120.00615.85
7.1.90.0110.00915.71
7.1.80.0050.01315.81
7.1.70.0090.00815.56
7.1.60.0130.01421.57
7.1.50.0140.01121.53
7.1.40.0150.01121.35
7.1.30.0140.01121.43
7.1.20.0170.00821.24
7.1.10.0070.00915.31
7.1.00.0060.01115.45
7.0.330.0080.00714.41
7.0.320.0130.00414.61
7.0.310.0110.00614.48
7.0.300.0060.01114.37
7.0.290.0110.00314.37
7.0.280.0110.00514.47
7.0.270.0080.00814.40
7.0.260.0050.01014.43
7.0.250.0120.00614.57
7.0.240.0120.00414.35
7.0.230.0260.00214.57
7.0.220.0100.00614.36
7.0.210.0080.00814.56
7.0.200.0070.00714.35
7.0.190.0060.01014.31
7.0.180.0070.01014.50
7.0.170.0090.00914.46
7.0.160.0060.01014.38
7.0.150.0080.00914.50
7.0.140.0120.00314.52
7.0.130.0110.00614.58
7.0.120.0080.00714.32
7.0.110.0050.01214.58
7.0.100.0120.00514.49
7.0.90.0090.00814.25
7.0.80.0100.00814.43
7.0.70.0090.00914.53
7.0.60.0080.01014.32
7.0.50.0080.00714.44
7.0.40.0070.01013.46
7.0.30.0090.00813.65
7.0.20.0100.00713.57
7.0.10.0040.01513.63
7.0.00.0090.00913.60
5.6.400.0060.01014.03
5.6.390.0090.00414.21
5.6.380.0140.00414.15
5.6.370.0090.00714.05
5.6.360.0060.01313.86
5.6.350.0060.01214.13
5.6.340.0100.00513.87
5.6.330.0090.00913.98
5.6.320.0090.01014.21
5.6.310.0090.00614.20
5.6.300.0100.01213.93
5.6.290.0090.00614.14
5.6.280.0080.00914.00
5.6.270.0010.01614.14
5.6.260.0060.00913.94
5.6.250.0130.00113.98
5.6.240.0100.00614.11
5.6.230.0060.00814.02
5.6.220.0050.01114.01
5.6.210.0110.00914.08
5.6.200.0120.00613.99
5.6.190.0130.00413.92
5.6.180.0080.01114.12
5.6.170.0120.00814.07
5.6.160.0140.00313.86
5.6.150.0080.00614.01
5.6.140.0100.00714.28
5.6.130.0090.01114.02
5.6.120.0060.01214.20
5.6.110.0150.00313.92
5.6.100.0070.00713.93
5.6.90.0090.00814.12
5.6.80.0120.00613.88
5.6.70.0120.00513.90
5.6.60.0100.00913.98
5.6.50.0080.00714.10
5.6.40.0130.00314.00
5.6.30.0080.00714.01
5.6.20.0130.00313.96
5.6.10.0110.00813.88
5.6.00.0090.00513.93

preferences:
74.85 ms | 403 KiB | 5 Q