3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface AncientStableInterface { public function doThings($val); } class Stuff implements AncientStableInterface { public function doThings($val) { return $val; } } class NewStuff implements AncientStableInterface { public function doThings($val, array $optional = array()) { return $val + count($optional); } } $a = new Stuff; var_dump($a->doThings(123)); $a = new NewStuff; var_dump($a->doThings(123, array(4, 5)));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KWY3M
function name:  (null)
number of ops:  22
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   DECLARE_CLASS                                            'stuff'
   16     1        DECLARE_CLASS                                            'newstuff'
   24     2        NEW                                              $1      'Stuff'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
   25     5        INIT_FCALL                                               'var_dump'
          6        INIT_METHOD_CALL                                         !0, 'doThings'
          7        SEND_VAL_EX                                              123
          8        DO_FCALL                                      0  $4      
          9        SEND_VAR                                                 $4
         10        DO_ICALL                                                 
   26    11        NEW                                              $6      'NewStuff'
         12        DO_FCALL                                      0          
         13        ASSIGN                                                   !0, $6
   27    14        INIT_FCALL                                               'var_dump'
         15        INIT_METHOD_CALL                                         !0, 'doThings'
         16        SEND_VAL_EX                                              123
         17        SEND_VAL_EX                                              <array>
         18        DO_FCALL                                      0  $9      
         19        SEND_VAR                                                 $9
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Class AncientStableInterface:
Function dothings:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KWY3M
function name:  doThings
number of ops:  2
compiled vars:  !0 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function dothings

End of class AncientStableInterface.

Class Stuff:
Function dothings:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KWY3M
function name:  doThings
number of ops:  3
compiled vars:  !0 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   12     1      > RETURN                                                   !0
   13     2*     > RETURN                                                   null

End of function dothings

End of class Stuff.

Class NewStuff:
Function dothings:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KWY3M
function name:  doThings
number of ops:  6
compiled vars:  !0 = $val, !1 = $optional
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      <array>
   20     2        COUNT                                            ~2      !1
          3        ADD                                              ~3      !0, ~2
          4      > RETURN                                                   ~3
   21     5*     > RETURN                                                   null

End of function dothings

End of class NewStuff.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.48 ms | 1400 KiB | 15 Q