3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Foo { public static function test($bar = null) { var_dump(func_get_args()); } } class Baz extends Foo { public static function test(...$args) { parent::test(...$args); } } Baz::test(); Baz::test('hello');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/so6P2
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   15     0  E >   INIT_STATIC_METHOD_CALL                                      'Baz', 'test'
          1        DO_FCALL                                          0          
   16     2        INIT_STATIC_METHOD_CALL                                      'Baz', 'test'
          3        SEND_VAL                                                     'hello'
          4        DO_FCALL                                          0          
          5      > RETURN                                                       1

Class Foo:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/so6P2
function name:  test
number of ops:  6
compiled vars:  !0 = $bar
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   RECV_INIT                                            !0      null
    5     1        INIT_FCALL                                                   'var_dump'
          2        FUNC_GET_ARGS                                        ~1      
          3        SEND_VAL                                                     ~1
          4        DO_ICALL                                                     
    6     5      > RETURN                                                       null

End of function test

End of class Foo.

Class Baz:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/so6P2
function name:  test
number of ops:  6
compiled vars:  !0 = $args
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   10     0  E >   RECV_VARIADIC                                        !0      
   11     1        INIT_STATIC_METHOD_CALL                                      'test'
          2        SEND_UNPACK                                                  !0
          3        CHECK_UNDEF_ARGS                                             
          4        DO_FCALL                                          1          
   12     5      > RETURN                                                       null

End of function test

End of class Baz.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
157.85 ms | 2481 KiB | 14 Q