3v4l.org

run code in 300+ PHP versions simultaneously
<?php $param = 666; function meaningOfLife() { $param = 1; $func = function() use(&$param) { $param = 42; }; $func(); print $param; } meaningOfLife();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GmeeL
function name:  (null)
number of ops:  4
compiled vars:  !0 = $param
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 666
   14     1        INIT_FCALL                                               'meaningoflife'
          2        DO_FCALL                                      0          
          3      > RETURN                                                   1

Function meaningoflife:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GmeeL
function name:  meaningOfLife
number of ops:  8
compiled vars:  !0 = $param, !1 = $func
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, 1
    7     1        DECLARE_LAMBDA_FUNCTION                          ~3      [0]
          2        BIND_LEXICAL                                             ~3, !0
          3        ASSIGN                                                   !1, ~3
   10     4        INIT_DYNAMIC_CALL                                        !1
          5        DO_FCALL                                      0          
   11     6        ECHO                                                     !0
   12     7      > RETURN                                                   null


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GmeeL
function name:  {closure}
number of ops:  3
compiled vars:  !0 = $param
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   BIND_STATIC                                              !0
    8     1        ASSIGN                                                   !0, 42
    9     2      > RETURN                                                   null

End of Dynamic Function 0

End of function meaningoflife

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.23 ms | 1002 KiB | 14 Q