3v4l.org

run code in 200+ 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), '/');
based on ZETgL

Abusive script

This script was stopped while abusing our resources

Shows result from various feature-branches currently under review from the php developers. Contact me to have additional branches featured.

Output for branch php-master
23 23
Output for branch php-master+opcache
23 23
Output for branch php-master+jit
23 23

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page