3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Example; class A { public function test(string $a) { return $a; } } class B extends A { public function test(mixed $a) { return parent::test($a); } } $b = new B(); var_dump(get_debug_type($b));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iahAR
function name:  (null)
number of ops:  10
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $1      'Example%5CB'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   19     3        INIT_NS_FCALL_BY_NAME                                    'Example%5Cvar_dump'
          4        INIT_NS_FCALL_BY_NAME                                    'Example%5Cget_debug_type'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0  $4      
          7        SEND_VAR_NO_REF_EX                                       $4
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

Class Example\A:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iahAR
function name:  test
number of ops:  3
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1      > RETURN                                                   !0
    8     2*     > RETURN                                                   null

End of function test

End of class Example\A.

Class Example\B:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iahAR
function name:  test
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   13     1        INIT_STATIC_METHOD_CALL                                  'test'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $1      
          4      > RETURN                                                   $1
   14     5*     > RETURN                                                   null

End of function test

End of class Example\B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.03 ms | 1437 KiB | 15 Q