3v4l.org

run code in 300+ PHP versions simultaneously
<?php class X { } class Y extends X { } class Blah { public function blah(X $x) { $this->bleh($x); } public function bleh(Y $x) { echo "Hello\n"; } } $x = new Y; $b = new Blah; $b->blah($x);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aFqCg
function name:  (null)
number of ops:  10
compiled vars:  !0 = $x, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $2      'Y'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   19     3        NEW                                              $5      'Blah'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   21     6        INIT_METHOD_CALL                                         !1, 'blah'
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

Class X: [no user functions]
Class Y: [no user functions]
Class Blah:
Function blah:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aFqCg
function name:  blah
number of ops:  5
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        INIT_METHOD_CALL                                         'bleh'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
   11     4      > RETURN                                                   null

End of function blah

Function bleh:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aFqCg
function name:  bleh
number of ops:  3
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
   14     1        ECHO                                                     'Hello%0A'
   15     2      > RETURN                                                   null

End of function bleh

End of class Blah.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.4 ms | 1394 KiB | 13 Q