3v4l.org

run code in 300+ PHP versions simultaneously
<?php $oldstr1='<span style="font-family: Times New Roman; font-size: 12pt;">'; $oldstr2='</span>'; $newstr1='<input type="radio" value="1" name="choice">'; $newstr2="</input>"; $str='<span style="font-family: Times New Roman; font-size: 12pt;"></span>'; while (preg_match($oldstr1, $str) && preg_match($oldstr2, $str)) { $str = preg_replace($oldstr1,$newstr1, $str, 1); $str = preg_replace($oldstr2,$newstr2, $str, 1); } echo $str;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 46) Position 1 = 25, Position 2 = 30
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 31, Position 2 = 6
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 46) Position 1 = 25, Position 2 = 30
Branch analysis from position: 25
Branch analysis from position: 30
Branch analysis from position: 30
filename:       /in/PKZ2g
function name:  (null)
number of ops:  33
compiled vars:  !0 = $oldstr1, !1 = $oldstr2, !2 = $newstr1, !3 = $newstr2, !4 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Cspan+style%3D%22font-family%3A+Times+New+Roman%3B+font-size%3A+12pt%3B%22%3E'
    3     1        ASSIGN                                                   !1, '%3C%2Fspan%3E'
    4     2        ASSIGN                                                   !2, '%3Cinput+type%3D%22radio%22+value%3D%221%22+name%3D%22choice%22%3E'
    5     3        ASSIGN                                                   !3, '%3C%2Finput%3E'
    6     4        ASSIGN                                                   !4, '%3Cspan+style%3D%22font-family%3A+Times+New+Roman%3B+font-size%3A+12pt%3B%22%3E%3C%2Fspan%3E'
    8     5      > JMP                                                      ->20
   10     6    >   INIT_FCALL                                               'preg_replace'
          7        SEND_VAR                                                 !0
          8        SEND_VAR                                                 !2
          9        SEND_VAR                                                 !4
         10        SEND_VAL                                                 1
         11        DO_ICALL                                         $10     
         12        ASSIGN                                                   !4, $10
   11    13        INIT_FCALL                                               'preg_replace'
         14        SEND_VAR                                                 !1
         15        SEND_VAR                                                 !3
         16        SEND_VAR                                                 !4
         17        SEND_VAL                                                 1
         18        DO_ICALL                                         $12     
         19        ASSIGN                                                   !4, $12
    8    20    >   INIT_FCALL                                               'preg_match'
         21        SEND_VAR                                                 !0
         22        SEND_VAR                                                 !4
         23        DO_ICALL                                         $14     
         24      > JMPZ_EX                                          ~15     $14, ->30
         25    >   INIT_FCALL                                               'preg_match'
         26        SEND_VAR                                                 !1
         27        SEND_VAR                                                 !4
         28        DO_ICALL                                         $16     
         29        BOOL                                             ~15     $16
         30    > > JMPNZ                                                    ~15, ->6
   15    31    >   ECHO                                                     !4
         32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.97 ms | 1396 KiB | 17 Q