3v4l.org

run code in 300+ PHP versions simultaneously
<?php function my_length(string $a): int { var_dump(memory_get_peak_usage()); return strlen($a); } $a = str_repeat("a", 100_000); var_dump(memory_get_peak_usage()); my_length($a);

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.30.0090.00819.48
8.5.20.0120.00619.54
8.5.10.0090.00920.26
8.5.00.0090.01419.92
8.4.180.0100.01125.52
8.4.170.0140.00724.00
8.4.160.0140.00924.02
8.4.150.0100.00316.91
8.4.140.0140.00817.62
8.4.130.0040.00817.85
8.4.120.0020.00624.44
8.4.110.0110.00922.47
8.4.100.0140.00618.78
8.4.90.0090.01018.74
8.4.80.0110.00820.42
8.4.70.0140.00618.16
8.4.60.0080.01218.91
8.4.50.0140.00618.71
8.4.40.0100.00920.28
8.4.30.0170.00318.64
8.4.20.0120.00825.88
8.4.10.0040.00423.65
8.3.300.0080.01222.85
8.3.290.0140.00720.06
8.3.280.0110.00918.23
8.3.270.0100.01116.51
8.3.260.0120.00916.50
8.3.250.0140.00518.90
8.3.240.0090.01017.35
8.3.230.0110.00719.05
8.3.220.0090.01019.16
8.3.210.0110.00716.86
8.3.200.0090.00016.92
8.3.190.0140.00917.32
8.3.180.0100.00517.09
8.3.170.0140.00318.99
8.3.160.0130.00716.98
8.3.150.0040.01117.28
8.3.140.0140.00416.57
8.3.130.0090.00018.29
8.3.120.0030.00720.65
8.3.110.0000.00820.94
8.3.100.0050.00316.86
8.3.90.0060.01226.77
8.3.80.0000.00918.18
8.3.70.0030.01716.63
8.3.60.0140.00416.46
8.3.50.0070.01116.81
8.3.40.0070.01020.34
8.3.30.0110.00318.54
8.3.20.0080.00024.18
8.3.10.0040.00424.66
8.3.00.0040.00426.16
8.2.300.0130.00717.96
8.2.290.0110.00920.57
8.2.280.0130.00618.60
8.2.270.0140.00417.40
8.2.260.0110.00416.50
8.2.250.0030.00618.32
8.2.240.0090.00019.21
8.2.230.0030.00622.58
8.2.220.0000.00924.06
8.2.210.0080.00026.77
8.2.200.0060.00316.88
8.2.190.0090.00616.75
8.2.180.0080.00818.29
8.2.170.0070.01118.94
8.2.160.0100.00322.96
8.2.150.0000.00725.66
8.2.140.0080.00024.66
8.2.130.0000.00826.16
8.2.120.0080.00026.16
8.2.110.0050.00519.42
8.2.100.0080.00418.03
8.2.90.0040.00419.30
8.2.80.0050.00317.97
8.2.70.0030.00517.61
8.2.60.0000.00919.76
8.2.50.0050.00318.07
8.2.40.0040.00421.18
8.2.30.0040.00417.90
8.2.20.0040.00419.33
8.2.10.0000.00718.05
8.2.00.0170.00018.67
8.1.340.0110.00817.71
8.1.330.0110.00722.10
8.1.320.0140.00516.09
8.1.310.0110.00418.64
8.1.300.0000.00918.63
8.1.290.0000.01130.84
8.1.280.0110.00725.92
8.1.270.0090.00024.66
8.1.260.0000.00726.35
8.1.250.0070.00028.09
8.1.240.0090.00022.18
8.1.230.0110.00917.64
8.1.220.0060.00317.76
8.1.210.0030.00518.77
8.1.200.0000.00817.13
8.1.190.0060.00317.35
8.1.180.0000.00818.10
8.1.170.0000.00818.59
8.1.160.0030.00618.96
8.1.150.0000.00718.62
8.1.140.0040.00817.53
8.1.130.0110.00418.61
8.1.120.0130.00318.48
8.1.110.0080.00818.64
8.1.100.0100.00518.59
8.1.90.0050.01118.57
8.1.80.0040.01218.62
8.1.70.0130.00318.54
8.1.60.0110.00618.76
8.1.50.0150.00318.70
8.1.40.0210.00418.86
8.1.30.0210.00018.78
8.1.20.0170.00318.86
8.1.10.0190.00018.79
8.1.00.0170.00218.62
8.0.300.0050.00318.77
8.0.290.0040.00416.75
8.0.280.0000.00818.48
8.0.270.0040.00417.28
8.0.260.0110.00417.87
8.0.250.0080.00817.97
8.0.240.0150.00418.06
8.0.230.0120.00618.04
8.0.220.0100.00817.90
8.0.210.0100.00717.84
8.0.200.0110.00618.03
8.0.190.0070.01018.02
8.0.180.0090.00917.94
8.0.170.0090.00918.09
8.0.160.0090.00917.92
8.0.150.0160.00317.89
8.0.140.0110.00618.06
8.0.130.0140.00417.84
8.0.120.0060.01118.00
8.0.110.0050.01117.93
8.0.100.0120.00617.87
8.0.90.0120.00617.92
8.0.80.0120.00617.95
8.0.70.0160.00217.82
8.0.60.0100.00717.82
8.0.50.0130.00417.83
8.0.30.0160.00017.84
8.0.20.0130.00318.02
8.0.10.0110.00418.14

preferences:
40.61 ms | 1100 KiB | 5 Q