3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL|E_STRICT); class Foo {} class Hoge { public function aaa(Foo $foo) { echo 'hoge: ' . PHP_EOL; var_dump($foo); } } class Bar extends Hoge { public function aaa(Foo $foo = null) { echo 'foo: ' . PHP_EOL; var_dump($foo); } } $hoge = new Hoge(); $hoge->aaa(null); $bar = new Bar(); $bar->aaa(new Foo());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cGhoD
function name:  (null)
number of ops:  18
compiled vars:  !0 = $hoge, !1 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 32767
          2        DO_ICALL                                                 
   25     3        NEW                                              $3      'Hoge'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $3
   26     6        INIT_METHOD_CALL                                         !0, 'aaa'
          7        SEND_VAL_EX                                              null
          8        DO_FCALL                                      0          
   27     9        NEW                                              $7      'Bar'
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !1, $7
   28    12        INIT_METHOD_CALL                                         !1, 'aaa'
         13        NEW                                              $10     'Foo'
         14        DO_FCALL                                      0          
         15        SEND_VAR_NO_REF_EX                                       $10
         16        DO_FCALL                                      0          
         17      > RETURN                                                   1

Class Foo: [no user functions]
Class Hoge:
Function aaa:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cGhoD
function name:  aaa
number of ops:  6
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   11     1        ECHO                                                     'hoge%3A+%0A'
   12     2        INIT_FCALL                                               'var_dump'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                                 
   13     5      > RETURN                                                   null

End of function aaa

End of class Hoge.

Class Bar:
Function aaa:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cGhoD
function name:  aaa
number of ops:  6
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV_INIT                                        !0      null
   20     1        ECHO                                                     'foo%3A+%0A'
   21     2        INIT_FCALL                                               'var_dump'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                                 
   22     5      > RETURN                                                   null

End of function aaa

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.41 ms | 1388 KiB | 17 Q