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(); $callee = new Callee(); $ex->match([$callee, 'yo']);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZWoes
function name:  (null)
number of ops:  12
compiled vars:  !0 = $ex, !1 = $callee
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $2      'Example'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   20     3        NEW                                              $5      'Callee'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   21     6        INIT_METHOD_CALL                                         !0, 'match'
          7        INIT_ARRAY                                       ~8      !1
          8        ADD_ARRAY_ELEMENT                                ~8      'yo'
          9        SEND_VAL_EX                                              ~8
         10        DO_FCALL                                      0          
         11      > RETURN                                                   1

Class Example:
Function match:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZWoes
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/ZWoes
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:
168.13 ms | 1394 KiB | 13 Q