3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class FooAbstract { static $bar; static function setBar($bar) { static::$bar = $bar; } } class Foo extends FooAbstract {} FooAbstract::setBar('qux'); var_dump(FooAbstract::$bar, Foo::$bar);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WNeGD
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_STATIC_METHOD_CALL                                  'FooAbstract', 'setBar'
          1        SEND_VAL                                                 'qux'
          2        DO_FCALL                                      0          
   15     3        INIT_FCALL                                               'var_dump'
          4        FETCH_STATIC_PROP_R          unknown             ~1      'bar'
          5        SEND_VAL                                                 ~1
          6        FETCH_STATIC_PROP_R          unknown             ~2      'bar'
          7        SEND_VAL                                                 ~2
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Class FooAbstract:
Function setbar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WNeGD
function name:  setBar
number of ops:  4
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        ASSIGN_STATIC_PROP                                       'bar'
          2        OP_DATA                                                  !0
    8     3      > RETURN                                                   null

End of function setbar

End of class FooAbstract.

Class Foo:
Function setbar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WNeGD
function name:  setBar
number of ops:  4
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        ASSIGN_STATIC_PROP                                       'bar'
          2        OP_DATA                                                  !0
    8     3      > RETURN                                                   null

End of function setbar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.42 ms | 1395 KiB | 15 Q