3v4l.org

run code in 300+ PHP versions simultaneously
<?php $res = new MY_CLASS; echo $res -> value; if (true) { class MY_CLASS { public $value = 'OK!!!'; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/brZHN
function name:  (null)
number of ops:  8
compiled vars:  !0 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $1      'MY_CLASS'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
    4     3        FETCH_OBJ_R                                      ~4      !0, 'value'
          4        ECHO                                                     ~4
    6     5      > JMPZ                                                     <true>, ->7
    7     6    >   DECLARE_CLASS                                            'my_class'
   10     7    > > RETURN                                                   1

Class MY_CLASS: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.61 ms | 1392 KiB | 13 Q