3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = null; $foo = function() use (&$foo){ var_dump($foo); return $foo; }; ($foo()->__invoke()==$foo);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/O8V7Q
function name:  (null)
number of ops:  11
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, null
    3     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FO8V7Q%3A3%240'
          2        BIND_LEXICAL                                             ~2, !0
          3        ASSIGN                                                   !0, ~2
    7     4        INIT_DYNAMIC_CALL                                        !0
          5        DO_FCALL                                      0  $4      
          6        INIT_METHOD_CALL                                         $4, '__invoke'
          7        DO_FCALL                                      0  $5      
          8        IS_EQUAL                                         ~6      !0, $5
          9        FREE                                                     ~6
         10      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FO8V7Q%3A3%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.11 ms | 1395 KiB | 15 Q