3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Example { public function match(callable $cb) { echo $cb(); } } class Callee { public function yo() { return "If I show up, I'm allowed to do this!"; } } $ex = new Example(); $ex->match(['Callee', 'yo']);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JJ8kR
function name:  (null)
number of ops:  7
compiled vars:  !0 = $ex
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $1      'Example'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   20     3        INIT_METHOD_CALL                                         !0, 'match'
          4        SEND_VAL_EX                                              <array>
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Class Example:
Function match:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JJ8kR
function name:  match
number of ops:  5
compiled vars:  !0 = $cb
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    7     1        INIT_DYNAMIC_CALL                                        !0
          2        DO_FCALL                                      0  $1      
          3        ECHO                                                     $1
    8     4      > RETURN                                                   null

End of function match

End of class Example.

Class Callee:
Function yo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JJ8kR
function name:  yo
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E > > RETURN                                                   'If+I+show+up%2C+I%27m+allowed+to+do+this%21'
   16     1*     > RETURN                                                   null

End of function yo

End of class Callee.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.46 ms | 1393 KiB | 13 Q