3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo implements IteratorAggregate { public function getIterator() { yield; } } var_dump((new ReflectionClass('Foo'))->isIterateable());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hibva
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'foo'
    7     1        INIT_FCALL                                               'var_dump'
          2        NEW                                              $0      'ReflectionClass'
          3        SEND_VAL_EX                                              'Foo'
          4        DO_FCALL                                      0          
          5        INIT_METHOD_CALL                                         $0, 'isIterateable'
          6        DO_FCALL                                      0  $2      
          7        SEND_VAR                                                 $2
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Class Foo:
Function getiterator:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 161) Position 1 = -2
filename:       /in/hibva
function name:  getIterator
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   GENERATOR_CREATE                                         
          1        YIELD                                                    
          2      > GENERATOR_RETURN                                         

End of function getiterator

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.32 ms | 1394 KiB | 15 Q