3v4l.org

run code in 300+ PHP versions simultaneously
<?php $path = "\\/var\\/www\\/resources\\/"; $pathChunks = explode("\\/", $path); print_r($pathChunks); $len = count($pathChunks); $storageFolder = $pathChunks[$len-1]; if(strlen($storageFolder) == 0) { $storageFolder = $pathChunks[$len-2]; } print_r($storageFolder); ?>

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.40.0090.00618.64
8.3.30.0060.00818.97
8.3.20.0050.00320.32
8.3.10.0050.00323.48
8.3.00.0040.00419.26
8.2.170.0100.00322.96
8.2.160.0100.00320.35
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0100.00626.16
8.2.120.0060.00322.29
8.2.110.0030.00622.25
8.2.100.0110.00017.78
8.2.90.0060.00319.17
8.2.80.0000.00817.97
8.2.70.0080.00017.50
8.2.60.0000.00818.04
8.2.50.0060.00318.07
8.2.40.0040.00418.31
8.2.30.0040.00418.18
8.2.20.0050.00317.81
8.2.10.0040.00418.03
8.2.00.0050.00317.74
8.1.270.0000.00821.81
8.1.260.0060.00326.35
8.1.250.0080.00028.09
8.1.240.0030.00623.73
8.1.230.0060.00619.05
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0080.00017.23
8.1.190.0000.00817.40
8.1.180.0000.00818.10
8.1.170.0040.00818.59
8.1.160.0040.00421.97
8.1.150.0000.00718.74
8.1.140.0080.00017.37
8.1.130.0000.00717.74
8.1.120.0050.00217.48
8.1.110.0000.00817.52
8.1.100.0000.00717.46
8.1.90.0070.00017.34
8.1.80.0000.00717.43
8.1.70.0000.00717.44
8.1.60.0000.00817.51
8.1.50.0060.00317.45
8.1.40.0050.00317.47
8.1.30.0040.00417.61
8.1.20.0020.00517.63
8.1.10.0030.00617.57
8.1.00.0070.00017.38
8.0.300.0000.00918.77
8.0.290.0000.00716.89
8.0.280.0030.00318.29
8.0.270.0000.00817.11
8.0.260.0000.00716.63
8.0.250.0000.00616.88
8.0.240.0000.00716.86
8.0.230.0040.00416.89
8.0.220.0030.00316.83
8.0.210.0070.00016.73
8.0.200.0000.00616.89
8.0.190.0000.00916.88
8.0.180.0030.00616.82
8.0.170.0040.00416.99
8.0.160.0030.00516.90
8.0.150.0060.00616.89
8.0.140.0040.00416.90
8.0.130.0030.00313.33
8.0.120.0040.00416.73
8.0.110.0070.00016.81
8.0.100.0000.00716.87
8.0.90.0030.00516.82
8.0.80.0050.00916.91
8.0.70.0040.00416.77
8.0.60.0000.00816.95
8.0.50.0030.00516.75
8.0.30.0070.01016.97
8.0.20.0090.01117.40
8.0.10.0040.00417.09
8.0.00.0060.01316.74
7.4.330.0020.00315.03
7.4.320.0030.00316.43
7.4.300.0070.00016.48
7.4.290.0030.00316.52
7.4.280.0000.01216.63
7.4.270.0000.00716.51
7.4.260.0040.00416.48
7.4.250.0000.00816.46
7.4.240.0040.00416.51
7.4.230.0070.00016.52
7.4.220.0030.01416.61
7.4.210.0110.00516.58
7.4.200.0050.00216.68
7.4.190.0000.00716.69
7.4.160.0060.01616.50
7.4.150.0130.00617.40
7.4.140.0150.00917.86
7.4.130.0110.00916.38
7.4.120.0150.00516.42
7.4.110.0130.01316.46
7.4.100.0110.00716.54
7.4.90.0120.01216.58
7.4.80.0070.01019.39
7.4.70.0060.01016.50
7.4.60.0130.00316.35
7.4.50.0030.00616.54
7.4.40.0100.00622.77
7.4.30.0090.00616.30
7.4.00.0050.01114.97
7.3.330.0060.00013.21
7.3.320.0030.00313.18
7.3.310.0070.00016.38
7.3.300.0000.00716.11
7.3.290.0130.00316.32
7.3.280.0060.01216.36
7.3.270.0120.00617.40
7.3.260.0090.00916.33
7.3.250.0090.01016.51
7.3.240.0090.01316.34
7.3.230.0130.00316.59
7.3.210.0000.01616.35
7.3.200.0030.01419.39
7.3.190.0040.01216.32
7.3.180.0060.00916.40
7.3.170.0150.00616.30
7.3.160.0100.00716.51
7.3.120.0110.00614.77
7.3.110.0080.00814.83
7.3.100.0070.00714.81
7.3.90.0030.01014.89
7.3.80.0070.00414.81
7.3.70.0040.00814.84
7.3.60.0090.00614.86
7.3.50.0150.00014.58
7.3.40.0030.00714.76
7.3.30.0030.00914.99
7.3.20.0030.01416.47
7.3.10.0070.00316.76
7.3.00.0110.00416.63
7.2.330.0040.01416.80
7.2.320.0090.01316.52
7.2.310.0070.01316.46
7.2.300.0130.00316.78
7.2.290.0070.01016.59
7.2.250.0030.01315.06
7.2.240.0090.00914.95
7.2.230.0040.01215.15
7.2.220.0090.00314.98
7.2.210.0090.00614.89
7.2.200.0070.00715.06
7.2.190.0060.01015.05
7.2.180.0040.01114.92
7.2.170.0000.01115.28
7.2.00.0000.01419.10
7.1.330.0090.00615.94
7.1.320.0100.00015.88
7.1.310.0070.00715.86
7.1.300.0060.00915.79
7.1.290.0070.00715.58
7.1.280.0090.00315.88
7.1.270.0070.01115.69
7.1.260.0070.00715.87
7.1.100.0040.00718.24
7.1.70.0000.00816.93
7.1.60.0170.00719.33
7.1.50.0000.01016.89
7.1.00.0100.07022.31
7.0.200.0090.00916.50
7.0.140.0070.07022.01
7.0.100.0270.05019.93
7.0.90.0030.07319.87
7.0.80.0170.06719.91
7.0.70.0130.04019.95
7.0.60.0070.04719.93
7.0.50.0170.04020.39
7.0.40.0070.08020.14
7.0.30.0130.07720.15
7.0.20.0070.05720.00
7.0.10.0130.04020.07
7.0.00.0070.06720.07
5.6.280.0030.07321.04
5.6.250.0130.06320.49
5.6.240.0100.08020.68
5.6.230.0030.08720.75
5.6.220.0130.05720.68
5.6.210.0100.05720.69
5.6.200.0070.04021.11
5.6.190.0100.06020.95
5.6.180.0030.08320.95
5.6.170.0130.06321.14
5.6.160.0070.08321.10
5.6.150.0170.07321.10
5.6.140.0130.08021.05
5.6.130.0070.08020.96
5.6.120.0100.07320.99
5.6.110.0030.08720.95
5.6.100.0130.07320.92
5.6.90.0100.05020.93
5.6.80.0100.06320.42
5.6.70.0000.04320.46
5.6.60.0100.07720.31
5.6.50.0030.04720.43
5.6.40.0070.08020.38
5.6.30.0030.06320.44
5.6.20.0070.06720.46
5.6.10.0070.08720.38
5.6.00.0070.08720.34
5.5.380.0070.07320.51
5.5.370.0100.04320.54
5.5.360.0030.07020.34
5.5.350.0000.04720.32
5.5.340.0030.08020.92
5.5.330.0070.08720.91
5.5.320.0070.08020.87
5.5.310.0070.07720.84
5.5.300.0070.08320.64
5.5.290.0130.07720.77
5.5.280.0000.06020.88
5.5.270.0030.05320.92
5.5.260.0070.08020.89
5.5.250.0130.07720.68
5.5.240.0100.04320.29
5.5.230.0030.04720.23
5.5.220.0100.04720.13
5.5.210.0100.05320.01
5.5.200.0100.07720.28
5.5.190.0130.07720.18
5.5.180.0070.07720.11
5.5.160.0100.04320.27
5.5.150.0170.04020.14
5.5.140.0130.06320.07
5.5.130.0130.07020.24
5.5.120.0100.08020.21
5.5.110.0170.06720.23
5.5.100.0030.06020.11
5.5.90.0030.08320.07
5.5.80.0030.04720.16
5.5.70.0170.06720.00
5.5.60.0070.07320.06
5.5.50.0100.07019.92
5.5.40.0030.06320.05
5.5.30.0130.07320.04
5.5.20.0030.03720.13
5.5.10.0100.07320.05
5.5.00.0030.08319.96
5.4.450.0070.06019.38
5.4.440.0070.04719.39
5.4.430.0100.06319.54
5.4.420.0100.06019.45
5.4.410.0070.08019.24
5.4.400.0070.04318.86
5.4.390.0170.03319.07
5.4.380.0070.07319.14
5.4.370.0100.05318.88
5.4.360.0100.04718.87
5.4.350.0000.08019.24
5.4.340.0130.04019.05
5.4.320.0030.08318.95
5.4.310.0070.07718.90
5.4.300.0100.07319.18
5.4.290.0100.07719.23
5.4.280.0100.05019.20
5.4.270.0070.08019.12
5.4.260.0100.06319.22
5.4.250.0170.06719.24
5.4.240.0070.07018.88
5.4.230.0030.07318.84
5.4.220.0030.08019.17
5.4.210.0070.07718.87
5.4.200.0070.06319.20
5.4.190.0070.07318.86
5.4.180.0070.05319.13
5.4.170.0200.06019.00
5.4.160.0070.08018.88
5.4.150.0030.07719.10
5.4.140.0070.06716.42
5.4.130.0030.04316.40
5.4.120.0070.04016.36
5.4.110.0100.03716.39
5.4.100.0030.06316.42
5.4.90.0070.06716.36
5.4.80.0100.07716.34
5.4.70.0000.06716.38
5.4.60.0030.03716.31
5.4.50.0030.05716.40
5.4.40.0030.03716.32
5.4.30.0100.07016.29
5.4.20.0070.03316.36
5.4.10.0030.04316.39
5.4.00.0000.04015.63
5.3.290.0130.06314.78
5.3.280.0070.04014.61
5.3.270.0130.05714.55
5.3.260.0070.04314.66
5.3.250.0000.04714.66
5.3.240.0100.05014.57
5.3.230.0070.07314.62
5.3.220.0100.04714.68
5.3.210.0070.08014.70
5.3.200.0100.07014.68
5.3.190.0070.04014.70
5.3.180.0070.07714.62
5.3.170.0000.07014.51
5.3.160.0030.05714.68
5.3.150.0070.06714.54
5.3.140.0070.05014.58
5.3.130.0100.06014.63
5.3.120.0070.06014.60
5.3.110.0100.07314.55
5.3.100.0030.07313.98
5.3.90.0100.05714.04
5.3.80.0100.04313.91
5.3.70.0070.03714.09
5.3.60.0030.08014.09
5.3.50.0100.06714.07
5.3.40.0070.06013.86
5.3.30.0070.07014.04
5.3.20.0100.06313.66
5.3.10.0030.06713.57
5.3.00.0170.06013.55
5.2.170.0100.05311.16
5.2.160.0030.03311.02
5.2.150.0130.05711.07
5.2.140.0100.06011.26
5.2.130.0070.05710.97
5.2.120.0030.05711.21
5.2.110.0030.05711.11
5.2.100.0000.06310.99
5.2.90.0100.02711.12
5.2.80.0030.05711.15
5.2.70.0100.03311.08
5.2.60.0030.04311.15
5.2.50.0070.05310.94
5.2.40.0070.03711.04
5.2.30.0030.06010.88
5.2.20.0130.03711.04
5.2.10.0070.06010.91
5.2.00.0130.05310.72
5.1.60.0030.0409.98
5.1.50.0030.0409.82
5.1.40.0070.04710.02
5.1.30.0000.05010.26
5.1.20.0030.04310.26
5.1.10.0000.05310.05
5.1.00.0030.06010.10
5.0.50.0030.0509.43
5.0.40.0030.0439.43
5.0.30.0070.0639.43
5.0.20.0100.0379.43
5.0.10.0030.0439.43
5.0.00.0100.0609.43
4.4.90.0030.0339.43
4.4.80.0030.0179.43
4.4.70.0000.0339.43
4.4.60.0030.0339.43
4.4.50.0000.0379.43
4.4.40.0030.0539.43
4.4.30.0000.0309.43
4.4.20.0000.0209.43
4.4.10.0000.0239.43
4.4.00.0000.0579.43
4.3.110.0000.0409.43
4.3.100.0070.0279.43
4.3.90.0070.0309.43
4.3.80.0000.0309.43
4.3.70.0070.0279.43
4.3.60.0030.0139.43
4.3.50.0000.0379.43
4.3.40.0000.0509.43
4.3.30.0000.0379.43
4.3.20.0030.0279.43
4.3.10.0030.0379.43
4.3.00.0100.0279.43

preferences:
39 ms | 400 KiB | 5 Q