3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { const NAME = 'A'; public static function test() { $args = func_get_args(); echo static::NAME, " ".join(',', $args)." \n"; } } class B extends A { const NAME = 'B'; public static function test() { echo self::NAME, "\n"; parent::test('more', 'args'); } } B::test('foo'); function test() { $args = func_get_args(); echo "C ".join(',', $args)." \n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9GKBA
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   INIT_STATIC_METHOD_CALL                                  'B', 'test'
          1        SEND_VAL                                                 'foo'
          2        DO_FCALL                                      0          
   27     3      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9GKBA
function name:  test
number of ops:  10
compiled vars:  !0 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   FUNC_GET_ARGS                                    ~1      
          1        ASSIGN                                                   !0, ~1
   26     2        INIT_FCALL                                               'join'
          3        SEND_VAL                                                 '%2C'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $3      
          6        CONCAT                                           ~4      'C+', $3
          7        CONCAT                                           ~5      ~4, '+%0A'
          8        ECHO                                                     ~5
   27     9      > RETURN                                                   null

End of function test

Class A:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9GKBA
function name:  test
number of ops:  12
compiled vars:  !0 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   FUNC_GET_ARGS                                    ~1      
          1        ASSIGN                                                   !0, ~1
    8     2        FETCH_CLASS_CONSTANT                             ~3      'NAME'
          3        ECHO                                                     ~3
          4        INIT_FCALL                                               'join'
          5        SEND_VAL                                                 '%2C'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $4      
          8        CONCAT                                           ~5      '+', $4
          9        CONCAT                                           ~6      ~5, '+%0A'
         10        ECHO                                                     ~6
    9    11      > RETURN                                                   null

End of function test

End of class A.

Class B:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9GKBA
function name:  test
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   ECHO                                                     'B'
          1        ECHO                                                     '%0A'
   18     2        INIT_STATIC_METHOD_CALL                                  'test'
          3        SEND_VAL_EX                                              'more'
          4        SEND_VAL_EX                                              'args'
          5        DO_FCALL                                      0          
   19     6      > RETURN                                                   null

End of function test

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.02 ms | 1400 KiB | 15 Q