3v4l.org

run code in 300+ PHP versions simultaneously
<?php $file_name = '\\foo\\bar\\baz'; $file_name = 'baz'; $ext = substr( strrchr($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.0120.00318.08
8.3.50.0070.00717.89
8.3.40.0100.00718.61
8.3.30.0040.01118.42
8.3.20.0070.00019.16
8.3.10.0000.00721.60
8.3.00.0050.00320.44
8.2.180.0120.00616.32
8.2.170.0030.01122.96
8.2.160.0100.00320.72
8.2.150.0000.00724.18
8.2.140.0090.00024.66
8.2.130.0070.00019.77
8.2.120.0040.00426.35
8.2.110.0060.00320.95
8.2.100.0030.00919.51
8.2.90.0040.00417.63
8.2.80.0090.00017.97
8.2.70.0080.00017.80
8.2.60.0030.00618.09
8.2.50.0040.00418.10
8.2.40.0040.00419.34
8.2.30.0000.00719.30
8.2.20.0040.00417.96
8.2.10.0040.00417.96
8.2.00.0000.00817.66
8.1.280.0100.00725.92
8.1.270.0110.00018.88
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00320.68
8.1.230.0080.00317.64
8.1.220.0070.00017.79
8.1.210.0030.00518.77
8.1.200.0080.00017.21
8.1.190.0000.00817.23
8.1.180.0030.00518.10
8.1.170.0000.00818.65
8.1.160.0000.00718.80
8.1.150.0040.00418.85
8.1.140.0040.00422.13
8.1.130.0070.00420.01
8.1.120.0030.00317.41
8.1.110.0030.00317.37
8.1.100.0000.00717.36
8.1.90.0040.00417.29
8.1.80.0000.00717.29
8.1.70.0000.00717.28
8.1.60.0030.00617.50
8.1.50.0000.00917.45
8.1.40.0080.00017.33
8.1.30.0000.00817.41
8.1.20.0040.00417.41
8.1.10.0000.01017.41
8.1.00.0000.00817.46
8.0.300.0040.00418.77
8.0.290.0000.00816.63
8.0.280.0000.00718.30
8.0.270.0030.00317.30
8.0.260.0000.00618.36
8.0.250.0030.00716.95
8.0.240.0030.00316.82
8.0.230.0080.00016.77
8.0.220.0030.00316.73
8.0.210.0030.00316.88
8.0.200.0000.00716.92
8.0.190.0030.00616.90
8.0.180.0040.00416.85
8.0.170.0060.00316.76
8.0.160.0030.00316.88
8.0.150.0040.00716.72
8.0.140.0050.00216.78
8.0.130.0000.00513.23
8.0.120.0070.00016.84
8.0.110.0000.00716.84
8.0.100.0040.00416.88
8.0.90.0070.00016.81
8.0.80.0160.00716.78
8.0.70.0050.00216.66
8.0.60.0030.00416.69
8.0.50.0000.00716.75
8.0.30.0110.00816.93
8.0.20.0180.00017.40
8.0.10.0000.00816.79
8.0.00.0050.01216.65
7.4.330.0020.00215.55
7.4.320.0030.00316.43
7.4.300.0000.00816.41
7.4.290.0030.00316.54
7.4.280.0050.00516.47
7.4.270.0040.00416.43
7.4.260.0060.00316.33
7.4.250.0030.00316.38
7.4.240.0000.00816.36
7.4.230.0070.00016.32
7.4.220.0040.00416.56
7.4.210.0090.01116.45
7.4.200.0030.00316.55
7.4.160.0060.01016.42
7.4.140.0090.01017.86
7.4.130.0100.00716.54
7.4.120.0100.00816.47
7.4.110.0170.00416.46
7.4.100.0130.01016.49
7.4.90.0050.01116.41
7.4.80.0120.00919.39
7.4.70.0150.00616.59
7.4.60.0120.00316.38
7.4.50.0030.01316.47
7.4.40.0090.01016.31
7.4.00.0060.00914.91
7.3.330.0030.00313.09
7.3.320.0000.00513.17
7.3.310.0040.00416.16
7.3.300.0040.00416.16
7.3.290.0030.00316.14
7.3.280.0090.00816.20
7.3.260.0090.01016.44
7.3.240.0090.01116.36
7.3.230.0180.00416.25
7.3.210.0100.00616.30
7.3.200.0130.00316.12
7.3.190.0060.01616.38
7.3.180.0140.00316.20
7.3.170.0070.01116.17
7.3.160.0110.00716.53
7.2.330.0100.00716.51
7.2.320.0090.01216.60
7.2.310.0120.00916.62
7.2.300.0070.01016.59
7.2.290.0060.01216.63
7.2.110.0680.01014.55
7.2.100.0510.00914.35
7.2.90.0750.00314.41
7.2.80.0700.01214.61
7.2.70.0850.00914.67
7.2.60.0760.01614.37
7.2.50.1040.01014.72
7.2.40.0720.00314.64
7.2.30.0670.01014.44
7.2.20.0900.00714.59
7.2.10.0890.01014.73
7.2.00.0670.00715.02
7.1.230.0600.00313.69
7.1.220.0600.00713.71
7.1.210.0970.00313.48
7.1.200.0720.00313.60
7.1.190.0610.01313.66
7.1.180.0740.00613.77
7.1.170.0620.00313.52
7.1.160.0690.00713.57
7.1.150.0600.00613.45
7.1.140.0890.00713.41
7.1.130.0770.00613.51
7.1.120.0480.01313.58
7.1.110.0860.01413.61
7.1.100.0790.00313.64
7.1.90.0660.01013.54
7.1.80.0970.00313.40
7.1.70.1000.00613.88
7.1.60.1220.00431.86
7.1.50.1430.00631.89
7.1.40.1580.01331.68
7.1.30.1910.01331.80
7.1.20.1460.00631.82
7.1.10.1220.00013.49
7.1.00.0820.00613.53
5.6.380.0090.00614.11

preferences:
50.53 ms | 400 KiB | 5 Q