3v4l.org

run code in 300+ PHP versions simultaneously
<?php class B{ static $bobo; } class A{ function __construct($a, $b, $c){ $this->a = $a; $this->b = $b; $this->c = $c; } function __destruct(){ B::$bobo = $this; } } $x = new A(10,20,30); var_dump($x); unset($x); var_dump(B::$bobo);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/A1gkQ
function name:  (null)
number of ops:  15
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $1      'A'
          1        SEND_VAL_EX                                              10
          2        SEND_VAL_EX                                              20
          3        SEND_VAL_EX                                              30
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $1
   19     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
   20     9        UNSET_CV                                                 !0
   21    10        INIT_FCALL                                               'var_dump'
         11        FETCH_STATIC_PROP_R          unknown             ~5      'bobo'
         12        SEND_VAL                                                 ~5
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Class B: [no user functions]
Class A:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/A1gkQ
function name:  __construct
number of ops:  10
compiled vars:  !0 = $a, !1 = $b, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
    9     3        ASSIGN_OBJ                                               'a'
          4        OP_DATA                                                  !0
   10     5        ASSIGN_OBJ                                               'b'
          6        OP_DATA                                                  !1
   11     7        ASSIGN_OBJ                                               'c'
          8        OP_DATA                                                  !2
   12     9      > RETURN                                                   null

End of function __construct

Function __destruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/A1gkQ
function name:  __destruct
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   FETCH_THIS                                       ~1      
          1        ASSIGN_STATIC_PROP                                       'bobo', 'B'
          2        OP_DATA                                                  ~1
   15     3      > RETURN                                                   null

End of function __destruct

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.8 ms | 1396 KiB | 15 Q