3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Table { protected static $id=0; public static function drag() { $id = self::$id++; echo "Table $id" . PHP_EOL; } } class TableEx extends Table { public static function drag() { $id = self::$id++; echo "TableEx $id" . PHP_EOL; } } Table::drag(); Table::drag(); TableEx::drag(); TableEx::drag();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6p6kv
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   18     0  E >   INIT_STATIC_METHOD_CALL                                      'Table', 'drag'
          1        DO_FCALL                                          0          
   19     2        INIT_STATIC_METHOD_CALL                                      'Table', 'drag'
          3        DO_FCALL                                          0          
   20     4        INIT_STATIC_METHOD_CALL                                      'TableEx', 'drag'
          5        DO_FCALL                                          0          
   21     6        INIT_STATIC_METHOD_CALL                                      'TableEx', 'drag'
          7        DO_FCALL                                          0          
          8      > RETURN                                                       1

Class Table:
Function drag:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6p6kv
function name:  drag
number of ops:  7
compiled vars:  !0 = $id
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   POST_INC_STATIC_PROP                                 ~1      'id'
          1        ASSIGN                                                       !0, ~1
    7     2        NOP                                                          
          3        FAST_CONCAT                                          ~3      'Table+', !0
          4        CONCAT                                               ~4      ~3, '%0A'
          5        ECHO                                                         ~4
    8     6      > RETURN                                                       null

End of function drag

End of class Table.

Class TableEx:
Function drag:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6p6kv
function name:  drag
number of ops:  7
compiled vars:  !0 = $id
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   13     0  E >   POST_INC_STATIC_PROP                                 ~1      'id'
          1        ASSIGN                                                       !0, ~1
   14     2        NOP                                                          
          3        FAST_CONCAT                                          ~3      'TableEx+', !0
          4        CONCAT                                               ~4      ~3, '%0A'
          5        ECHO                                                         ~4
   15     6      > RETURN                                                       null

End of function drag

End of class TableEx.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
139.99 ms | 500 KiB | 9 Q