3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '<input type="checkbox" name="jesus">'; echo preg_replace('/<input(\s+)type="checkbox"([\s+\w+\W+])/', 'hi', $str);

preferences:
51.43 ms | 402 KiB | 5 Q