3v4l.org

run code in 300+ PHP versions simultaneously
<?php function actually_unset(&$var){ unset($var); gc_collect_cycles(); } class Foo{ function __destruct(){ echo "destruct "; } } $var = new Foo; actually_unset($var); echo "wat";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IFc91
function name:  (null)
number of ops:  8
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   15     3        INIT_FCALL                                               'actually_unset'
          4        SEND_REF                                                 !0
          5        DO_FCALL                                      0          
   16     6        ECHO                                                     'wat'
          7      > RETURN                                                   1

Function actually_unset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IFc91
function name:  actually_unset
number of ops:  5
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        UNSET_CV                                                 !0
    5     2        INIT_FCALL                                               'gc_collect_cycles'
          3        DO_ICALL                                                 
    6     4      > RETURN                                                   null

End of function actually_unset

Class Foo:
Function __destruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IFc91
function name:  __destruct
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ECHO                                                     'destruct+'
   11     1      > RETURN                                                   null

End of function __destruct

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.21 ms | 1408 KiB | 16 Q