3v4l.org

run code in 500+ 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:
97.21 ms | 1272 KiB | 5 Q