3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class F { const id = __CLASS__; public static function start() { static::run(new static); } protected static function run(F $f) { echo __CLASS__, PHP_EOL; $instance->dynamicRun(); } protected function dynamicRun() { echo self::id, PHP_EOL, get_class($this); } } class S extends F { const id = __CLASS__; protected static function run(F $f) { echo __CLASS__, PHP_EOL; parent::run($f); } } S::start();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hpg72
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   INIT_STATIC_METHOD_CALL                                  'S', 'start'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

Class F:
Function start:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hpg72
function name:  start
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_STATIC_METHOD_CALL                                  'run'
          1        NEW                          static              $0      
          2        DO_FCALL                                      0          
          3        SEND_VAR_NO_REF_EX                                       $0
          4        DO_FCALL                                      0          
    8     5      > RETURN                                                   null

End of function start

Function run:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hpg72
function name:  run
number of ops:  6
compiled vars:  !0 = $f, !1 = $instance
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        ECHO                                                     'F'
          2        ECHO                                                     '%0A'
   11     3        INIT_METHOD_CALL                                         !1, 'dynamicRun'
          4        DO_FCALL                                      0          
   12     5      > RETURN                                                   null

End of function run

Function dynamicrun:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hpg72
function name:  dynamicRun
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   ECHO                                                     'F'
          1        ECHO                                                     '%0A'
          2        FETCH_THIS                                       ~0      
          3        GET_CLASS                                        ~1      ~0
          4        ECHO                                                     ~1
   15     5      > RETURN                                                   null

End of function dynamicrun

End of class F.

Class S:
Function run:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hpg72
function name:  run
number of ops:  7
compiled vars:  !0 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   RECV                                             !0      
   21     1        ECHO                                                     'S'
          2        ECHO                                                     '%0A'
   22     3        INIT_STATIC_METHOD_CALL                                  'run'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0          
   23     6      > RETURN                                                   null

End of function run

Function start:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hpg72
function name:  start
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_STATIC_METHOD_CALL                                  'run'
          1        NEW                          static              $0      
          2        DO_FCALL                                      0          
          3        SEND_VAR_NO_REF_EX                                       $0
          4        DO_FCALL                                      0          
    8     5      > RETURN                                                   null

End of function start

Function dynamicrun:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hpg72
function name:  dynamicRun
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   ECHO                                                     'F'
          1        ECHO                                                     '%0A'
          2        FETCH_THIS                                       ~0      
          3        GET_CLASS                                        ~1      ~0
          4        ECHO                                                     ~1
   15     5      > RETURN                                                   null

End of function dynamicrun

End of class S.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.4 ms | 1399 KiB | 13 Q