3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Foo { public function doStuff(array $a, $b = null); } class Bar implements Foo { public function doStuff($a, $b = null) { var_dump($a, $b); } } $a = new Bar(); $a->doStuff([1,2,3,4], 'asdsad'); $a->doStuff([5,6,7,8]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P4U05
function name:  (null)
number of ops:  12
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   DECLARE_CLASS                                            'bar'
   13     1        NEW                                              $1      'Bar'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   14     4        INIT_METHOD_CALL                                         !0, 'doStuff'
          5        SEND_VAL_EX                                              <array>
          6        SEND_VAL_EX                                              'asdsad'
          7        DO_FCALL                                      0          
   15     8        INIT_METHOD_CALL                                         !0, 'doStuff'
          9        SEND_VAL_EX                                              <array>
         10        DO_FCALL                                      0          
         11      > RETURN                                                   1

Class Foo:
Function dostuff:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P4U05
function name:  doStuff
number of ops:  3
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      null
          2      > RETURN                                                   null

End of function dostuff

End of class Foo.

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

End of function dostuff

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.99 ms | 1395 KiB | 15 Q