3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); /** * @param Foo|callable $x * @return string */ function process(callable $x): string { return $x(); } class Foo { public function __invoke(): string { return 'I know kung fu!'; } } echo process(new Foo()); echo process(function(): int { return 42; });

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.130.0000.00818.58
8.3.120.0090.00018.79
8.3.110.0040.00420.94
8.3.100.0060.00324.06
8.3.90.0110.00426.77
8.3.80.0030.00718.55
8.3.70.0060.00918.68
8.3.60.0030.01416.38
8.3.50.0100.00822.05
8.3.40.0070.00718.71
8.3.30.0110.00318.68
8.3.20.0080.00020.76
8.3.10.0040.00421.91
8.3.00.0050.00319.51
8.2.250.0040.00418.70
8.2.240.0060.00318.71
8.2.230.0090.00022.58
8.2.220.0120.00637.54
8.2.210.0000.00826.77
8.2.200.0090.00318.41
8.2.190.0140.00716.63
8.2.180.0140.00716.75
8.2.170.0070.01022.96
8.2.160.0070.00720.53
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0080.00018.03
8.2.120.0080.00026.35
8.2.110.0100.00022.21
8.2.100.0120.00017.91
8.2.90.0050.00317.84
8.2.80.0040.00417.97
8.2.70.0000.00818.05
8.2.60.0000.00818.04
8.2.50.0030.00618.10
8.2.40.0020.00720.33
8.2.30.0040.00419.32
8.2.20.0000.00817.94
8.2.10.0000.00717.97
8.2.00.0040.00417.74
8.1.300.0000.00817.80
8.1.290.0060.00318.88
8.1.280.0140.00325.92
8.1.270.0070.00022.16
8.1.260.0050.00326.35
8.1.250.0060.00328.09
8.1.240.0000.00820.97
8.1.230.0080.00322.62
8.1.220.0080.00017.78
8.1.210.0060.00318.92
8.1.200.0090.00017.36
8.1.190.0050.00317.11
8.1.180.0040.00418.10
8.1.170.0040.00420.80
8.1.160.0070.00418.73
8.1.150.0000.00720.23
8.1.140.0040.00419.42
8.1.130.0070.00018.87
8.1.120.0040.00417.32
8.1.110.0040.00417.41
8.1.100.0040.00417.44
8.1.90.0020.00517.29
8.1.80.0070.00017.28
8.1.70.0070.00017.42
8.1.60.0000.00817.42
8.1.50.0040.00417.46
8.1.40.0020.00517.46
8.1.30.0040.00417.64
8.1.20.0040.00417.55
8.1.10.0040.00417.52
8.1.00.0040.00417.43
8.0.300.0040.00420.03
8.0.290.0090.00016.63
8.0.280.0000.00718.45
8.0.270.0000.00717.14
8.0.260.0000.00717.18
8.0.250.0070.00017.06
8.0.240.0050.00317.02
8.0.230.0070.00016.91
8.0.220.0040.00416.85
8.0.210.0070.00016.83
8.0.200.0000.00817.02
8.0.190.0000.00716.96
8.0.180.0040.00417.01
8.0.170.0050.00316.91
8.0.160.0040.00416.96
8.0.150.0000.00716.89
8.0.140.0050.00216.86
8.0.130.0000.00613.39
8.0.120.0040.00416.82
8.0.110.0030.00516.83
8.0.100.0040.00416.87
8.0.90.0040.00417.03
8.0.80.0030.01116.99
8.0.70.0040.00416.83
8.0.60.0000.00816.95
8.0.50.0000.00716.89
8.0.30.0100.00917.05
8.0.20.0110.00817.40
8.0.10.0030.00517.09
8.0.00.0030.01316.68
7.4.330.0000.00515.55
7.4.320.0070.00016.62
7.4.300.0000.00616.59
7.4.290.0040.00416.41
7.4.280.0000.00816.57
7.4.270.0000.00716.53
7.4.260.0000.00716.59
7.4.250.0060.00316.59
7.4.240.0000.00716.51
7.4.230.0070.00016.40
7.4.220.0110.00716.64
7.4.210.0140.00016.68
7.4.200.0000.00716.69
7.4.160.0080.01116.47
7.4.150.0080.01117.40
7.4.140.0090.00817.86
7.4.130.0080.00916.65
7.4.120.0140.00316.60
7.4.110.0060.01316.52
7.4.100.0040.01216.63
7.4.90.0090.00616.73
7.4.80.0070.01019.37
7.4.70.0140.00416.66
7.4.60.0180.00016.51
7.4.50.0030.01016.43
7.4.40.0110.00716.30
7.4.30.0120.00916.39
7.4.00.0070.00714.79
7.3.330.0050.00013.19
7.3.320.0000.00513.32
7.3.310.0030.00316.35
7.3.300.0030.00316.22
7.3.290.0070.00816.33
7.3.280.0070.01216.34
7.3.270.0090.00817.40
7.3.260.0060.01116.53
7.3.250.0090.00816.53
7.3.240.0100.01116.32
7.3.230.0000.01916.56
7.3.210.0030.01316.48
7.3.200.0070.01016.49
7.3.190.0130.00316.43
7.3.180.0100.00716.29
7.3.170.0110.00516.36
7.3.160.0140.00716.44
7.3.120.0070.00714.86
7.3.110.0030.01014.75
7.3.100.0030.01314.74
7.3.90.0030.00714.91
7.3.80.0070.00714.65
7.3.70.0030.01014.66
7.3.60.0030.01414.78
7.3.50.0090.00614.68
7.3.40.0110.00314.78
7.3.30.0070.00714.86
7.3.20.0070.00716.53
7.3.10.0040.01116.70
7.3.00.0040.01216.42
7.2.330.0140.00516.35
7.2.320.0030.01716.64
7.2.310.0030.01416.43
7.2.300.0100.01016.47
7.2.290.0110.01116.57
7.2.240.0090.00615.06
7.2.230.0080.00415.10
7.2.220.0030.01014.58
7.2.210.0000.01415.19
7.2.200.0030.01215.01
7.2.190.0050.00515.05
7.2.180.0000.01614.87
7.2.170.0030.01314.67
7.2.160.0110.00714.82
7.2.150.0030.00916.82
7.2.140.0090.00616.47
7.2.130.0090.00616.79
7.2.120.0060.00916.94
7.2.110.0060.00616.72
7.2.100.0060.00616.85
7.2.90.0060.00616.75
7.2.80.0060.00916.87
7.2.70.0100.00316.80
7.2.60.0110.00516.80
7.2.50.0070.00716.95
7.2.40.0000.01517.05
7.2.30.0060.00616.95
7.2.20.0090.00616.55
7.2.10.0100.00316.84
7.2.00.0100.00616.75
7.1.330.0030.00715.55
7.1.320.0070.00715.53
7.1.310.0030.01015.50
7.1.300.0060.00915.68
7.1.290.0060.00315.79
7.1.280.0040.00415.50
7.1.270.0000.01415.71
7.1.260.0000.00915.59
7.1.250.0070.01015.80
7.1.200.0100.00615.60
7.1.70.0040.00416.80
7.1.60.0000.01117.21
7.1.50.0040.01816.89
7.1.00.0370.06020.85
7.0.200.0030.01316.71
7.0.140.0300.05720.31
7.0.130.0430.06020.30
7.0.120.0370.05720.34
7.0.110.0530.07320.14
7.0.100.0300.07320.36
7.0.90.0600.07020.36
7.0.80.0670.06720.38
7.0.70.0470.06020.18
7.0.60.0570.05720.32
7.0.50.0600.06020.18
7.0.40.0430.06320.34
7.0.30.0470.06020.25
7.0.20.0830.07320.20
7.0.10.0530.05320.20
7.0.00.0530.05720.36
5.6.290.0100.05320.91
5.6.280.0130.05021.14
5.6.270.0130.05721.05
5.6.260.0130.05721.11
5.6.250.0200.05721.09
5.6.240.0200.07021.16
5.6.230.0130.06020.84
5.6.220.0000.06720.76
5.6.210.0100.07720.98
5.6.200.0070.06321.09
5.6.190.0100.06321.05
5.6.180.0230.07321.07
5.6.170.0100.08320.74
5.6.160.0200.05321.03
5.6.150.0070.07321.04
5.6.140.0170.07020.82
5.6.130.0100.07021.05
5.6.120.0200.06720.82
5.6.110.0130.08321.02
5.6.100.0130.08320.98
5.6.90.0100.06020.84
5.6.80.0100.05320.44
5.6.70.0170.05720.29
5.6.60.0100.07320.46
5.6.50.0300.07020.38
5.6.40.0100.08020.10
5.6.30.0030.08720.41
5.6.20.0200.07020.42
5.6.10.0000.07020.23
5.6.00.0130.06320.38

preferences:
26.89 ms | 403 KiB | 5 Q