3v4l.org

run code in 300+ PHP versions simultaneously
<?php class X { private function z($matches) { var_dump($matches); } public function y($template) { preg_replace_callback('//', [$this, 'z'], $template); } } $x = new X(); $x->y('bla bla [[ hey there ]] dasfasdf werwr');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1UYpY
function name:  (null)
number of ops:  7
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $1      'X'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   14     3        INIT_METHOD_CALL                                         !0, 'y'
          4        SEND_VAL_EX                                              'bla+bla+%5B%5B+hey+there+%5D%5D+dasfasdf+werwr'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Class X:
Function z:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1UYpY
function name:  z
number of ops:  5
compiled vars:  !0 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    6     4      > RETURN                                                   null

End of function z

Function y:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1UYpY
function name:  y
number of ops:  10
compiled vars:  !0 = $template
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        INIT_FCALL                                               'preg_replace_callback'
          2        SEND_VAL                                                 '%2F%2F'
          3        FETCH_THIS                                       ~1      
          4        INIT_ARRAY                                       ~2      ~1
          5        ADD_ARRAY_ELEMENT                                ~2      'z'
          6        SEND_VAL                                                 ~2
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
   10     9      > RETURN                                                   null

End of function y

End of class X.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.6 ms | 1395 KiB | 17 Q