3v4l.org

run code in 300+ PHP versions simultaneously
<?php function f() { var_dump(func_get_args()); } class C implements IteratorAggregate { private $arr; function __construct(array $arr) {$this->arr = $arr;} function getIterator() { return new ArrayIterator($this->arr); } } $a = array('a' => 1, 'b' => 2, 3, 4, 5); $c = new C($a); call_user_func_array('f', new ArrayObject($a));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jr6PE
function name:  (null)
number of ops:  14
compiled vars:  !0 = $a, !1 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   DECLARE_CLASS                                            'c'
   12     1        ASSIGN                                                   !0, <array>
   13     2        NEW                                              $3      'C'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $3
   15     6        INIT_FCALL                                               'f'
          7        NEW                                              $6      'ArrayObject'
          8        SEND_VAR_EX                                              !0
          9        DO_FCALL                                      0          
         10        SEND_ARRAY                                               $6
         11        CHECK_UNDEF_ARGS                                         
         12        DO_FCALL                                      0          
         13      > RETURN                                                   1

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

End of function f

Class C:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jr6PE
function name:  __construct
number of ops:  4
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        ASSIGN_OBJ                                               'arr'
          2        OP_DATA                                                  !0
          3      > RETURN                                                   null

End of function __construct

Function getiterator:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jr6PE
function name:  getIterator
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   NEW                                              $0      'ArrayIterator'
          1        CHECK_FUNC_ARG                                           
          2        FETCH_OBJ_FUNC_ARG                               $1      'arr'
          3        SEND_FUNC_ARG                                            $1
          4        DO_FCALL                                      0          
          5      > RETURN                                                   $0
          6*     > RETURN                                                   null

End of function getiterator

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.78 ms | 1390 KiB | 16 Q