3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function __toString() { static $i = 0; return (string) $i++; } } function test(string $foo = new Foo() . '') { var_dump($foo); } test(); test(); test();

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.120.0140.00620.56
8.4.110.0150.00718.80
8.4.100.0140.00717.70
8.4.90.0110.01117.39
8.4.80.0050.00322.49
8.4.70.0120.01017.79
8.4.60.0140.00618.78
8.4.50.0110.01022.32
8.4.40.0100.01019.39
8.4.30.0200.00318.79
8.4.20.0030.00619.66
8.4.10.0100.00723.77
8.3.250.0040.00418.79
8.3.240.0040.00416.43
8.3.230.0120.00816.39
8.3.220.0120.00617.20
8.3.210.0120.00716.95
8.3.200.0050.00416.78
8.3.190.0030.00517.34
8.3.180.0120.00718.79
8.3.170.0070.00016.87
8.3.160.0100.01019.01
8.3.150.0150.00417.10
8.3.140.0080.00016.60
8.3.130.0060.00318.59
8.3.120.0090.00018.95
8.3.110.0040.00422.58
8.3.100.0050.00522.58
8.3.50.0060.00322.58
8.3.30.0210.00522.96
8.3.20.0120.00622.96
8.3.10.0150.00422.96
8.3.00.0130.00622.96
8.2.290.0090.00920.28
8.2.280.0120.00818.57
8.2.270.0090.00918.91
8.2.260.0050.00316.33
8.2.250.0000.00816.68
8.2.240.0100.00016.96
8.2.230.0110.00022.58
8.2.220.0080.00022.58
8.2.160.0190.01122.96
8.2.150.0090.00622.96
8.2.140.0130.00722.96
8.2.130.0100.01022.96
8.2.120.0130.00722.96
8.2.110.0130.00722.96
8.2.100.0080.01122.96
8.2.90.0130.00322.96
8.2.80.0070.00722.96
8.2.70.0100.00622.96
8.2.60.0040.01122.96
8.2.50.0120.00322.96
8.2.40.0000.01522.96
8.2.30.0090.00622.96
8.2.20.0120.00322.96
8.2.10.0090.00622.96
8.2.00.0090.00622.96
8.1.330.0120.00716.55
8.1.320.0150.00418.00
8.1.310.0000.00816.67
8.1.300.0060.00918.35
8.1.270.0150.00022.96
8.1.260.0140.00322.96
8.1.250.0030.01022.96
8.1.240.0070.00722.96
8.1.230.0070.01322.96
8.1.220.0110.00722.96
8.1.210.0110.00322.96
8.1.200.0110.00322.96
8.1.190.0070.00722.96
8.1.180.0040.01122.96
8.1.170.0140.00322.96
8.1.160.0100.00622.96
8.1.150.0060.00922.96
8.1.140.0200.00322.96
8.1.130.0110.00322.96
8.1.120.0080.00518.97
8.1.110.0070.00718.69
8.1.100.0070.00718.67
8.1.90.0090.00618.41
8.1.80.0090.00518.43
8.1.70.0100.00518.67
8.1.60.0090.00618.76
8.1.50.0100.00418.71
8.1.40.0110.00419.04
8.1.30.0080.00718.84
8.1.20.0110.00418.54
8.1.10.0120.00618.54
8.1.00.0130.00721.10
8.0.300.0160.00322.96
8.0.290.0190.00622.96
8.0.280.0330.00722.96
8.0.270.0100.00722.96
8.0.260.0100.01422.96
8.0.250.0100.00717.80
8.0.240.0100.00518.06
8.0.230.0110.00418.09
8.0.220.0110.00418.03
8.0.210.0110.00418.26
8.0.200.0120.00317.80
8.0.190.0130.00417.82
8.0.180.0100.00517.79
8.0.170.0120.00517.81
8.0.160.0110.00517.76
8.0.150.0150.00317.77
8.0.140.0150.00317.76
8.0.130.0110.00517.67
8.0.120.0140.00417.80
8.0.110.0080.00717.74
8.0.100.0120.00517.66
8.0.90.0140.00418.01
8.0.80.0110.00517.72
8.0.70.0100.00417.69
8.0.60.0090.00617.69
8.0.50.0130.00317.69
8.0.30.0100.00517.72
8.0.20.0120.00417.73
8.0.10.0110.00517.82
7.4.330.0090.00415.75
7.4.320.0120.00417.38
7.4.300.0130.00417.33
7.4.290.0140.00417.33
7.4.280.0160.00317.60
7.4.270.0180.00117.42
7.4.260.0130.00517.34
7.4.250.0120.00517.42
7.4.240.0130.00617.41
7.4.230.0150.00317.37
7.4.220.0110.00517.38
7.4.210.0140.00417.35
7.4.200.0120.00517.31
7.4.190.0090.00717.47
7.4.180.0100.00617.29
7.4.160.0130.00317.44
7.4.150.0110.00417.39
7.4.140.0090.00517.24
7.4.130.0090.00417.27
7.4.120.0110.00417.29
7.4.110.0090.00517.26
7.4.100.0100.00517.54
7.4.90.0080.00617.55
7.4.80.0090.00517.56
7.4.70.0120.00317.53
7.4.60.0080.00617.52
7.4.50.0090.00517.47
7.4.40.0110.00417.53
7.4.30.0090.00417.44
7.4.20.0070.00617.55
7.4.10.0110.00317.52
7.4.00.0100.00720.05

preferences:
27.87 ms | 403 KiB | 5 Q