3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(~(E_STRICT|E_DEPRECATED)); class A { public function hi(self $a) { var_dump($a); } } class B extends A { public function yo(parent $a) { var_dump($a); } } $a = new A; $b = new B; $c = new stdClass; $a->hi($b); $b->yo($a); $b->yo($c);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JADui
function name:  (null)
number of ops:  22
compiled vars:  !0 = $a, !1 = $b, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 -10241
          2        DO_ICALL                                                 
   17     3        NEW                                              $4      'A'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $4
   18     6        NEW                                              $7      'B'
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !1, $7
   19     9        NEW                                              $10     'stdClass'
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !2, $10
   21    12        INIT_METHOD_CALL                                         !0, 'hi'
         13        SEND_VAR_EX                                              !1
         14        DO_FCALL                                      0          
   22    15        INIT_METHOD_CALL                                         !1, 'yo'
         16        SEND_VAR_EX                                              !0
         17        DO_FCALL                                      0          
   23    18        INIT_METHOD_CALL                                         !1, 'yo'
         19        SEND_VAR_EX                                              !2
         20        DO_FCALL                                      0          
         21      > RETURN                                                   1

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

End of function hi

End of class A.

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

End of function yo

Function hi:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JADui
function name:  hi
number of ops:  5
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    8     4      > RETURN                                                   null

End of function hi

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.17 ms | 1400 KiB | 17 Q