3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Counter implements Countable { public function count() { var_dump(func_get_args()); } } $counter = new Counter; count($counter, 1); $counter->count(1);
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/mgMkY
function name:  (null)
number of ops:  14
compiled vars:  !0 = $counter
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   DECLARE_CLASS                                    $1      '%00counter%2Fin%2FmgMkY0x7f0c45b4206d', 'counter'
         1        ADD_INTERFACE                                            $1, 'Countable'
         2        VERIFY_ABSTRACT_CLASS                                    $1
  10     3        NEW                                              $2      :-2
         4        DO_FCALL                                      0          
         5        ASSIGN                                                   !0, $2
  12     6        INIT_FCALL                                               'count'
         7        SEND_VAR                                                 !0
         8        SEND_VAL                                                 1
         9        DO_ICALL                                                 
  14    10        INIT_METHOD_CALL                                         !0, 'count'
        11        SEND_VAL_EX                                              1
        12        DO_FCALL                                      0          
        13      > RETURN                                                   1

Class Counter:
Function count:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/mgMkY
function name:  count
number of ops:  6
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   6     0  E >   INIT_FCALL                                               'var_dump'
         1        INIT_FCALL                                               'func_get_args'
         2        DO_ICALL                                         $0      
         3        SEND_VAR                                                 $0
         4        DO_ICALL                                                 
   7     5      > RETURN                                                   null

End of function count

End of class Counter.

Generated using Vulcan Logic Dumper, using php 7.2.0