3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A {} class B extends A {} class C extends A{} class D { function test(A $a) { var_dump($a); } } $b = new B; $c = new C; $d = new D; $d->test($b);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2XaMA
function name:  (null)
number of ops:  13
compiled vars:  !0 = $b, !1 = $c, !2 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $3      'B'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
   14     3        NEW                                              $6      'C'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $6
   15     6        NEW                                              $9      'D'
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !2, $9
   16     9        INIT_METHOD_CALL                                         !2, 'test'
         10        SEND_VAR_EX                                              !0
         11        DO_FCALL                                      0          
         12      > RETURN                                                   1

Class A: [no user functions]
Class B: [no user functions]
Class C: [no user functions]
Class D:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2XaMA
function name:  test
number of ops:  5
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
   10     4      > RETURN                                                   null

End of function test

End of class D.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.2 ms | 1395 KiB | 15 Q