3v4l.org

run code in 300+ PHP versions simultaneously
<?php class B{ static $bobo; } class A{ function __destruct(){ debug_zval_dump($this); B::$bobo = $this; debug_zval_dump($this); } } $x = new A; debug_zval_dump($x); unset($x);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XQ7ul
function name:  (null)
number of ops:  8
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $1      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   16     3        INIT_FCALL                                               'debug_zval_dump'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
   18     6        UNSET_CV                                                 !0
          7      > RETURN                                                   1

Class B: [no user functions]
Class A:
Function __destruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XQ7ul
function name:  __destruct
number of ops:  12
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'debug_zval_dump'
          1        FETCH_THIS                                       ~0      
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
   10     4        FETCH_THIS                                       ~3      
          5        ASSIGN_STATIC_PROP                                       'bobo', 'B'
          6        OP_DATA                                                  ~3
   11     7        INIT_FCALL                                               'debug_zval_dump'
          8        FETCH_THIS                                       ~4      
          9        SEND_VAL                                                 ~4
         10        DO_ICALL                                                 
   12    11      > RETURN                                                   null

End of function __destruct

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.39 ms | 1386 KiB | 15 Q