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:
70.68 ms | 402 KiB | 5 Q