3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string="{1},[2],(3),<4>"; $what = ['~[{[<]~', '~[]}>]~']; $with = ['(', ')']; $string = preg_replace($what, $with, $string); echo $string;

preferences:
55.92 ms | 402 KiB | 5 Q