3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = [ 'this/is/the/path/to/my/fileA.php', 'this/could/also/be/the/path/to/my/fileB.php', 'another/example/of/a/long/address/which/is/a/path/to/my/fileC.php', ]; foreach ($strings as $string) { echo implode('/', array_slice(explode('/', $string), -4)); echo "\n"; }

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.00.0130.00722.93
8.4.150.0020.00114.05
8.4.140.0140.01017.74
8.4.130.0120.00917.66
8.4.120.0120.00720.36
8.4.110.0100.01118.67
8.4.100.0130.00617.79
8.4.90.0130.00720.51
8.4.80.0080.00718.99
8.4.70.0080.00718.91
8.4.60.0140.00618.59
8.4.50.0050.00319.27
8.4.40.0030.01320.63
8.4.30.0030.01222.18
8.4.20.0090.00017.71
8.4.10.0130.00623.87
8.3.280.0110.01118.47
8.3.270.0110.00816.27
8.3.260.0130.00616.72
8.3.250.0030.00519.17
8.3.240.0120.00816.68
8.3.230.0130.00616.30
8.3.220.0080.00919.04
8.3.210.0070.00216.43
8.3.200.0090.01016.55
8.3.190.0090.01018.98
8.3.180.0080.01216.57
8.3.170.0140.00417.16
8.3.160.0060.01318.41
8.3.150.0080.01118.32
8.3.140.0030.00617.13
8.3.130.0060.00318.53
8.3.120.0060.00318.87
8.3.110.0060.00320.94
8.3.100.0070.00424.06
8.3.90.0040.01126.77
8.3.80.0060.00318.30
8.3.70.0180.00416.58
8.3.60.0060.00916.50
8.3.50.0060.00916.32
8.3.40.0070.01320.14
8.3.30.0070.00720.73
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0040.00426.16
8.2.290.0120.00619.11
8.2.280.0120.00718.59
8.2.270.0000.01317.24
8.2.260.0110.00718.16
8.2.250.0030.00516.77
8.2.240.0030.00618.92
8.2.230.0080.00022.58
8.2.220.0050.00337.54
8.2.210.0000.00926.77
8.2.200.0090.00018.15
8.2.190.0090.00916.75
8.2.180.0090.00925.92
8.2.170.0070.01018.83
8.2.160.0110.00322.96
8.2.150.0080.00025.66
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0080.00019.36
8.2.110.0060.00319.16
8.2.100.0000.01117.91
8.2.90.0030.00517.63
8.2.80.0000.00818.73
8.2.70.0000.00817.63
8.2.60.0180.00017.38
8.2.50.0170.00317.25
8.2.40.0160.00317.13
8.2.30.0160.00417.48
8.2.20.0160.00317.38
8.2.10.0160.00417.38
8.2.00.0100.00717.50
8.1.330.0090.01016.27
8.1.320.0080.01216.13
8.1.310.0050.00220.37
8.1.300.0000.00818.54
8.1.290.0090.00030.84
8.1.280.0070.01125.92
8.1.270.0000.00824.66
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0000.00919.38
8.1.230.0060.00620.88
8.1.220.0000.00818.51
8.1.210.0040.00418.77
8.1.200.0050.00317.22
8.1.190.0160.00017.25
8.1.180.0050.01117.13
8.1.170.0120.00417.13
8.1.160.0100.00617.13
8.1.150.0100.00717.13
8.1.140.0160.00016.88
8.1.130.0130.00317.25
8.1.120.0110.00517.25
8.1.110.0130.00317.38
8.1.100.0150.00417.00
8.1.90.0140.00317.22
8.1.80.0060.01117.38
8.1.70.0030.01317.09
8.1.60.0100.00717.50
8.1.50.0140.00317.25
8.1.40.0110.00617.50
8.1.30.0160.00217.35
8.1.20.0120.00617.35
8.1.10.0140.00517.13
8.1.00.0130.00417.13
8.0.300.0040.00419.78
8.0.290.0070.00016.75
8.0.280.0120.00416.62
8.0.270.0160.00016.75
8.0.260.0170.00016.63
8.0.250.0110.00616.88
8.0.240.0170.00016.52
8.0.230.0160.00016.52
8.0.220.0090.00916.52
8.0.210.0200.00016.52
8.0.200.0170.00316.63
8.0.190.0150.00416.63
8.0.180.0160.00016.52
8.0.170.0130.00316.52
8.0.160.0110.00516.63
8.0.150.0080.00816.52
8.0.140.0120.00516.52
8.0.130.0030.01316.52
8.0.120.0120.00416.52
8.0.110.0160.00016.52
8.0.100.0130.00416.52
8.0.90.0100.00716.52
8.0.80.0110.00716.52
8.0.70.0160.00016.52
8.0.60.0130.00016.90
8.0.50.0130.00416.52
8.0.30.0110.00516.52
8.0.20.0140.00216.63
8.0.10.0080.00816.52

preferences:
28.82 ms | 403 KiB | 5 Q