3v4l.org

run code in 300+ PHP versions simultaneously
<?php class B{ static $bobo; } class A{ function __destruct(){ echo "2: "; debug_zval_dump($this); B::$bobo = $this; echo "3: "; debug_zval_dump($this); B::$bobo = null; echo "4: "; debug_zval_dump($this); } } $x = new A; echo "1: "; debug_zval_dump($x); unset($x);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YE85h
function name:  (null)
number of ops:  9
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   NEW                                              $1      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   22     3        ECHO                                                     '1%3A+'
   23     4        INIT_FCALL                                               'debug_zval_dump'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
   25     7        UNSET_CV                                                 !0
          8      > 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/YE85h
function name:  __destruct
number of ops:  21
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ECHO                                                     '2%3A+'
   10     1        INIT_FCALL                                               'debug_zval_dump'
          2        FETCH_THIS                                       ~0      
          3        SEND_VAL                                                 ~0
          4        DO_ICALL                                                 
   11     5        FETCH_THIS                                       ~3      
          6        ASSIGN_STATIC_PROP                                       'bobo', 'B'
          7        OP_DATA                                                  ~3
   12     8        ECHO                                                     '3%3A+'
   13     9        INIT_FCALL                                               'debug_zval_dump'
         10        FETCH_THIS                                       ~4      
         11        SEND_VAL                                                 ~4
         12        DO_ICALL                                                 
   15    13        ASSIGN_STATIC_PROP                                       'bobo', 'B'
         14        OP_DATA                                                  null
   16    15        ECHO                                                     '4%3A+'
   17    16        INIT_FCALL                                               'debug_zval_dump'
         17        FETCH_THIS                                       ~7      
         18        SEND_VAL                                                 ~7
         19        DO_ICALL                                                 
   18    20      > RETURN                                                   null

End of function __destruct

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
190.86 ms | 1396 KiB | 15 Q