3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { static $abc; function __construct() { var_dump(self::$abc); } } class Bar extends Foo { } $rf = new ReflectionClass('Bar'); $rf->setStaticPropertyValue('abc', 'hi2'); $foo = $rf->newInstance();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/G9Fom
function name:  (null)
number of ops:  12
compiled vars:  !0 = $rf, !1 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $2      'ReflectionClass'
          1        SEND_VAL_EX                                              'Bar'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   15     4        INIT_METHOD_CALL                                         !0, 'setStaticPropertyValue'
          5        SEND_VAL_EX                                              'abc'
          6        SEND_VAL_EX                                              'hi2'
          7        DO_FCALL                                      0          
   16     8        INIT_METHOD_CALL                                         !0, 'newInstance'
          9        DO_FCALL                                      0  $6      
         10        ASSIGN                                                   !1, $6
         11      > RETURN                                                   1

Class Foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/G9Fom
function name:  __construct
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_STATIC_PROP_R          global lock         ~0      'abc'
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
    7     4      > RETURN                                                   null

End of function __construct

End of class Foo.

Class Bar:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/G9Fom
function name:  __construct
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_STATIC_PROP_R          global lock         ~0      'abc'
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
    7     4      > RETURN                                                   null

End of function __construct

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.34 ms | 1396 KiB | 15 Q