3v4l.org

run code in 300+ PHP versions simultaneously
<?php $path = '/test/path/controller'; $lastslash = strrpos($path, '/'); $upper_path = substr($path, 0, $lastslash+1) . strtoupper(substr($path, $lastslash+1, 1)) . strtolower(substr($path, $lastslash + 2)); echo $upper_path;

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.0140.00718.55
8.3.50.0060.01321.99
8.3.40.0110.00318.68
8.3.30.0100.01018.92
8.3.20.0070.00020.21
8.3.10.0080.00023.66
8.3.00.0030.00719.12
8.2.180.0120.00616.38
8.2.170.0040.01122.96
8.2.160.0060.00620.35
8.2.150.0050.00324.18
8.2.140.0000.00724.66
8.2.130.0040.00426.16
8.2.120.0050.00319.48
8.2.110.0030.00720.54
8.2.100.0070.00417.85
8.2.90.0080.00018.16
8.2.80.0050.00317.97
8.2.70.0040.00417.63
8.2.60.0050.00317.93
8.2.50.0060.00318.07
8.2.40.0040.00419.95
8.2.30.0030.00318.23
8.2.20.0040.00417.64
8.2.10.0070.00017.99
8.2.00.0030.00519.43
8.1.280.0140.00325.92
8.1.270.0110.00423.87
8.1.260.0070.00026.35
8.1.250.0000.00828.09
8.1.240.0030.00622.05
8.1.230.0070.00420.89
8.1.220.0030.00517.78
8.1.210.0000.00818.88
8.1.200.0040.00417.23
8.1.190.0000.00817.23
8.1.180.0050.00318.10
8.1.170.0030.00618.64
8.1.160.0070.00021.91
8.1.150.0040.00418.54
8.1.140.0030.00517.40
8.1.130.0040.00417.89
8.1.120.0030.00317.48
8.1.110.0000.00717.46
8.1.100.0000.00717.47
8.1.90.0040.00417.35
8.1.80.0050.00217.49
8.1.70.0070.00017.27
8.1.60.0050.00317.59
8.1.50.0080.00017.43
8.1.40.0040.00417.44
8.1.30.0040.00417.49
8.1.20.0030.00617.69
8.1.10.0000.00717.50
8.1.00.0000.00817.46
8.0.300.0040.00419.96
8.0.290.0090.00016.58
8.0.280.0030.00318.43
8.0.270.0030.00317.16
8.0.260.0030.00317.29
8.0.250.0030.00316.87
8.0.240.0070.00016.88
8.0.230.0000.00816.88
8.0.220.0030.00316.76
8.0.210.0030.00316.90
8.0.200.0030.00316.96
8.0.190.0080.00016.88
8.0.180.0040.00416.95
8.0.170.0060.00316.80
8.0.160.0030.00316.71
8.0.150.0050.00316.93
8.0.140.0030.00716.85
8.0.130.0060.00013.19
8.0.120.0070.00016.80
8.0.110.0040.00416.76
8.0.100.0000.00716.95
8.0.90.0040.00416.75
8.0.80.0070.01116.83
8.0.70.0040.00416.86
8.0.60.0040.00416.75
8.0.50.0070.00016.66
8.0.30.0110.01017.17
8.0.20.0100.00917.40
8.0.10.0000.00716.81
8.0.00.0070.01016.62
7.4.330.0050.00015.00
7.4.320.0000.00616.64
7.4.300.0000.00816.64
7.4.290.0070.00016.59
7.4.280.0000.00816.49
7.4.270.0000.00816.55
7.4.260.0050.00316.63
7.4.250.0070.00016.57
7.4.240.0040.00416.55
7.4.230.0070.00016.44
7.4.220.0100.00716.61
7.4.210.0070.01016.54
7.4.200.0070.00016.27
7.4.160.0130.00316.19
7.4.150.0140.00317.40
7.4.140.0150.00417.86
7.4.130.0090.00916.49
7.4.120.0050.01316.41
7.4.110.0160.00016.50
7.4.100.0150.00316.43
7.4.90.0100.00716.34
7.4.80.0150.00319.39
7.4.70.0050.01116.55
7.4.60.0110.00716.37
7.4.50.0060.00316.35
7.4.40.0070.01016.56
7.4.30.0150.00616.48
7.4.00.0060.01114.88
7.3.330.0020.00213.00
7.3.320.0050.00013.11
7.3.310.0070.00016.35
7.3.300.0070.00016.27
7.3.290.0000.01616.30
7.3.280.0080.01016.28
7.3.270.0150.00617.40
7.3.260.0120.00616.21
7.3.250.0130.00416.47
7.3.240.0090.00616.20
7.3.230.0100.00616.39
7.3.210.0070.01016.36
7.3.200.0060.01219.39
7.3.190.0090.01316.64
7.3.180.0060.00916.16
7.3.170.0120.00416.27
7.3.160.0040.01216.38
7.3.120.0090.00814.72
7.3.110.0070.00714.80
7.3.100.0080.00814.82
7.3.90.0070.00714.64
7.3.80.0050.01114.99
7.3.70.0070.00514.76
7.3.60.0070.00814.60
7.3.50.0050.00914.99
7.3.40.0130.00514.88
7.3.30.0050.01114.86
7.3.20.0060.00816.54
7.3.10.0040.01116.50
7.3.00.0040.01016.45
7.2.330.0160.00316.45
7.2.320.0030.01416.58
7.2.310.0160.00616.51
7.2.300.0090.00916.27
7.2.290.0100.00716.73
7.2.250.0100.00714.98
7.2.240.0110.00715.00
7.2.230.0060.01015.13
7.2.220.0090.00614.84
7.2.210.0070.01114.97
7.2.200.0080.00514.95
7.2.190.0010.01114.94
7.2.180.0070.01015.03
7.2.170.0100.00315.10
7.2.160.0000.01415.10
7.2.150.0070.01416.92
7.2.140.0080.00317.00
7.2.130.0040.00816.79
7.2.120.0060.00916.85
7.2.110.0070.01016.65
7.2.100.0070.01016.91
7.2.90.0070.00716.64
7.2.80.0000.01416.95
7.2.70.0060.01216.99
7.2.60.0120.00316.74
7.2.50.0060.00316.84
7.2.40.0090.00916.87
7.2.30.0140.00317.08
7.2.20.0030.00916.96
7.2.10.0100.00316.92
7.2.00.0110.00416.68
7.1.330.0080.00515.92
7.1.320.0110.00515.76
7.1.310.0020.01315.95
7.1.300.0100.00315.89
7.1.290.0070.00715.90
7.1.280.0030.01015.69
7.1.270.0050.01015.85
7.1.260.0060.01115.92
7.1.250.0100.00615.87
7.1.240.0090.00915.63
7.1.230.0070.00715.75
7.1.220.0060.00915.80
7.1.210.0030.01015.85
7.1.200.0030.00715.79
7.1.190.0030.01315.77
7.1.180.0040.00715.46
7.1.170.0090.00315.91
7.1.160.0030.01115.84
7.1.150.0030.00915.70
7.1.140.0070.00715.69
7.1.130.0090.00615.63
7.1.120.0000.01215.84
7.1.110.0100.00715.95
7.1.100.0130.00015.68
7.1.90.0030.00915.65
7.1.80.0070.00715.84
7.1.70.0050.00516.46
7.1.60.0090.00717.82
7.1.50.0120.00616.29
7.1.40.0030.00615.80
7.1.30.0030.00715.86
7.1.20.0030.00915.95
7.1.10.0120.00615.95
7.1.00.0050.04019.23
7.0.330.0100.00415.30
7.0.320.0040.00815.40
7.0.310.0120.00315.36
7.0.300.0090.00315.23
7.0.290.0000.01115.02
7.0.280.0040.01115.34
7.0.270.0030.00615.36
7.0.260.0070.00715.04
7.0.250.0000.00915.59
7.0.240.0030.01015.42
7.0.230.0100.00315.33
7.0.220.0000.01615.39
7.0.210.0040.00715.48
7.0.200.0060.00215.90
7.0.190.0030.01015.55
7.0.180.0110.00415.47
7.0.170.0050.00515.49
7.0.160.0030.00915.32
7.0.150.0110.00315.08
7.0.140.0000.04418.81
7.0.130.0090.00615.32
7.0.120.0090.00315.62
7.0.110.0050.00515.29
7.0.100.0030.00715.41
7.0.90.0030.00615.49
7.0.80.0030.01015.59
7.0.70.0070.02518.57
7.0.60.0050.01818.49
7.0.50.0080.01518.87
7.0.40.0020.02816.64
7.0.30.0000.02216.74
7.0.20.0020.02116.84
7.0.10.0030.01916.88
7.0.00.0060.01816.85
5.6.400.0040.00814.62
5.6.390.0060.01014.36
5.6.380.0110.00314.05
5.6.370.0070.01014.30
5.6.360.0130.00014.18
5.6.350.0060.00314.20
5.6.340.0060.00614.19
5.6.330.0070.00714.42
5.6.320.0000.01214.13
5.6.310.0040.00414.09
5.6.300.0000.00914.43
5.6.290.0070.00714.29
5.6.280.0020.04317.91
5.6.270.0070.00714.27
5.6.260.0090.00314.34
5.6.250.0070.00714.22
5.6.240.0000.01114.17
5.6.230.0100.00314.33
5.6.220.0070.01717.25
5.6.210.0070.01917.38
5.6.200.0070.02317.74
5.6.190.0020.02217.69
5.6.180.0000.02217.72
5.6.170.0090.01717.63
5.6.160.0020.02217.68
5.6.150.0070.02117.70
5.6.140.0030.01817.71
5.6.130.0020.02617.65
5.6.120.0030.04317.55
5.6.110.0030.04617.67
5.6.100.0020.02917.68
5.6.90.0030.05017.59
5.6.80.0050.04117.42
5.6.70.0050.03717.24
5.6.60.0060.02917.32
5.6.50.0060.02817.16
5.6.40.0060.02817.35
5.6.30.0090.04017.36
5.6.20.0080.04017.28
5.6.10.0050.03517.25
5.6.00.0020.04217.30
5.5.380.0080.00414.22
5.5.370.0040.00814.25
5.5.360.0050.03317.38
5.5.350.0020.02017.21
5.5.340.0060.02217.50
5.5.330.0070.03517.48
5.5.320.0050.01917.49
5.5.310.0000.02117.37
5.5.300.0060.01717.33
5.5.290.0020.02217.60
5.5.280.0100.02817.56
5.5.270.0020.04417.49
5.5.260.0030.03317.50
5.5.250.0050.04617.35
5.5.240.0030.03117.13
5.5.230.0050.04317.13
5.5.220.0020.04717.22
5.5.210.0070.04217.13
5.5.200.0020.02717.05
5.5.190.0020.04317.17
5.5.180.0020.05017.10
5.5.170.0060.00613.89
5.5.160.0070.03017.14
5.5.150.0040.03117.18
5.5.140.0030.02517.29
5.5.130.0040.03917.14
5.5.120.0050.03017.23
5.5.110.0050.04117.23
5.5.100.0050.03817.07
5.5.90.0050.04117.24
5.5.80.0130.03017.04
5.5.70.0040.04617.07
5.5.60.0050.03317.09
5.5.50.0120.03717.20
5.5.40.0000.03917.08
5.5.30.0030.03017.02
5.5.20.0050.03317.13
5.5.10.0050.04216.96
5.5.00.0100.03217.04
5.4.450.0050.01615.46
5.4.440.0020.02815.46
5.4.430.0030.03715.59
5.4.420.0030.02315.55
5.4.410.0020.02815.44
5.4.400.0050.04015.29
5.4.390.0050.03915.41
5.4.380.0050.04115.42
5.4.370.0080.03015.43
5.4.360.0040.03015.45
5.4.350.0050.03615.42
5.4.340.0070.04015.50
5.4.330.0030.00611.81
5.4.320.0050.02815.46
5.4.310.0050.03515.51
5.4.300.0020.02515.37
5.4.290.0030.03615.48
5.4.280.0050.04115.31
5.4.270.0030.03915.31
5.4.260.0030.03315.43
5.4.250.0020.04515.30
5.4.240.0030.04115.38
5.4.230.0080.03715.42
5.4.220.0050.03815.41
5.4.210.0110.03015.39
5.4.200.0000.03415.37
5.4.190.0040.03115.46
5.4.180.0050.03715.43
5.4.170.0050.03915.42
5.4.160.0070.03615.48
5.4.150.0000.04615.36
5.4.140.0050.03813.93
5.4.130.0030.03914.01
5.4.120.0030.02214.06
5.4.110.0010.02614.00
5.4.100.0050.02714.09
5.4.90.0070.01714.01
5.4.80.0030.03514.01
5.4.70.0050.04014.11
5.4.60.0030.04314.02
5.4.50.0000.03014.08
5.4.40.0040.03414.02
5.4.30.0030.03114.08
5.4.20.0030.03814.08
5.4.10.0060.02514.10
5.4.00.0030.02313.79
5.3.290.0040.03913.15
5.3.280.0010.02613.13
5.3.270.0000.03713.18
5.3.260.0110.03313.21
5.3.250.0060.03713.13
5.3.240.0050.03813.20
5.3.230.0020.02913.19
5.3.220.0050.03813.18
5.3.210.0020.04213.18
5.3.200.0050.04013.18
5.3.190.0030.04013.18
5.3.180.0030.04213.18
5.3.170.0030.03813.09
5.3.160.0050.03213.18
5.3.150.0030.04113.12
5.3.140.0070.02713.11
5.3.130.0050.02213.17
5.3.120.0030.03113.16
5.3.110.0010.04113.18
5.3.100.0050.03312.89
5.3.90.0030.03812.89
5.3.80.0000.04112.92
5.3.70.0050.03512.89
5.3.60.0030.02312.79
5.3.50.0020.02212.86
5.3.40.0040.02212.85
5.3.30.0070.03112.85
5.3.20.0020.03912.71
5.3.10.0030.04012.70
5.3.00.0020.03512.65
5.2.170.0000.03711.13
5.2.160.0000.03011.19
5.2.150.0000.06011.16
5.2.140.0000.07011.13
5.2.130.0030.04311.02
5.2.120.0000.07011.09
5.2.110.0030.06011.09
5.2.100.0070.06010.96
5.2.90.0000.06011.12
5.2.80.0030.06311.07
5.2.70.0000.05311.11
5.2.60.0000.04311.03
5.2.50.0030.06311.04
5.2.40.0100.05710.98
5.2.30.0100.05710.89
5.2.20.0000.04310.88
5.2.10.0000.06010.91
5.2.00.0070.03710.75
5.1.60.0000.05310.41
5.1.50.0030.05310.41
5.1.40.0000.05710.41
5.1.30.0030.05710.41
5.1.20.0070.05310.41
5.1.10.0070.05310.41
5.1.00.0030.05710.41
5.0.50.0070.03710.41
5.0.40.0000.04310.41
5.0.30.0000.04310.41
5.0.20.0070.03310.41
5.0.10.0030.03710.41
5.0.00.0070.05710.41
4.4.90.0000.02710.41
4.4.80.0000.02010.41
4.4.70.0000.03310.41
4.4.60.0030.03010.41
4.4.50.0030.03010.41
4.4.40.0000.04010.41
4.4.30.0000.03010.41
4.4.20.0030.04010.41
4.4.10.0000.04310.41
4.4.00.0030.04710.41
4.3.110.0030.02710.41
4.3.100.0000.03310.41
4.3.90.0000.03710.41
4.3.80.0000.04710.41
4.3.70.0000.02710.41
4.3.60.0030.03010.41
4.3.50.0000.03310.41
4.3.40.0030.05010.41
4.3.30.0000.03310.41
4.3.20.0000.03710.41
4.3.10.0000.03310.41
4.3.00.0000.03310.41

preferences:
48.96 ms | 401 KiB | 5 Q