3v4l.org

run code in 300+ PHP versions simultaneously
<?PHP ABSTRACT CLASS Base { protected static $stub = ['baz']; //final public function boot() static public function boot() { print __METHOD__.'-> '.get_called_class().PHP_EOL; array_walk(static::$stub, function() { print __METHOD__.'-> '.get_called_class().PHP_EOL; }); } public function __construct() { self::boot(); print __METHOD__.'-> '.get_called_class().PHP_EOL; array_walk(static::$stub, function() { print __METHOD__.'-> '.get_called_class().PHP_EOL; }); } } CLASS Sub EXTENDS Base { } Sub::boot(); print PHP_EOL; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/d2S6t
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   33     0  E >   INIT_STATIC_METHOD_CALL                                  'Sub', 'boot'
          1        DO_FCALL                                      0          
          2        ECHO                                                     '%0A'
   34     3      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2Fd2S6t%3A11%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/d2S6t
function name:  {closure}
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   GET_CALLED_CLASS                                 ~0      
          1        CONCAT                                           ~1      '%7Bclosure%7D-%3E+', ~0
          2        CONCAT                                           ~2      ~1, '%0A'
          3        ECHO                                                     ~2
   14     4      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fd2S6t%3A11%240

Function %00%7Bclosure%7D%2Fin%2Fd2S6t%3A22%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/d2S6t
function name:  {closure}
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   GET_CALLED_CLASS                                 ~0      
          1        CONCAT                                           ~1      '%7Bclosure%7D-%3E+', ~0
          2        CONCAT                                           ~2      ~1, '%0A'
          3        ECHO                                                     ~2
   25     4      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fd2S6t%3A22%241

Class Base:
Function boot:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/d2S6t
function name:  boot
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   GET_CALLED_CLASS                                 ~0      
          1        CONCAT                                           ~1      'Base%3A%3Aboot-%3E+', ~0
          2        CONCAT                                           ~2      ~1, '%0A'
          3        ECHO                                                     ~2
   11     4        INIT_FCALL                                               'array_walk'
          5        FETCH_STATIC_PROP_W          unknown             $3      'stub'
          6        SEND_REF                                                 $3
          7        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fd2S6t%3A11%240'
   14     8        SEND_VAL                                                 ~4
          9        DO_ICALL                                                 
   15    10      > RETURN                                                   null

End of function boot

Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/d2S6t
function name:  __construct
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   INIT_STATIC_METHOD_CALL                                  'boot'
          1        DO_FCALL                                      0          
   20     2        GET_CALLED_CLASS                                 ~1      
          3        CONCAT                                           ~2      'Base%3A%3A__construct-%3E+', ~1
          4        CONCAT                                           ~3      ~2, '%0A'
          5        ECHO                                                     ~3
   22     6        INIT_FCALL                                               'array_walk'
          7        FETCH_STATIC_PROP_W          unknown             $4      'stub'
          8        SEND_REF                                                 $4
          9        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fd2S6t%3A22%241'
   25    10        SEND_VAL                                                 ~5
         11        DO_ICALL                                                 
   26    12      > RETURN                                                   null

End of function __construct

End of class Base.

Class Sub:
Function boot:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/d2S6t
function name:  boot
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   GET_CALLED_CLASS                                 ~0      
          1        CONCAT                                           ~1      'Base%3A%3Aboot-%3E+', ~0
          2        CONCAT                                           ~2      ~1, '%0A'
          3        ECHO                                                     ~2
   11     4        INIT_FCALL                                               'array_walk'
          5        FETCH_STATIC_PROP_W          unknown             $3      'stub'
          6        SEND_REF                                                 $3
          7        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fd2S6t%3A11%240'
   14     8        SEND_VAL                                                 ~4
          9        DO_ICALL                                                 
   15    10      > RETURN                                                   null

End of function boot

Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/d2S6t
function name:  __construct
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   INIT_STATIC_METHOD_CALL                                  'boot'
          1        DO_FCALL                                      0          
   20     2        GET_CALLED_CLASS                                 ~1      
          3        CONCAT                                           ~2      'Base%3A%3A__construct-%3E+', ~1
          4        CONCAT                                           ~3      ~2, '%0A'
          5        ECHO                                                     ~3
   22     6        INIT_FCALL                                               'array_walk'
          7        FETCH_STATIC_PROP_W          unknown             $4      'stub'
          8        SEND_REF                                                 $4
          9        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fd2S6t%3A22%241'
   25    10        SEND_VAL                                                 ~5
         11        DO_ICALL                                                 
   26    12      > RETURN                                                   null

End of function __construct

End of class Sub.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.14 ms | 1396 KiB | 15 Q