3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str ="(hello)"; If(substr($str,0,1) == "(" || substr($str, -1) == ")") { // Replace string $str = "hello world"; } Echo $str;

preferences:
31.76 ms | 404 KiB | 5 Q