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:
25.51 ms | 404 KiB | 5 Q