3v4l.org

run code in 300+ PHP versions simultaneously
<?php class My {} $my = new My(); debug_zval_dump($my); $foo = function () use ($my) { debug_zval_dump($my); }; $foo(); debug_zval_dump($my);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ldA94
function name:  (null)
number of ops:  15
compiled vars:  !0 = $my, !1 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   NEW                                              $2      'My'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    6     3        INIT_FCALL                                               'debug_zval_dump'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
    8     6        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FldA94%3A8%240'
          7        BIND_LEXICAL                                             ~6, !0
          8        ASSIGN                                                   !1, ~6
   12     9        INIT_DYNAMIC_CALL                                        !1
         10        DO_FCALL                                      0          
   14    11        INIT_FCALL                                               'debug_zval_dump'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FldA94%3A8%240

Class My: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.53 ms | 1395 KiB | 15 Q