3v4l.org

run code in 500+ PHP versions simultaneously
<?php echo (new Bar)->someattr; echo (new Egg)->someattr; exit(0); class Bar { public $someattr = 1; } class Egg extends Bar { public $someattr = 2; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 61) Position 1 = -2
filename:       /in/oeZ33
function name:  (null)
number of ops:  12
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   NEW                                                  $0      'Bar'
          1        DO_FCALL                                          0          
          2        FETCH_OBJ_R                                          ~2      $0, 'someattr'
          3        ECHO                                                         ~2
    4     4        NEW                                                  $3      'Egg'
          5        DO_FCALL                                          0          
          6        FETCH_OBJ_R                                          ~5      $3, 'someattr'
          7        ECHO                                                         ~5
    6     8      > INIT_FCALL                                                   'exit'
          9*       SEND_VAL                                                     0
         10*       DO_ICALL                                                     
   16    11*     > RETURN                                                       1

Class Bar: [no user functions]
Class Egg: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
169.56 ms | 1161 KiB | 14 Q