3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface foo { public function bar($x, $y = false); } class baz implements foo { public function bar($x, $y) { var_dump(func_get_args()); } } $test = new baz(); $test->bar(4, true);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MDApr
function name:  (null)
number of ops:  9
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   DECLARE_CLASS                                            'baz'
   16     1        NEW                                              $1      'baz'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   17     4        INIT_METHOD_CALL                                         !0, 'bar'
          5        SEND_VAL_EX                                              4
          6        SEND_VAL_EX                                              <true>
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

Class foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MDApr
function name:  bar
number of ops:  3
compiled vars:  !0 = $x, !1 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      <false>
          2      > RETURN                                                   null

End of function bar

End of class foo.

Class baz:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MDApr
function name:  bar
number of ops:  7
compiled vars:  !0 = $x, !1 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   12     2        INIT_FCALL                                               'var_dump'
          3        FUNC_GET_ARGS                                    ~2      
          4        SEND_VAL                                                 ~2
          5        DO_ICALL                                                 
   13     6      > RETURN                                                   null

End of function bar

End of class baz.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.65 ms | 1395 KiB | 15 Q