3v4l.org

run code in 300+ PHP versions simultaneously
<?php class destructor { function __destruct() { $GLOBALS['b'] = 2; } } $b = new destructor; $a = 1; $b = 1; echo $a + $b;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZurZB
function name:  (null)
number of ops:  8
compiled vars:  !0 = $b, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $2      'destructor'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   11     3        ASSIGN                                                   !1, 1
   12     4        ASSIGN                                                   !0, 1
   13     5        ADD                                              ~7      !1, !0
          6        ECHO                                                     ~7
          7      > RETURN                                                   1

Class destructor:
Function __destruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZurZB
function name:  __destruct
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   FETCH_W                      global              $0      'GLOBALS'
          1        ASSIGN_DIM                                               $0, 'b'
          2        OP_DATA                                                  2
    6     3      > RETURN                                                   null

End of function __destruct

End of class destructor.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.33 ms | 1393 KiB | 13 Q