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($inner); var_dump(method_exists(get_class($outer), 'count')); var_dump(method_exists($outer, 'count')); var_dump($outer->count());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AK2Dl
function name:  (null)
number of ops:  29
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        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $5
   15     8        INIT_FCALL                                               'var_dump'
          9        INIT_FCALL                                               'method_exists'
         10        GET_CLASS                                        ~8      !1
         11        SEND_VAL                                                 ~8
         12        SEND_VAL                                                 'count'
         13        DO_ICALL                                         $9      
         14        SEND_VAR                                                 $9
         15        DO_ICALL                                                 
   16    16        INIT_FCALL                                               'var_dump'
         17        INIT_FCALL                                               'method_exists'
         18        SEND_VAR                                                 !1
         19        SEND_VAL                                                 'count'
         20        DO_ICALL                                         $11     
         21        SEND_VAR                                                 $11
         22        DO_ICALL                                                 
   17    23        INIT_FCALL                                               'var_dump'
         24        INIT_METHOD_CALL                                         !1, 'count'
         25        DO_FCALL                                      0  $13     
         26        SEND_VAR                                                 $13
         27        DO_ICALL                                                 
         28      > RETURN                                                   1

Class x:
Function __call:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AK2Dl
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:
149.34 ms | 1396 KiB | 17 Q