3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Test { public static $x = 0; } class Test2 extends Test { // $x is inherited } class Test3 extends Test { // $x is NOT inherited public static $x = 3; } $x = 1; Test2::$x = &$x; var_dump(Test::$x, Test2::$x, Test3::$x); // int(1), int(1), int(3) ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/78oEF
function name:  (null)
number of ops:  12
compiled vars:  !0 = $x
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   14     0  E >   ASSIGN                                                       !0, 1
   15     1        ASSIGN_STATIC_PROP_REF                                       'x', 'Test2'
          2        OP_DATA                                                      !0
   17     3        INIT_FCALL                                                   'var_dump'
          4        FETCH_STATIC_PROP_R              unknown             ~3      'x'
          5        SEND_VAL                                                     ~3
          6        FETCH_STATIC_PROP_R              unknown             ~4      'x'
          7        SEND_VAL                                                     ~4
          8        FETCH_STATIC_PROP_R              unknown             ~5      'x'
          9        SEND_VAL                                                     ~5
         10        DO_ICALL                                                     
   19    11      > RETURN                                                       1

Class Test: [no user functions]
Class Test2: [no user functions]
Class Test3: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
145.16 ms | 1468 KiB | 14 Q