3v4l.org

run code in 300+ PHP versions simultaneously
<?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
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mgMkY
function name:  (null)
number of ops:  12
compiled vars:  !0 = $counter
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   DECLARE_CLASS                                            'counter'
   10     1        NEW                                              $1      'Counter'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   12     4        INIT_FCALL                                               'count'
          5        SEND_VAR                                                 !0
          6        SEND_VAL                                                 1
          7        DO_ICALL                                                 
   14     8        INIT_METHOD_CALL                                         !0, 'count'
          9        SEND_VAL_EX                                              1
         10        DO_FCALL                                      0          
         11      > RETURN                                                   1

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

End of function count

End of class Counter.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.86 ms | 1395 KiB | 17 Q