3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace A { class Foo { public $foo; public function __construct() { $this->foo = function (int $a) { var_dump("foo"); }; } } } namespace { $foo = (new A\Foo)->foo; ($foo)(null); echo "Done\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/h20uE
function name:  (null)
number of ops:  9
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $1      'A%5CFoo'
          1        DO_FCALL                                      0          
          2        FETCH_OBJ_R                                      ~3      $1, 'foo'
          3        ASSIGN                                                   !0, ~3
   17     4        INIT_DYNAMIC_CALL                                        !0
          5        SEND_VAL_EX                                              null
          6        DO_FCALL                                      0          
   18     7        ECHO                                                     'Done%0A'
   19     8      > RETURN                                                   1

Function %00a%5C%7Bclosure%7D%2Fin%2Fh20uE%3A8%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/h20uE
function name:  A\{closure}
number of ops:  5
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        INIT_NS_FCALL_BY_NAME                                    'A%5Cvar_dump'
          2        SEND_VAL_EX                                              'foo'
          3        DO_FCALL                                      0          
   10     4      > RETURN                                                   null

End of function %00a%5C%7Bclosure%7D%2Fin%2Fh20uE%3A8%240

Class A\Foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/h20uE
function name:  __construct
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00a%5C%7Bclosure%7D%2Fin%2Fh20uE%3A8%240'
          1        ASSIGN_OBJ                                               'foo'
   10     2        OP_DATA                                                  ~1
   11     3      > RETURN                                                   null

End of function __construct

End of class A\Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.6 ms | 1395 KiB | 15 Q