3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "-- Two empty iterators attached with infos that are different but same array key --\n"; $mit = new MultipleIterator(MultipleIterator::MIT_KEYS_ASSOC); $mit ->attachIterator(new EmptyIterator(), "2"); $mit ->attachIterator(new EmptyIterator(), 2); var_dump($mit->countIterators()); $mit->rewind(); var_dump($mit->current());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SCoaa
function name:  (null)
number of ops:  30
compiled vars:  !0 = $mit
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ECHO                                                     '--+Two+empty+iterators+attached+with+infos+that+are+different+but+same+array+key+--%0A'
    3     1        NEW                                              $1      'MultipleIterator'
          2        SEND_VAL_EX                                              2
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
    4     5        INIT_METHOD_CALL                                         !0, 'attachIterator'
          6        NEW                                              $4      'EmptyIterator'
          7        DO_FCALL                                      0          
          8        SEND_VAR_NO_REF_EX                                       $4
          9        SEND_VAL_EX                                              '2'
         10        DO_FCALL                                      0          
    5    11        INIT_METHOD_CALL                                         !0, 'attachIterator'
         12        NEW                                              $7      'EmptyIterator'
         13        DO_FCALL                                      0          
         14        SEND_VAR_NO_REF_EX                                       $7
         15        SEND_VAL_EX                                              2
         16        DO_FCALL                                      0          
    6    17        INIT_FCALL                                               'var_dump'
         18        INIT_METHOD_CALL                                         !0, 'countIterators'
         19        DO_FCALL                                      0  $10     
         20        SEND_VAR                                                 $10
         21        DO_ICALL                                                 
    7    22        INIT_METHOD_CALL                                         !0, 'rewind'
         23        DO_FCALL                                      0          
    8    24        INIT_FCALL                                               'var_dump'
         25        INIT_METHOD_CALL                                         !0, 'current'
         26        DO_FCALL                                      0  $13     
         27        SEND_VAR                                                 $13
         28        DO_ICALL                                                 
         29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.18 ms | 1395 KiB | 15 Q