3v4l.org

run code in 300+ PHP versions simultaneously
<?php $imgStr = '<img src="http://ww2.sinaimg.cn/bmiddle/a3d444e3jw1ez79amvdi1j20l50s8gpl.jpg"/>'; $imgStr = preg_replace_callback('#<img([^>]+?)src=[\'"]?([^\'"\s>]+)[\'"]?([^>]*)>#',function($match) {var_dump($match);},$imgStr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/X9HAE
function name:  (null)
number of ops:  9
compiled vars:  !0 = $imgStr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Cimg+src%3D%22http%3A%2F%2Fww2.sinaimg.cn%2Fbmiddle%2Fa3d444e3jw1ez79amvdi1j20l50s8gpl.jpg%22%2F%3E'
    4     1        INIT_FCALL                                               'preg_replace_callback'
          2        SEND_VAL                                                 '%23%3Cimg%28%5B%5E%3E%5D%2B%3F%29src%3D%5B%27%22%5D%3F%28%5B%5E%27%22%5Cs%3E%5D%2B%29%5B%27%22%5D%3F%28%5B%5E%3E%5D%2A%29%3E%23'
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FX9HAE%3A4%240'
          4        SEND_VAL                                                 ~2
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $3      
          7        ASSIGN                                                   !0, $3
          8      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FX9HAE%3A4%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/X9HAE
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $match
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
          4      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FX9HAE%3A4%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.06 ms | 1395 KiB | 17 Q