3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = '<html> <head> <etc /> </head> <body> <div><img src="blah.jpg" /></div><br /> </body> </html>'; $regex = '#<img .*?\/>#'; preg_match($regex, $html, $matches); var_dump($matches[0]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4NCNs
function name:  (null)
number of ops:  12
compiled vars:  !0 = $html, !1 = $regex, !2 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Chtml%3E%0A%3Chead%3E%0A%3Cetc+%2F%3E%0A%3C%2Fhead%3E%0A%3Cbody%3E%0A%3Cdiv%3E%3Cimg+src%3D%22blah.jpg%22+%2F%3E%3C%2Fdiv%3E%3Cbr+%2F%3E%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
   12     1        ASSIGN                                                   !1, '%23%3Cimg+.%2A%3F%5C%2F%3E%23'
   14     2        INIT_FCALL                                               'preg_match'
          3        SEND_VAR                                                 !1
          4        SEND_VAR                                                 !0
          5        SEND_REF                                                 !2
          6        DO_ICALL                                                 
   16     7        INIT_FCALL                                               'var_dump'
          8        FETCH_DIM_R                                      ~6      !2, 0
          9        SEND_VAL                                                 ~6
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.88 ms | 1010 KiB | 15 Q