3v4l.org

run code in 200+ PHP versions simultaneously
<?php $main_string = "23/CSE/4/2014"; $sub_string = "CSE/4/2014"; echo 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), '/');
based on BlrV6

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)
7.4.60.0060.01016.50
7.4.50.0120.00516.50
7.4.00.0040.00714.99
7.3.180.0100.01016.22
7.3.10.0130.00316.16
7.3.00.0090.00616.10
7.2.130.0070.01016.41
7.2.120.0100.00316.07
7.2.110.0140.00416.07
7.2.100.0070.00716.37
7.2.90.0160.00316.39
7.2.80.0080.00716.48
7.2.70.0090.00816.43
7.2.60.1060.00815.50
7.2.50.1010.00715.73
7.2.40.0850.00415.74
7.2.30.0910.00715.46
7.2.20.0850.00515.33
7.2.10.1030.00715.54
7.2.00.0880.00815.64
7.1.250.0100.01115.54
7.1.200.0080.00515.74
7.1.170.1910.00613.65
7.1.160.1730.00913.61
7.1.150.1790.00813.61
7.1.140.1900.00813.91
7.1.130.1680.00713.82
7.1.120.1650.00813.79
7.1.110.1660.00613.48
7.1.100.1880.00913.79
7.1.90.2120.01213.63
7.1.80.1940.00813.89
7.1.70.1610.00713.81
7.1.60.2020.01131.82
7.1.50.2200.01331.67
7.1.40.1880.00931.88
7.1.30.2080.01231.87
7.1.20.2280.01531.95
7.1.10.1540.00913.77
7.1.00.1530.00513.68