3v4l.org

run code in 500+ PHP versions simultaneously
<?php class First { protected static $test = 'foo'; protected static $test2 = 'foo'; public function test() { var_dump(self::$test, static::$test2); } } class Second extends First { protected static $test = 'bar'; protected static $test2 = 'bar'; } $second = new Second; $second->test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oviE9
function name:  (null)
number of ops:  6
compiled vars:  !0 = $second
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   20     0  E >   NEW                                                  $1      'Second'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
   21     3        INIT_METHOD_CALL                                             !0, 'test'
          4        DO_FCALL                                          0          
          5      > RETURN                                                       1

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

End of function test

End of class First.

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

End of function test

End of class Second.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
135.13 ms | 2048 KiB | 14 Q