3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { } function deleteMe(&$obj) { $obj = function(){}; } $foo = new Foo(); var_dump($foo); deleteMe($foo); var_dump($foo);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XZ3mK
function name:  (null)
number of ops:  13
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   13     3        INIT_FCALL                                               'var_dump'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
   14     6        INIT_FCALL                                               'deleteme'
          7        SEND_REF                                                 !0
          8        DO_FCALL                                      0          
   15     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Function deleteme:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XZ3mK
function name:  deleteMe
number of ops:  4
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    9     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FXZ3mK%3A9%240'
          2        ASSIGN                                                   !0, ~1
   10     3      > RETURN                                                   null

End of function deleteme

Function %00%7Bclosure%7D%2Fin%2FXZ3mK%3A9%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XZ3mK
function name:  {closure}
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E > > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FXZ3mK%3A9%240

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.07 ms | 1398 KiB | 16 Q