3v4l.org

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

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

End of function __destruct

End of class class@anonymous.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
162.04 ms | 1988 KiB | 14 Q