3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyArrayIterator extends ArrayIterator { public function hello() { echo "Hi\n"; } } $foo = new MyArrayIterator([1,2,3]); $bar = new IteratorIterator($foo); $bar->hello();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/56Wfm
function name:  (null)
number of ops:  11
compiled vars:  !0 = $foo, !1 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   NEW                                              $2      'MyArrayIterator'
          1        SEND_VAL_EX                                              <array>
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
    9     4        NEW                                              $5      'IteratorIterator'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $5
   10     8        INIT_METHOD_CALL                                         !1, 'hello'
          9        DO_FCALL                                      0          
         10      > RETURN                                                   1

Class MyArrayIterator:
Function hello:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/56Wfm
function name:  hello
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ECHO                                                     'Hi%0A'
          1      > RETURN                                                   null

End of function hello

End of class MyArrayIterator.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.21 ms | 1393 KiB | 13 Q