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 ("Monde") extends A { public function __invoke() { echo $this->greate('world'); } });
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PoMh9
function name:  (null)
number of ops:  8
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        SEND_VAL_EX                                              'Monde'
          4        DO_FCALL                                      0          
          5        SEND_VAR                                                 $1
          6        DO_FCALL                                      0          
   18     7      > RETURN                                                   1

Function demo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PoMh9
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/PoMh9
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/PoMh9
function name:  __invoke
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_METHOD_CALL                                         'greate'
          1        SEND_VAL_EX                                              'world'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
   17     4      > RETURN                                                   null

End of function __invoke

End of class A@anonymous.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
188.32 ms | 1399 KiB | 14 Q