3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Foo { public function bar(int $a): int { return $a * 2; } } $foo = new Foo(); echo $foo->bar("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.5.90.0100.00516.95
8.5.80.0120.00516.80
8.5.70.0090.00416.74
8.5.60.0110.00818.54
8.5.50.0120.00416.68
8.5.30.0080.01019.59
8.5.20.0120.00620.11
8.5.10.0090.00919.42
8.5.00.0150.00622.86
8.4.240.0110.01019.52
8.4.230.0070.00419.52
8.4.220.0160.00619.50
8.4.210.0090.01221.48
8.4.180.0140.00919.78
8.4.170.0110.00923.78
8.4.160.0140.00823.75
8.4.150.0070.00616.81
8.4.140.0140.00717.69
8.4.130.0140.00818.02
8.4.120.0120.00722.26
8.4.110.0100.01022.36
8.4.100.0120.00917.81
8.4.90.0170.00322.41
8.4.80.0050.00320.32
8.4.70.0130.00717.88
8.4.60.0100.01018.98
8.4.50.0160.00520.54
8.4.40.0060.01320.70
8.4.30.0160.00020.73
8.4.20.0170.00319.64
8.4.10.0040.01524.09
8.3.330.0120.00818.27
8.3.320.0040.00818.32
8.3.310.0080.00818.55
8.3.300.0110.00920.80
8.3.290.0150.00818.29
8.3.280.0130.00818.38
8.3.270.0090.01116.53
8.3.260.0140.00516.57
8.3.250.0120.00720.91
8.3.240.0130.00616.39
8.3.230.0040.00616.23
8.3.220.0130.00619.04
8.3.210.0140.00416.74
8.3.200.0060.00316.44
8.3.190.0060.00817.30
8.3.180.0130.00616.46
8.3.170.0140.00317.11
8.3.160.0100.00620.02
8.3.150.0100.01018.91
8.3.140.0110.00720.66
8.3.130.0060.00918.34
8.3.120.0030.00618.95
8.3.110.0060.00320.94
8.3.100.0040.01816.66
8.3.90.0090.00920.21
8.3.80.0040.00418.18
8.3.70.0090.00616.50
8.3.60.0180.00018.19
8.3.50.0140.00718.22
8.3.40.0150.00022.05
8.3.30.0150.00019.24
8.3.20.0040.00424.18
8.3.10.0030.00524.66
8.3.00.0080.00026.16
8.2.320.0100.01217.98
8.2.310.0160.00718.04
8.2.300.0130.01217.82
8.2.290.0110.00520.46
8.2.280.0110.00818.23
8.2.270.0140.00417.13
8.2.260.0030.00616.82
8.2.250.0060.00316.69
8.2.240.0030.00617.37
8.2.230.0040.00422.58
8.2.220.0050.01024.06
8.2.210.0140.00426.77
8.2.200.0060.00318.29
8.2.190.0060.00816.58
8.2.180.0090.00618.30
8.2.170.0090.00618.89
8.2.160.0110.00322.96
8.2.150.0070.00025.66
8.2.140.0000.00824.66
8.2.130.0070.00026.16
8.2.120.0050.00321.05
8.2.110.0000.01122.20
8.2.100.0040.00720.47
8.1.340.0090.01019.97
8.1.330.0090.01021.86
8.1.320.0100.00816.17
8.1.310.0100.00318.23
8.1.300.0080.00318.39
8.1.290.0030.00618.88
8.1.280.0100.01025.92
8.1.270.0040.00424.66
8.1.260.0080.00026.35
8.1.250.0000.00728.09
8.1.240.0000.01018.87
8.1.230.0030.00618.48
8.1.190.0050.00917.00

preferences:
79.17 ms | 898 KiB | 5 Q