3v4l.org

run code in 300+ PHP versions simultaneously
<?php $val = '<input type="radio" name="alright" id="alright-1" value="1">'; echo preg_replace( '/<input([a-zA-Z_0-9 ={}"]*)type="radio"([a-zA-Z_0-9 ={}"]*)name="alright"([a-zA-Z_0-9 ={}"]*)value="1">/', '<input$1type="radio"$2name="alright"$3value="1" checked>', $html );

preferences:
42.87 ms | 402 KiB | 5 Q