3v4l.org

run code in 300+ PHP versions simultaneously
<?php $inRootDefinedVar = "Nope.php"; function namedFunction(){ // this should contain "Nope.php" instead it's null var_dump($inRootDefinedVar); } $lamba = function(){ // this should contain "Nope.php" instead it's null var_dump($inRootDefinedVar); };
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sS7TK
function name:  (null)
number of ops:  4
compiled vars:  !0 = $inRootDefinedVar, !1 = $lamba
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Nope.php'
   10     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FsS7TK%3A10%240'
          2        ASSIGN                                                   !1, ~3
   13     3      > RETURN                                                   1

Function namedfunction:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sS7TK
function name:  namedFunction
number of ops:  4
compiled vars:  !0 = $inRootDefinedVar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'var_dump'
          1        SEND_VAR                                                 !0
          2        DO_ICALL                                                 
    8     3      > RETURN                                                   null

End of function namedfunction

Function %00%7Bclosure%7D%2Fin%2FsS7TK%3A10%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sS7TK
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $inRootDefinedVar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'var_dump'
          1        SEND_VAR                                                 !0
          2        DO_ICALL                                                 
   13     3      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FsS7TK%3A10%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.95 ms | 1395 KiB | 15 Q