3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Foo { public static function test($bar, $baz = 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/5Fsou
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/5Fsou
function name:  test
number of ops:  7
compiled vars:  !0 = $bar, !1 = $baz
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   RECV                                                 !0      
          1        RECV_INIT                                            !1      null
    5     2        INIT_FCALL                                                   'var_dump'
          3        FUNC_GET_ARGS                                        ~2      
          4        SEND_VAL                                                     ~2
          5        DO_ICALL                                                     
    6     6      > 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/5Fsou
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:
161.17 ms | 3005 KiB | 14 Q