3v4l.org

run code in 200+ php & hhvm versions
<?php $test = "this is a test (asdfasdfasdf)"; $asdf = preg_replace("/\s*\(.*\)\s*$/", "", $test); var_dump($asdf);
based on rLVnl
Output for 7.1.25 - 7.4.0beta2
string(14) "this is a test"