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>', $val );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mERJB
function name:  (null)
number of ops:  8
compiled vars:  !0 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Cinput+type%3D%22radio%22+name%3D%22alright%22+id%3D%22alright-1%22+value%3D%221%22%3E'
    5     1        INIT_FCALL                                               'preg_replace'
    6     2        SEND_VAL                                                 '%2F%3Cinput%28%5Ba-zA-Z_0-9+%3D%22%5D%2A%29type%3D%22radio%22%28%5Ba-zA-Z_0-9+%3D%22%5D%2A%29name%3D%22alright%22%28%5Ba-zA-Z_0-9+%3D%5C-%22%5D%2A%29value%3D%221%22%3E%2F'
    7     3        SEND_VAL                                                 '%3Cinput%241type%3D%22radio%22%242name%3D%22alright%22%243value%3D%221%22+checked%3E'
    8     4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        ECHO                                                     $2
    9     7      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.37 ms | 1394 KiB | 15 Q