3v4l.org

run code in 300+ PHP versions simultaneously
<?php function set($name, callable $spec) { $registry[$name] = $spec; $converted[$name] = false; } class Hello { public function __invoke() { echo 'From invoke'; } } $hello = new Hello(); set('hello', $hello);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5MqQf
function name:  (null)
number of ops:  8
compiled vars:  !0 = $hello
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $1      'Hello'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   15     3        INIT_FCALL                                               'set'
          4        SEND_VAL                                                 'hello'
          5        SEND_VAR                                                 !0
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

Function set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5MqQf
function name:  set
number of ops:  7
compiled vars:  !0 = $name, !1 = $spec, !2 = $registry, !3 = $converted
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        ASSIGN_DIM                                               !2, !0
          3        OP_DATA                                                  !1
    5     4        ASSIGN_DIM                                               !3, !0
          5        OP_DATA                                                  <false>
    6     6      > RETURN                                                   null

End of function set

Class Hello:
Function __invoke:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5MqQf
function name:  __invoke
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ECHO                                                     'From+invoke'
   12     1      > RETURN                                                   null

End of function __invoke

End of class Hello.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.34 ms | 1398 KiB | 14 Q