3v4l.org

run code in 300+ PHP versions simultaneously
<?php function create_path($hash) { return preg_replace('#\w\K((?<=\w{5}).+)?#', '/', strtolower($hash)); } // will output something like "a/h/q/6/d/" echo create_path('aHq6dc93d7b');

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.130.0030.00617.84
8.4.120.0080.01222.74
8.4.110.0070.00819.04
8.4.100.0140.00718.00
8.4.90.0120.00818.06
8.4.80.0050.00317.86
8.4.70.0100.00717.81
8.4.60.0070.00217.85
8.4.50.0120.00919.65
8.4.40.0110.00719.98
8.4.30.0130.00618.75
8.4.20.0130.00718.06
8.4.10.0070.01023.84
8.3.260.0100.01016.66
8.3.250.0130.00718.98
8.3.240.0110.00916.79
8.3.230.0040.00516.77
8.3.220.0120.00616.95
8.3.210.0110.00816.72
8.3.200.0100.00918.70
8.3.190.0090.01016.83
8.3.180.0110.00918.36
8.3.170.0140.00417.04
8.3.160.0110.00718.82
8.3.150.0060.01220.73
8.3.140.0130.00616.47
8.3.130.0080.00318.54
8.3.120.0050.00520.70
8.3.110.0040.00416.67
8.3.100.0090.00018.50
8.3.90.0040.00426.77
8.3.80.0100.00016.63
8.3.70.0120.00916.88
8.3.60.0040.01216.88
8.3.50.0090.00620.48
8.3.40.0070.01320.26
8.3.30.0090.00918.84
8.3.20.0040.00424.18
8.3.10.0030.00524.66
8.3.00.0080.00026.16
8.2.290.0100.00920.30
8.2.280.0110.00718.49
8.2.270.0120.00618.80
8.2.260.0140.00318.83
8.2.250.0060.01216.57
8.2.240.0030.01516.58
8.2.230.0080.00820.94
8.2.220.0040.00424.06
8.2.210.0070.00026.77
8.2.200.0040.00718.79
8.2.190.0040.01116.88
8.2.180.0130.00725.92
8.2.170.0110.00319.03
8.2.160.0040.01822.96
8.2.150.0080.00025.66
8.2.140.0060.00324.66
8.2.130.0000.00726.16
8.2.120.0040.00419.48
8.2.110.0090.00022.35
8.2.100.0070.01017.84
8.2.90.0060.00318.16
8.2.80.0050.00318.91
8.2.70.0040.00417.48
8.2.60.0000.00817.80
8.2.50.0040.00418.07
8.2.40.0000.00818.03
8.2.30.0040.00418.07
8.2.20.0040.00420.70
8.2.10.0040.00417.95
8.2.00.0040.00419.13
8.1.330.0100.00916.74
8.1.320.0080.01115.95
8.1.310.0070.01116.89
8.1.300.0060.00916.84
8.1.290.0110.00030.84
8.1.280.0120.00625.92
8.1.270.0030.00524.66
8.1.260.0030.01026.35
8.1.250.0080.00028.09
8.1.240.0090.00023.96
8.1.230.0070.00318.99
8.1.220.0040.00417.74
8.1.210.0080.00018.77
8.1.200.0060.00317.35
8.1.190.0000.00717.22
8.1.180.0030.00618.10
8.1.170.0030.00618.70
8.1.160.0050.00218.83
8.1.150.0000.00918.66
8.1.140.0000.00717.46
8.1.130.0050.00317.38
8.1.120.0070.00217.35
8.1.110.0080.00617.35
8.1.100.0070.00717.47
8.1.90.0110.00417.46
8.1.80.0150.00017.52
8.1.70.0120.00417.52
8.1.60.0150.00317.70
8.1.50.0120.00417.60
8.1.40.0130.00317.71
8.1.30.0140.00317.60
8.1.20.0170.00017.69
8.1.10.0060.01117.46
8.1.00.0130.00317.53
8.0.300.0040.00418.77
8.0.290.0070.00016.88
8.0.280.0040.00418.47
8.0.270.0070.00017.29
8.0.260.0050.00317.07
8.0.250.0120.00417.00
8.0.240.0000.01516.96
8.0.230.0120.00416.83
8.0.220.0100.00716.70
8.0.210.0090.00516.79
8.0.200.0080.00816.78
8.0.190.0130.00316.79
8.0.180.0060.00916.80
8.0.170.0110.00416.88
8.0.160.0160.00016.90
8.0.150.0080.00816.82
8.0.140.0130.00316.85
8.0.130.0100.00516.74
8.0.120.0170.00016.87
8.0.110.0170.00016.82
8.0.100.0090.00616.79
8.0.90.0070.00716.75
8.0.80.0140.00016.90
8.0.70.0050.01016.70
8.0.60.0060.00616.70
8.0.50.0120.00216.86
8.0.30.0140.00016.79
8.0.20.0140.00016.81
8.0.10.0110.00316.89
7.4.330.0090.00314.29
7.4.320.0060.00916.49
7.4.300.0080.00816.43
7.4.290.0110.00516.54
7.4.280.0140.00216.53
7.4.270.0150.00016.58
7.4.260.0110.00516.45
7.4.250.0160.00016.55
7.4.240.0160.00016.47
7.4.230.0050.01116.61
7.4.220.0140.00016.54
7.4.210.0100.00316.57
7.4.200.0110.00216.61
7.4.190.0110.00216.61
7.4.180.0140.00016.64
7.4.160.0120.00216.50
7.4.150.0090.00416.56
7.4.140.0040.00916.56
7.4.130.0070.00716.52
7.4.120.0070.00416.53
7.4.110.0110.00316.55
7.4.100.0040.00816.59
7.4.90.0070.00216.44
7.4.80.0050.00516.45
7.4.70.0060.00218.23
7.4.60.0040.00418.26
7.4.50.0030.00518.21
7.4.40.0080.00018.38
7.4.30.0090.00018.25
7.4.20.0030.00518.32
7.4.10.0080.00018.18
7.4.00.0000.00818.34

preferences:
28.49 ms | 403 KiB | 5 Q