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);
based on CpNKP
Output for 7.1.0 - 7.4.0
23