3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); class Test implements \IteratorAggregate { public function getIterator(){} } function test(iterable $it){ var_dump($it); } test((new Test)); test([1,2,3]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CVXN3
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   DECLARE_CLASS                                            'test'
   13     1        INIT_FCALL                                               'test'
          2        NEW                                              $0      'Test'
          3        DO_FCALL                                      0          
          4        SEND_VAR                                                 $0
          5        DO_FCALL                                      0          
   14     6        INIT_FCALL                                               'test'
          7        SEND_VAL                                                 <array>
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CVXN3
function name:  test
number of ops:  5
compiled vars:  !0 = $it
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
   11     4      > RETURN                                                   null

End of function test

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

End of function getiterator

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.93 ms | 1401 KiB | 17 Q