3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = "__('This is a (TEST) all of this i want') i dont want any of this; __(extract this)"; if (preg_match_all('~__(\(((?:[^()]++|(?1))*)\))~', $s, $matches)) { print_r($matches[2]); }

preferences:
18.75 ms | 405 KiB | 5 Q