3v4l.org

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

Function feed:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IQXhu
function name:  feed
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   NEW                                              $0      'ArrayIterator'
          1        SEND_VAL_EX                                              <array>
          2        DO_FCALL                                      0          
          3      > RETURN                                                   $0
    6     4*     > RETURN                                                   null

End of function feed

Function %00%7Bclosure%7D%2Fin%2FIQXhu%3A8%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IQXhu
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $iterator
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     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
   10     8      > RETURN                                                   <true>
   11     9*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FIQXhu%3A8%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.39 ms | 1399 KiB | 18 Q