3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { public static $f = 'f-a'; public function _echo() { print(static::$f . "\n"); } public function set() { static::$f = get_called_class(); } } class b1 extends a{} class b2 extends a{} $c1 = new b1;$c1->set(); $c2 = new b2;$c2->set(); $c1->_echo();$c2->_echo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oeGaK
function name:  (null)
number of ops:  15
compiled vars:  !0 = $c1, !1 = $c2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   NEW                                              $2      'b1'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
          3        INIT_METHOD_CALL                                         !0, 'set'
          4        DO_FCALL                                      0          
   23     5        NEW                                              $6      'b2'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $6
          8        INIT_METHOD_CALL                                         !1, 'set'
          9        DO_FCALL                                      0          
   25    10        INIT_METHOD_CALL                                         !0, '_echo'
         11        DO_FCALL                                      0          
         12        INIT_METHOD_CALL                                         !1, '_echo'
         13        DO_FCALL                                      0          
         14      > RETURN                                                   1

Class a:
Function _echo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oeGaK
function name:  _echo
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'f'
          1        CONCAT                                           ~1      ~0, '%0A'
          2        ECHO                                                     ~1
    9     3      > RETURN                                                   null

End of function _echo

Function set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oeGaK
function name:  set
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   GET_CALLED_CLASS                                 ~1      
          1        ASSIGN_STATIC_PROP                                       'f'
          2        OP_DATA                                                  ~1
   14     3      > RETURN                                                   null

End of function set

End of class a.

Class b1:
Function _echo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oeGaK
function name:  _echo
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'f'
          1        CONCAT                                           ~1      ~0, '%0A'
          2        ECHO                                                     ~1
    9     3      > RETURN                                                   null

End of function _echo

Function set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oeGaK
function name:  set
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   GET_CALLED_CLASS                                 ~1      
          1        ASSIGN_STATIC_PROP                                       'f'
          2        OP_DATA                                                  ~1
   14     3      > RETURN                                                   null

End of function set

End of class b1.

Class b2:
Function _echo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oeGaK
function name:  _echo
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'f'
          1        CONCAT                                           ~1      ~0, '%0A'
          2        ECHO                                                     ~1
    9     3      > RETURN                                                   null

End of function _echo

Function set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oeGaK
function name:  set
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   GET_CALLED_CLASS                                 ~1      
          1        ASSIGN_STATIC_PROP                                       'f'
          2        OP_DATA                                                  ~1
   14     3      > RETURN                                                   null

End of function set

End of class b2.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.93 ms | 1399 KiB | 13 Q