3v4l.org

run code in 300+ PHP versions simultaneously
<?php $main_string = "23/CSE/4/2014"; $sub_string = "CSE/4/2014"; echo trim(str_replace($sub_string, '', $main_string), '/'); echo "\n"; $main_string = "CSE/4/2014/23"; $sub_string = "CSE/4/2014"; echo trim(str_replace($sub_string, '', $main_string), '/');

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.0110.00718.28
8.3.50.0130.00317.96
8.3.40.0060.00918.52
8.3.30.0110.00318.45
8.3.20.0080.00019.03
8.3.10.0040.00419.04
8.3.00.0000.00723.36
8.2.180.0100.00325.92
8.2.170.0090.00619.00
8.2.160.0070.00719.29
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0000.01120.93
8.2.110.0090.00019.23
8.1.280.0070.01125.92
8.1.270.0080.00022.10
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00619.01
7.4.10.0160.01016.19
7.4.00.0140.00515.73
7.3.130.0150.01215.97
7.3.120.0170.00415.96
7.3.110.0090.01616.21
7.3.100.0240.00015.92
7.3.90.0170.00716.11
7.3.80.0190.00616.02
7.3.70.0100.01516.16
7.3.60.0290.00216.16
7.3.50.0150.01016.02
7.3.40.0170.00916.21
7.3.30.0250.00016.19
7.3.20.0130.01718.02
7.3.10.0280.00317.31
7.3.00.1090.00717.14
7.2.260.0180.01216.50
7.2.250.0210.00216.27
7.2.240.0220.00716.40
7.2.230.0120.01816.18
7.2.220.0240.00316.22
7.2.210.0130.01316.11
7.2.200.0200.00616.35
7.2.190.0220.00616.29
7.2.180.0130.01616.52
7.2.170.0220.00416.46
7.2.160.0120.01216.33
7.2.150.0150.01118.21
7.2.140.2070.01016.29
7.2.130.0110.00917.55
7.2.120.0150.00517.38
7.2.110.0090.00916.64
7.2.100.0120.01117.42
7.2.90.0140.00515.04
7.2.80.0120.00817.27
7.2.70.0130.00817.53
7.2.60.0840.00616.03
7.2.50.0650.01014.94
7.2.40.0660.00516.56
7.2.30.0590.00516.64
7.2.20.0550.01016.63
7.2.10.0720.01015.91
7.2.00.0630.00816.59
7.1.330.0220.00617.21
7.1.320.0180.00617.46
7.1.310.0220.01117.23
7.1.300.0110.01515.46
7.1.290.0400.01117.23
7.1.280.0220.01017.03
7.1.270.0210.00317.39
7.1.260.2800.01415.40
7.1.250.0240.00715.51
7.1.240.0220.00617.27
7.1.230.0390.01115.29
7.1.220.0390.00717.09
7.1.210.0200.01017.17
7.1.200.0440.00314.45
7.1.190.0750.01115.45
7.1.180.0180.00313.13
7.1.170.0940.00815.47
7.1.160.1260.01014.46
7.1.150.0970.00915.46
7.1.140.1110.00914.62
7.1.130.0920.00815.28
7.1.120.0900.00815.49
7.1.110.0930.01014.63
7.1.100.0930.00715.49
7.1.90.0880.01015.40
7.1.80.1350.00615.54
7.1.70.1240.00914.56
7.1.60.1130.00824.44
7.1.50.1230.00722.32
7.1.40.1280.00822.42
7.1.30.1190.00823.59
7.1.20.1280.00722.37
7.1.10.1290.00313.48
7.1.00.1390.01114.64
7.0.330.0140.00814.99
7.0.320.0410.01015.13
7.0.310.0200.00915.07
7.0.300.0220.00817.04
7.0.290.0150.01115.11
7.0.280.0730.00615.09
7.0.270.0240.00316.96
7.0.260.0530.01816.89
7.0.250.0750.00715.12
7.0.240.0130.00813.13
7.0.230.0630.00516.84
7.0.220.0490.00613.13
7.0.210.0200.00616.88
7.0.200.0360.01114.99
7.0.190.0200.01016.98
7.0.180.0530.00816.83
7.0.170.0160.00513.13
7.0.160.0230.00616.93
7.0.150.0530.01014.99
7.0.140.0250.00616.82
7.0.130.0230.00013.13
7.0.120.0170.00613.13
7.0.110.0170.00313.13
7.0.100.0830.00513.13
7.0.90.0620.01415.18
7.0.80.0300.00016.74
7.0.70.0250.00817.00
7.0.60.0160.01416.94
7.0.50.1000.01013.13
7.0.40.0120.00513.13
7.0.30.0140.00713.13
7.0.20.0120.00514.75
7.0.10.0160.01114.81
7.0.00.0170.00413.13
5.6.400.0140.00716.03
5.6.390.0260.00415.84
5.6.380.0170.00815.48
5.6.370.0090.01815.68
5.6.360.0110.01115.97
5.6.350.0120.01215.78
5.6.340.0160.00313.13
5.6.330.0170.00013.13
5.6.320.0160.00313.13
5.6.310.0280.00316.04
5.6.300.0080.00813.13
5.6.290.0140.00313.13
5.6.280.0080.02115.62
5.6.270.0210.00715.75
5.6.260.0130.01316.06
5.6.250.0160.00516.00
5.6.240.0120.01115.77
5.6.230.0180.01115.87
5.6.220.0180.01015.74
5.6.210.0230.00415.84
5.6.200.0160.00915.75
5.6.190.0200.00915.55
5.6.180.0160.01015.85
5.6.170.0130.01315.88
5.6.160.0210.00215.73
5.6.150.0130.00313.13
5.6.140.0120.01115.99
5.6.130.0130.00615.71
5.6.120.0150.00815.62
5.6.110.0090.00313.13
5.6.100.0090.00915.80
5.6.90.0080.01015.54
5.6.80.0100.00715.70
5.6.70.0070.01015.64
5.6.60.0140.00415.63
5.6.50.0140.00315.41
5.6.40.0050.01115.60
5.6.30.0040.01315.61
5.6.20.0110.00615.63
5.6.10.0110.00615.66
5.6.00.0140.00315.64

preferences:
41.83 ms | 401 KiB | 5 Q