3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string="{1},[2],(3),<4>"; // Replaces closing square, curly, angle brackets with round brackets $string = preg_replace('/[{[<]/', '(', $string); $string = preg_replace('/[}>\]]/', ')', $string); echo $string;

preferences:
23.92 ms | 404 KiB | 5 Q