3v4l.org

run code in 300+ PHP versions simultaneously
<?php class x extends IteratorIterator { public function __call($method, $args) { var_dump('__call():', $method); } } $inner = new ArrayIterator([1, 2]); $outer = new IteratorIterator(new IteratorIterator($inner)); var_dump(method_exists(get_class($outer), 'count')); var_dump(method_exists($outer, 'count')); var_dump($outer instanceof Countable); var_dump($outer->count());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CZ8Sv
function name:  (null)
number of ops:  36
compiled vars:  !0 = $inner, !1 = $outer
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $2      'ArrayIterator'
          1        SEND_VAL_EX                                              <array>
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   13     4        NEW                                              $5      'IteratorIterator'
          5        NEW                                              $6      'IteratorIterator'
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0          
          8        SEND_VAR_NO_REF_EX                                       $6
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !1, $5
   15    11        INIT_FCALL                                               'var_dump'
         12        INIT_FCALL                                               'method_exists'
         13        GET_CLASS                                        ~10     !1
         14        SEND_VAL                                                 ~10
         15        SEND_VAL                                                 'count'
         16        DO_ICALL                                         $11     
         17        SEND_VAR                                                 $11
         18        DO_ICALL                                                 
   16    19        INIT_FCALL                                               'var_dump'
         20        INIT_FCALL                                               'method_exists'
         21        SEND_VAR                                                 !1
         22        SEND_VAL                                                 'count'
         23        DO_ICALL                                         $13     
         24        SEND_VAR                                                 $13
         25        DO_ICALL                                                 
   17    26        INIT_FCALL                                               'var_dump'
         27        INSTANCEOF                                       ~15     !1, 'Countable'
         28        SEND_VAL                                                 ~15
         29        DO_ICALL                                                 
   18    30        INIT_FCALL                                               'var_dump'
         31        INIT_METHOD_CALL                                         !1, 'count'
         32        DO_FCALL                                      0  $17     
         33        SEND_VAR                                                 $17
         34        DO_ICALL                                                 
         35      > RETURN                                                   1

Class x:
Function __call:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CZ8Sv
function name:  __call
number of ops:  7
compiled vars:  !0 = $method, !1 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    7     2        INIT_FCALL                                               'var_dump'
          3        SEND_VAL                                                 '__call%28%29%3A'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
    8     6      > RETURN                                                   null

End of function __call

End of class x.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
304.71 ms | 1400 KiB | 18 Q