3v4l.org

run code in 300+ PHP versions simultaneously
<?php function print_caps(Iterator $iterator) { echo strtoupper($iterator->current()) . "\n"; return TRUE; } $it = new ArrayIterator(array("Apples", "Bananas", "Cherries")); iterator_apply($it, "print_caps", array($it));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Uk4nd
function name:  (null)
number of ops:  11
compiled vars:  !0 = $it
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   NEW                                              $1      'ArrayIterator'
          1        SEND_VAL_EX                                              <array>
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
    9     4        INIT_FCALL                                               'iterator_apply'
          5        SEND_VAR                                                 !0
          6        SEND_VAL                                                 'print_caps'
          7        INIT_ARRAY                                       ~4      !0
          8        SEND_VAL                                                 ~4
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Function print_caps:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Uk4nd
function name:  print_caps
number of ops:  10
compiled vars:  !0 = $iterator
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'strtoupper'
          2        INIT_METHOD_CALL                                         !0, 'current'
          3        DO_FCALL                                      0  $1      
          4        SEND_VAR                                                 $1
          5        DO_ICALL                                         $2      
          6        CONCAT                                           ~3      $2, '%0A'
          7        ECHO                                                     ~3
    5     8      > RETURN                                                   <true>
    6     9*     > RETURN                                                   null

End of function print_caps

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.23 ms | 1395 KiB | 17 Q