3v4l.org

run code in 300+ PHP versions simultaneously
<?php $main_string = "23/CSE/4/2014"; $sub_string = "/CSE/4/2014"; echo str_replace($sub_string, '', $main_string);
Output for 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.31, 7.4.0 - 7.4.25, 8.0.0 - 8.0.12, 8.1rc1 - rc3
23

preferences:
44.87 ms | 460 KiB | 5 Q