3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = null; $a->__invoke = function(){echo 'A object called';}; echo $a(); function x(){ return function(){ return 'something big'; }; } $w = x(); echo $w->__invoke();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MK9Kb
function name:  (null)
number of ops:  14
compiled vars:  !0 = $a, !1 = $w
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, null
    4     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FMK9Kb%3A4%240'
          2        ASSIGN_OBJ                                               !0, '__invoke'
          3        OP_DATA                                                  ~4
    6     4        INIT_DYNAMIC_CALL                                        !0
          5        DO_FCALL                                      0  $5      
          6        ECHO                                                     $5
   15     7        INIT_FCALL                                               'x'
          8        DO_FCALL                                      0  $6      
          9        ASSIGN                                                   !1, $6
   17    10        INIT_METHOD_CALL                                         !1, '__invoke'
         11        DO_FCALL                                      0  $8      
         12        ECHO                                                     $8
         13      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FMK9Kb%3A4%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MK9Kb
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ECHO                                                     'A+object+called'
          1      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FMK9Kb%3A4%240

Function x:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MK9Kb
function name:  x
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FMK9Kb%3A10%241'
   12     1      > RETURN                                                   ~0
   13     2*     > RETURN                                                   null

End of function x

Function %00%7Bclosure%7D%2Fin%2FMK9Kb%3A10%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MK9Kb
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E > > RETURN                                                   'something+big'
   12     1*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FMK9Kb%3A10%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
185.59 ms | 1399 KiB | 14 Q