3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "The bass can access the river's delta from the ocean. The fishermen, assassins, and their friends are happy on the banks"; var_export(preg_replace("~'?(?<!s)s\b~", '', $string));

preferences:
25.58 ms | 405 KiB | 5 Q