3v4l.org

run code in 300+ PHP versions simultaneously
<?php function demo(callable $callback) { $callback(); } class A { function great($name) { return 'Hello ' . $name; } } demo(new class () extends A { public function __invoke() { echo $this->great(get_class()); } });
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MNhUc
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'demo'
          1        DECLARE_ANON_CLASS                               <unknown> 'a'
          2        NEW                                              $1      $0
          3        DO_FCALL                                      0          
          4        SEND_VAR                                                 $1
          5        DO_FCALL                                      0          
   18     6      > RETURN                                                   1

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

End of function demo

Class A:
Function great:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MNhUc
function name:  great
number of ops:  4
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        CONCAT                                           ~1      'Hello+', !0
          2      > RETURN                                                   ~1
   11     3*     > RETURN                                                   null

End of function great

End of class A.

Class A@anonymous:
Function __invoke:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MNhUc
function name:  __invoke
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_METHOD_CALL                                         'great'
          1        GET_CLASS                                        ~0      
          2        SEND_VAL_EX                                              ~0
          3        DO_FCALL                                      0  $1      
          4        ECHO                                                     $1
   17     5      > RETURN                                                   null

End of function __invoke

End of class A@anonymous.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.02 ms | 1399 KiB | 14 Q