3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function baz(string $whiz): string { echo $whiz; return $whiz; } } class Bar extends Foo { public function baz(string $whiz, bool $whaz = FALSE): string { echo $whiz; return $whiz; } } $f = new Bar(); $f->baz('yes');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZXXWg
function name:  (null)
number of ops:  7
compiled vars:  !0 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $1      'Bar'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   16     3        INIT_METHOD_CALL                                         !0, 'baz'
          4        SEND_VAL_EX                                              'yes'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Class Foo:
Function baz:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZXXWg
function name:  baz
number of ops:  6
compiled vars:  !0 = $whiz
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        ECHO                                                     !0
    6     2        VERIFY_RETURN_TYPE                                       !0
          3      > RETURN                                                   !0
    7     4*       VERIFY_RETURN_TYPE                                       
          5*     > RETURN                                                   null

End of function baz

End of class Foo.

Class Bar:
Function baz:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZXXWg
function name:  baz
number of ops:  7
compiled vars:  !0 = $whiz, !1 = $whaz
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      <false>
   11     2        ECHO                                                     !0
   12     3        VERIFY_RETURN_TYPE                                       !0
          4      > RETURN                                                   !0
   13     5*       VERIFY_RETURN_TYPE                                       
          6*     > RETURN                                                   null

End of function baz

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.3 ms | 1007 KiB | 13 Q