3v4l.org

run code in 300+ PHP versions simultaneously
<?php class FooIterator extends FilterIterator { public function accept() { return true; } } $iterator = new FooIterator((new ArrayObject([]))->getIterator()); echo $iterator->count();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Dutmb
function name:  (null)
number of ops:  13
compiled vars:  !0 = $iterator
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $1      'FooIterator'
          1        NEW                                              $2      'ArrayObject'
          2        SEND_VAL_EX                                              <array>
          3        DO_FCALL                                      0          
          4        INIT_METHOD_CALL                                         $2, 'getIterator'
          5        DO_FCALL                                      0  $4      
          6        SEND_VAR_NO_REF_EX                                       $4
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !0, $1
    8     9        INIT_METHOD_CALL                                         !0, 'count'
         10        DO_FCALL                                      0  $7      
         11        ECHO                                                     $7
         12      > RETURN                                                   1

Class FooIterator:
Function accept:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Dutmb
function name:  accept
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E > > RETURN                                                   <true>
    5     1*     > RETURN                                                   null

End of function accept

End of class FooIterator.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.69 ms | 1385 KiB | 13 Q