3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dir_root = '/coucou/test/install/../'; $dir = '/coucou/test/../images/logo/0'; if (strpos($dir, $dir_root) === 0) { $dir = './' . substr($dir, strlen(DIR_ROOT) + 1); echo $dir; }

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.3.60.0070.01318.31
8.3.50.0090.01121.81
8.3.40.0110.00418.84
8.3.30.0120.00318.57
8.3.20.0000.00720.38
8.3.10.0000.00820.34
8.3.00.0040.00421.90
8.2.180.0110.00316.50
8.2.170.0120.00322.96
8.2.160.0140.00322.21
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0100.00021.08
8.2.120.0040.00426.35
8.2.110.0060.00320.90
8.2.100.0090.00317.79
8.2.90.0080.00019.09
8.2.80.0080.00017.97
8.2.70.0030.00617.13
8.2.60.0050.00317.80
8.2.50.0000.00918.09
8.2.40.0070.00420.51
8.2.30.0090.00019.42
8.2.20.0030.00517.73
8.2.10.0080.00017.86
8.2.00.0000.00717.99
8.1.280.0070.01025.92
8.1.270.0000.00823.99
8.1.260.0000.00728.09
8.1.250.0040.00428.09
8.1.240.0060.00322.47
8.1.230.0030.00917.83
8.1.220.0060.00317.74
8.1.210.0040.00418.77
8.1.200.0060.00317.36
8.1.190.0020.00517.22
8.1.180.0000.00718.10
8.1.170.0040.00718.38
8.1.160.0030.00320.70
8.1.150.0040.00418.75
8.1.140.0000.00819.51
8.1.130.0000.00717.26
8.1.120.0070.00017.46
8.1.110.0050.00317.41
8.1.100.0050.00317.32
8.1.90.0070.00017.43
8.1.80.0030.00317.29
8.1.70.0070.00017.40
8.1.60.0000.00917.47
8.1.50.0050.00317.42
8.1.40.0060.00317.46
8.1.30.0040.00417.57
8.1.20.0050.00317.46
8.1.10.0040.00417.43
8.1.00.0070.00317.51
8.0.300.0070.00018.77
8.0.290.0000.00716.58
8.0.280.0040.00418.33
8.0.270.0030.00317.19
8.0.260.0030.00516.74
8.0.250.0000.00716.93
8.0.240.0060.00016.88
8.0.230.0030.00316.88
8.0.220.0000.00716.74
8.0.210.0030.00516.78
8.0.200.0040.00416.79
8.0.190.0080.00316.82
8.0.180.0040.00416.71
8.0.170.0090.00016.82
8.0.160.0040.00416.81
8.0.150.0040.00416.84
8.0.140.0050.00316.69
8.0.130.0050.00013.27
8.0.120.0040.00416.81
8.0.110.0000.00716.79
8.0.100.0020.00516.72
8.0.90.0040.00416.73
8.0.80.0040.01116.77
8.0.70.0000.00716.69
8.0.60.0060.00316.72
8.0.50.0040.00416.80
8.0.30.0100.00817.00
8.0.20.0100.00817.40
8.0.10.0040.00416.75
8.0.00.0090.00816.63
7.4.330.0000.00616.84
7.4.320.0000.00716.60
7.4.300.0000.00716.52
7.4.290.0060.00016.58
7.4.280.0080.00016.58
7.4.270.0000.01016.47
7.4.260.0020.00516.48
7.4.250.0020.00516.35
7.4.240.0040.00416.50
7.4.230.0070.00016.62
7.4.220.0140.00716.66
7.4.210.0110.00416.52
7.4.200.0040.00416.29
7.4.160.0120.00416.42
7.4.150.0090.00917.40
7.4.140.0150.00717.86
7.4.130.0150.00616.51
7.4.120.0100.01016.50
7.4.110.0070.01116.55
7.4.100.0130.01016.32
7.4.90.0060.01216.50
7.4.80.0090.00919.39
7.4.70.0070.01016.43
7.4.60.0030.01316.47
7.4.50.0050.00716.60
7.4.40.0070.00916.48
7.4.30.0040.01316.32
7.4.00.0000.01514.82
7.3.330.0000.00512.93
7.3.320.0060.00013.00
7.3.310.0000.00716.10
7.3.300.0080.00016.20
7.3.290.0080.00916.19
7.3.280.0080.00816.24
7.3.270.0100.00717.40
7.3.260.0080.00816.13
7.3.250.0120.00516.20
7.3.240.0120.00416.19
7.3.230.0150.00616.39
7.3.210.0130.00916.46
7.3.200.0150.00016.16
7.3.190.0060.00916.45
7.3.180.0150.00616.41
7.3.170.0060.01316.16
7.3.160.0170.00416.33
7.2.330.0130.00616.56
7.2.320.0190.00316.59
7.2.310.0150.00816.36
7.2.300.0170.00716.24
7.2.290.0060.01216.50
7.1.200.0060.00615.38
7.1.70.0000.01517.01
7.1.60.0140.01119.27
7.1.50.0030.01716.96
7.1.00.0100.07022.41
7.0.200.0030.00616.53
7.0.60.0070.08721.73
7.0.50.0030.05017.85
7.0.40.0130.07720.23
7.0.30.0270.03720.16
7.0.20.0230.07020.21
7.0.10.0130.07320.18
7.0.00.0130.08320.15
5.6.280.0000.05320.84
5.6.210.0070.07320.50
5.6.200.0030.08718.23
5.6.190.0030.06020.35
5.6.180.0230.04720.68
5.6.170.0270.03720.52
5.6.160.0070.05720.54
5.6.150.0070.03718.22
5.6.140.0000.04318.07
5.6.130.0100.03318.13
5.6.120.0200.07021.12
5.6.110.0130.07021.01
5.6.100.0170.05320.98
5.6.90.0170.07321.09
5.6.80.0130.07320.50
5.5.350.0300.07720.38
5.5.340.0000.04017.98
5.5.330.0070.03720.40
5.5.320.0370.06320.21
5.5.310.0270.07020.29
5.5.300.0070.08018.00
5.5.290.0170.06318.03
5.5.280.0230.06720.80
5.5.270.0130.07320.71
5.5.260.0100.06320.75
5.5.250.0100.08320.61
5.5.240.0000.08020.14

preferences:
53.54 ms | 401 KiB | 5 Q