3v4l.org

run code in 300+ PHP versions simultaneously
<?php $path = '/test/path/controller'; $lastslash = strrpos($path, '/'); $upper_path = substr($path, 0, $lastslash) . strtoupper(substr($path, $lastslash, 1)) . strtolower(substr($path, $lastslash + 1)); 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.0100.01018.33
8.3.50.0070.01317.25
8.3.40.0040.01118.54
8.3.30.0100.00318.40
8.3.20.0050.00318.56
8.3.10.0050.00320.52
8.3.00.0040.00417.25
8.2.180.0100.00716.63
8.2.170.0030.01122.96
8.2.160.0040.01122.19
8.2.150.0110.00724.18
8.2.140.0070.00024.66
8.2.130.0000.00726.16
8.2.120.0070.00019.83
8.2.110.0090.00021.03
8.2.100.0030.01017.66
8.2.90.0030.00519.05
8.2.80.0000.00717.97
8.2.70.0000.00817.50
8.2.60.0000.00817.93
8.2.50.0000.00818.07
8.2.40.0070.00018.28
8.2.30.0030.00617.98
8.2.20.0040.00417.52
8.2.10.0000.00717.64
8.2.00.0060.00317.72
8.1.280.0100.01025.92
8.1.270.0080.00023.99
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0060.00322.46
8.1.230.0090.00321.03
8.1.220.0050.00318.77
8.1.210.0050.00218.89
8.1.200.0070.00317.23
8.1.190.0000.00717.50
8.1.180.0030.00618.10
8.1.170.0060.00318.90
8.1.160.0050.00218.87
8.1.150.0040.00418.61
8.1.140.0040.00417.36
8.1.130.0030.00317.87
8.1.120.0030.00417.48
8.1.110.0030.00317.46
8.1.100.0040.00417.42
8.1.90.0000.00817.47
8.1.80.0050.00317.50
8.1.70.0000.00717.29
8.1.60.0000.00917.55
8.1.50.0000.00717.47
8.1.40.0030.00517.47
8.1.30.0000.00717.64
8.1.20.0040.00417.68
8.1.10.0050.00317.50
8.1.00.0040.00417.32
8.0.300.0000.00719.85
8.0.290.0110.00016.75
8.0.280.0030.00318.30
8.0.270.0070.00017.28
8.0.260.0000.00716.85
8.0.250.0040.00416.77
8.0.240.0060.00316.98
8.0.230.0030.00316.95
8.0.220.0070.00016.80
8.0.210.0000.00716.75
8.0.200.0070.00016.78
8.0.190.0050.00316.84
8.0.180.0040.00416.73
8.0.170.0000.00916.88
8.0.160.0050.00216.93
8.0.150.0000.00816.75
8.0.140.0000.00916.73
8.0.130.0030.00313.31
8.0.120.0030.00616.79
8.0.110.0000.00716.76
8.0.100.0000.00816.71
8.0.90.0040.00416.73
8.0.80.0130.01016.80
8.0.70.0050.00216.84
8.0.60.0000.00716.75
8.0.50.0030.00516.76
8.0.30.0080.01116.85
8.0.20.0050.01317.16
8.0.10.0040.00416.80
8.0.00.0090.01116.65
7.4.330.0030.00314.70
7.4.320.0030.00316.48
7.4.300.0000.00616.48
7.4.290.0040.00416.43
7.4.280.0060.00316.53
7.4.270.0000.00616.47
7.4.260.0000.00613.29
7.4.250.0040.00416.46
7.4.240.0030.00316.52
7.4.230.0020.00516.52
7.4.220.0060.01216.32
7.4.210.0080.00916.49
7.4.200.0030.00316.25
7.4.190.0000.00716.23
7.4.160.0090.01316.40
7.4.150.0060.01417.07
7.4.140.0090.01117.23
7.4.130.0100.00716.40
7.4.120.0110.00516.37
7.4.110.0070.01016.35
7.4.100.0060.01216.43
7.4.90.0100.01016.24
7.4.80.0060.01018.80
7.4.70.0090.01416.38
7.4.60.0040.01216.60
7.4.50.0000.00416.43
7.4.40.0090.00922.27
7.4.30.0080.00816.38
7.4.00.0090.00614.64
7.3.330.0030.00313.16
7.3.320.0000.00613.05
7.3.310.0030.00316.18
7.3.300.0030.00316.29
7.3.290.0120.00316.20
7.3.280.0120.00716.23
7.3.270.0120.00617.07
7.3.260.0070.01018.24
7.3.250.0130.00716.55
7.3.240.0060.01216.55
7.3.230.0090.01216.39
7.3.210.0120.00616.62
7.3.200.0070.01019.39
7.3.190.0100.00716.41
7.3.180.0110.00516.21
7.3.170.0130.00416.27
7.3.160.0130.01016.18
7.3.120.0030.01214.76
7.3.110.0070.01114.57
7.3.100.0090.00314.43
7.3.90.0070.00714.95
7.3.80.0000.00914.97
7.3.70.0030.00914.77
7.3.60.0130.00014.71
7.3.50.0030.01414.79
7.3.40.0110.00414.57
7.3.30.0000.00914.52
7.3.20.0000.01316.69
7.3.10.0040.01116.45
7.3.00.0080.00316.48
7.2.330.0180.00616.68
7.2.320.0090.00916.79
7.2.310.0150.00316.58
7.2.300.0060.01316.54
7.2.290.0080.00816.74
7.2.250.0040.01415.28
7.2.240.0070.01414.99
7.2.230.0080.00614.88
7.2.220.0040.01114.86
7.2.210.0080.00814.85
7.2.200.0030.00614.85
7.2.190.0040.01114.95
7.2.180.0060.00914.68
7.2.170.0000.01415.11
7.2.130.0000.00916.94
7.2.120.0030.01016.76
7.2.110.0070.00716.93
7.2.100.0090.00616.91
7.2.90.0110.00716.90
7.2.80.0030.01216.71
7.2.70.0070.00316.56
7.2.60.0000.01416.73
7.2.50.0040.01116.88
7.2.40.0030.01216.59
7.2.30.0070.00716.70
7.2.20.0100.00716.86
7.2.10.0070.00416.69
7.2.00.0050.00918.22
7.1.330.0070.00715.85
7.1.320.0000.01015.46
7.1.310.0070.01015.91
7.1.300.0000.00915.81
7.1.290.0000.01715.56
7.1.280.0060.00315.84
7.1.270.0060.00615.87
7.1.260.0040.01115.62
7.1.250.0080.00815.86
7.1.100.0060.00918.13
7.1.70.0030.00317.21
7.1.60.0120.00619.40
7.1.50.0040.01816.71
7.1.00.0130.06322.24
7.0.200.0060.00316.80
7.0.140.0000.07322.18
7.0.60.0030.07320.02
7.0.50.0030.07017.82
7.0.40.0100.03720.24
7.0.30.0270.07720.09
7.0.20.0330.03320.00
7.0.10.0270.04020.33
7.0.00.0070.05320.08
5.6.280.0000.07321.06
5.6.210.0070.08020.74
5.6.200.0100.05318.06
5.6.190.0070.04320.32
5.6.180.0430.06720.36
5.6.170.0430.07720.52
5.6.160.0170.06020.53
5.6.150.0030.05718.12
5.6.140.0130.07318.07
5.6.130.0000.07318.12
5.6.120.0070.04321.11
5.6.110.0100.03320.98
5.6.100.0030.04320.96
5.6.90.0100.08320.96
5.6.80.0070.05320.41
5.6.70.4430.04020.37
5.5.350.0230.04020.42
5.5.340.0030.06717.89
5.5.330.0030.07720.57
5.5.320.0270.08020.13
5.5.310.0300.05720.26
5.5.300.0070.07717.95
5.5.290.0030.04318.02
5.5.280.0200.07020.84
5.5.270.0030.04320.93
5.5.260.0100.05020.76
5.5.250.0170.06020.54
5.5.240.0000.04020.25
5.4.450.0530.04019.10
5.4.440.0730.05319.54
5.4.430.0570.04719.48
5.4.420.0800.03719.43
5.4.410.0330.04719.36
5.4.400.0870.03019.07
5.4.390.0570.04719.23
5.4.380.0470.04719.07
5.4.370.0530.03719.13
5.4.360.1000.02719.04
5.4.350.0670.03719.07
5.4.340.0930.03318.88
5.4.320.0600.03319.13
5.4.310.0500.03319.07
5.4.300.0400.04019.21
5.4.290.0570.05319.06
5.4.280.0400.04319.06
5.4.270.0600.03718.93
5.4.260.0030.03019.22
5.4.250.0670.03719.15
5.4.240.0700.02319.09
5.4.230.0600.04318.88
5.4.220.1000.03319.05
5.4.210.0570.05019.09
5.4.200.0270.05719.23
5.4.190.0630.05319.05
5.4.180.0670.03318.79
5.4.170.0600.04019.02
5.4.160.0530.04018.77
5.4.150.0630.03719.05
5.4.140.0470.03716.26
5.4.130.0530.04016.53
5.4.120.0630.03016.32
5.4.110.0500.03716.38
5.4.100.0500.03316.06
5.4.90.0770.03316.28
5.4.80.0430.03016.36
5.4.70.0430.03316.35
5.4.60.0500.03716.36
5.4.50.0700.03316.34
5.4.40.0800.04316.34
5.4.30.0430.03316.36
5.4.20.0770.03716.36
5.4.10.0670.04016.41
5.4.00.0600.03715.75
5.3.290.0770.02315.11
5.3.280.0730.03715.11
5.3.270.0600.03315.09
5.3.260.0570.04015.09
5.3.250.0630.04315.09
5.3.240.0500.03315.09
5.3.230.0770.03315.09
5.3.220.0700.03315.09
5.3.210.0470.04015.09
5.3.200.0700.03715.09
5.3.190.0530.03315.09
5.3.180.0770.02715.09
5.3.170.0330.04315.09
5.3.160.0530.03715.08
5.3.150.0330.03315.08
5.3.140.0870.03315.08
5.3.130.0370.04315.07
5.3.120.0830.03715.07
5.3.110.0500.03715.07
5.3.100.0430.03315.07
5.3.90.0500.02715.07
5.3.80.0800.03315.07
5.3.70.0470.03015.07
5.3.60.0730.04015.07
5.3.50.0700.03315.07
5.3.40.0400.04015.07
5.3.30.0500.05015.07
5.3.20.0230.03315.07
5.3.10.0500.02715.07
5.3.00.0570.03015.07
5.2.170.0730.04015.07
5.2.160.0200.03015.07
5.2.150.0370.02715.07
5.2.140.0800.02015.07
5.2.130.0370.02715.07
5.2.120.0530.03015.07
5.2.110.0370.02315.07
5.2.100.0670.02315.07
5.2.90.0730.03015.07
5.2.80.0100.03715.07
5.2.70.0530.03015.07
5.2.60.0130.02715.07
5.2.50.0500.02315.07
5.2.40.0500.02015.07
5.2.30.0300.03015.07
5.2.20.0130.02715.07
5.2.10.0300.02715.06
5.2.00.0400.03315.06
5.1.60.0300.03315.06
5.1.50.0370.03015.06
5.1.40.0430.03015.06
5.1.30.0470.02315.06
5.1.20.0200.02715.06
5.1.10.0400.02315.06
5.1.00.0200.02315.06
5.0.50.0100.01715.10
5.0.40.0300.01315.10
5.0.30.0030.03315.10
5.0.20.0130.02315.10
5.0.10.0030.02315.10
5.0.00.0130.03315.10
4.4.90.0170.02015.07
4.4.80.0130.01715.07
4.4.70.0170.01315.06
4.4.60.0170.01715.06
4.4.50.0070.02015.06
4.4.40.0100.03015.06
4.4.30.0130.02015.06
4.4.20.0100.01315.06
4.4.10.0170.01315.06
4.4.00.0270.02315.10
4.3.110.0170.01715.10
4.3.100.0300.01015.10
4.3.90.0200.01315.10
4.3.80.0100.02015.10
4.3.70.0370.01715.10
4.3.60.0200.01315.10
4.3.50.0170.01715.10
4.3.40.0130.03015.09
4.3.30.0070.01015.09
4.3.20.0130.01715.09
4.3.10.0130.01315.09
4.3.00.0100.02015.09

preferences:
46.68 ms | 401 KiB | 5 Q