3v4l.org

run code in 300+ PHP versions simultaneously
<?php $file_name = '\\foo\\bar\\baz'; $file_name = 'baz'; $ext = substr($file_name, strrpos($file_name,'\\')+1); echo $ext;

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.00018.18
8.3.50.0110.00418.17
8.3.40.0040.01118.68
8.3.30.0110.00418.66
8.3.20.0040.00419.17
8.3.10.0080.00021.60
8.3.00.0030.00620.58
8.2.180.0170.00016.38
8.2.170.0110.00722.96
8.2.160.0080.00620.75
8.2.150.0000.00724.18
8.2.140.0040.00424.66
8.2.130.0000.00819.82
8.2.120.0050.00326.35
8.2.110.0090.00020.97
8.2.100.0110.00017.84
8.2.90.0030.00617.97
8.2.80.0030.00617.97
8.2.70.0080.00017.80
8.2.60.0030.00618.16
8.2.50.0080.00018.10
8.2.40.0030.00619.39
8.2.30.0040.00419.29
8.2.20.0000.00717.99
8.2.10.0000.00818.02
8.2.00.0000.00817.76
8.1.280.0140.00325.92
8.1.270.0040.00719.00
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0090.00023.92
8.1.230.0090.00322.62
8.1.220.0040.00417.79
8.1.210.0050.00519.14
8.1.200.0040.00817.23
8.1.190.0040.00417.22
8.1.180.0040.00418.10
8.1.170.0000.00818.51
8.1.160.0000.00718.73
8.1.150.0040.00418.86
8.1.140.0030.00322.12
8.1.130.0050.00520.11
8.1.120.0070.00017.29
8.1.110.0000.00717.37
8.1.100.0070.00017.36
8.1.90.0000.00817.25
8.1.80.0040.00417.43
8.1.70.0040.00417.25
8.1.60.0000.00817.48
8.1.50.0000.00817.44
8.1.40.0040.00417.41
8.1.30.0030.00517.47
8.1.20.0000.00717.55
8.1.10.0090.00017.40
8.1.00.0040.00417.44
8.0.300.0080.00021.57
8.0.290.0040.00416.88
8.0.280.0030.00318.44
8.0.270.0000.00916.93
8.0.260.0030.00318.49
8.0.250.0050.00216.88
8.0.240.0060.00017.06
8.0.230.0030.00516.94
8.0.220.0000.00616.84
8.0.210.0030.00316.81
8.0.200.0060.00016.93
8.0.190.0060.00316.94
8.0.180.0040.00416.79
8.0.170.0070.00316.78
8.0.160.0040.00416.94
8.0.150.0000.01116.81
8.0.140.0000.00716.84
8.0.130.0030.00313.33
8.0.120.0000.00716.78
8.0.110.0000.00716.85
8.0.100.0070.00016.90
8.0.90.0040.00416.96
8.0.80.0130.00616.91
8.0.70.0070.00016.85
8.0.60.0030.00516.92
8.0.50.0040.00416.75
8.0.30.0070.00916.98
8.0.20.0140.00317.40
8.0.10.0070.00016.84
8.0.00.0090.01216.77
7.4.330.0030.00315.55
7.4.320.0030.00316.58
7.4.300.0030.00316.34
7.4.290.0030.00316.36
7.4.280.0030.00616.52
7.4.270.0040.00416.40
7.4.260.0030.00316.45
7.4.250.0080.00016.50
7.4.240.0070.00016.44
7.4.230.0000.00616.42
7.4.220.0050.00316.34
7.4.210.0080.00716.46
7.4.200.0070.00016.17
7.4.160.0090.00916.52
7.4.140.0090.01117.86
7.4.130.0070.01016.42
7.4.120.0100.00716.46
7.4.110.0140.01116.57
7.4.100.0100.00716.25
7.4.90.0030.01316.37
7.4.80.0090.01119.39
7.4.70.0070.01316.52
7.4.60.0060.01416.32
7.4.50.0060.00916.32
7.4.40.0100.00716.29
7.4.00.0110.00414.84
7.3.330.0030.00313.14
7.3.320.0030.00313.12
7.3.310.0000.00816.22
7.3.300.0030.00316.24
7.3.290.0030.00316.23
7.3.280.0090.00716.17
7.3.260.0130.00616.33
7.3.240.0090.01116.39
7.3.230.0070.01016.35
7.3.210.0110.00716.20
7.3.200.0050.01116.46
7.3.190.0110.00516.39
7.3.180.0060.01016.48
7.3.170.0120.00516.41
7.3.160.0060.01016.21
7.2.330.0070.01016.55
7.2.320.0070.01116.57
7.2.310.0030.01316.43
7.2.300.0080.00916.66
7.2.290.0100.00716.61
7.2.110.0150.00614.77
7.2.100.0310.01014.46
7.2.90.0090.01214.75
7.2.80.1300.00614.75
7.2.70.0140.00714.87
7.2.60.0170.01015.08
7.2.50.0150.00714.99
7.2.40.0100.01314.95
7.2.30.0280.00614.99
7.2.20.0100.01314.98
7.2.10.0160.00614.93
7.2.00.0160.01015.00
7.1.230.0190.01014.00
7.1.220.0200.00314.10
7.1.210.0210.00913.94
7.1.200.0260.00413.96
7.1.190.0160.00613.82
7.1.180.0170.00313.64
7.1.170.0220.00713.84
7.1.160.0190.00313.75
7.1.150.0150.00614.03
7.1.140.0100.01413.96
7.1.130.0140.00713.89
7.1.120.0170.00313.61
7.1.110.0210.00714.08
7.1.100.0240.00313.95
7.1.90.0170.01413.73
7.1.80.0200.00713.99
7.1.70.0250.00613.46
7.1.60.0380.01631.82
7.1.50.0370.00732.04
7.1.40.0380.01231.50
7.1.30.0460.00331.61
7.1.20.0480.01431.60
7.1.10.1270.01313.56
7.1.00.0150.01513.86
5.6.380.0100.00314.25

preferences:
53.38 ms | 400 KiB | 5 Q