3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo 'Hello World'; $callback_search = array( '/<(a) [^>]*href=("|\')([^"\']+)\2([^>]*)>(.*?)<\/a>/i' ); $text=array( '<a href="/products/gia-galbanize" title="asdfadsf">asfasdf</a></li>' ); function _preg_callback($matches) { echo "\r\n"; echo "******************************"; echo "\r\n"; print_r($matches); echo "\r\n"; echo "******************************"; echo "\r\n"; } preg_replace_callback( $callback_search, array($this, '_preg_callback'), $text); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/M1jPu
function name:  (null)
number of ops:  12
compiled vars:  !0 = $callback_search, !1 = $text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ECHO                                                     'Hello+World'
    6     1        ASSIGN                                                   !0, <array>
   10     2        ASSIGN                                                   !1, <array>
   24     3        INIT_FCALL                                               'preg_replace_callback'
          4        SEND_VAR                                                 !0
          5        FETCH_THIS                                       ~4      
          6        INIT_ARRAY                                       ~5      ~4
          7        ADD_ARRAY_ELEMENT                                ~5      '_preg_callback'
          8        SEND_VAL                                                 ~5
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                                 
   28    11      > RETURN                                                   1

Function _preg_callback:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/M1jPu
function name:  _preg_callback
number of ops:  11
compiled vars:  !0 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
   16     1        ECHO                                                     '%0D%0A'
   17     2        ECHO                                                     '%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A'
   18     3        ECHO                                                     '%0D%0A'
   19     4        INIT_FCALL                                               'print_r'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
   20     7        ECHO                                                     '%0D%0A'
   21     8        ECHO                                                     '%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A'
   22     9        ECHO                                                     '%0D%0A'
   23    10      > RETURN                                                   null

End of function _preg_callback

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
188.95 ms | 1395 KiB | 17 Q