3v4l.org

run code in 300+ PHP versions simultaneously
<?php $recipients = ['aaa@b.com', 'bbbb@b.com', 'ccccc@b.com']; print_r($recipients); echo 'To: ' . array_shift($recipients) . PHP_EOL; foreach ($recipients as $r){ echo 'Cc: ' . array_shift($recipients) . PHP_EOL; } print_r($recipients);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 19
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 19
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/rDlVo
function name:  (null)
number of ops:  24
compiled vars:  !0 = $recipients, !1 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'print_r'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    5     4        INIT_FCALL                                               'array_shift'
          5        SEND_REF                                                 !0
          6        DO_ICALL                                         $4      
          7        CONCAT                                           ~5      'To%3A+', $4
          8        CONCAT                                           ~6      ~5, '%0A'
          9        ECHO                                                     ~6
    6    10      > FE_RESET_R                                       $7      !0, ->19
         11    > > FE_FETCH_R                                               $7, !1, ->19
    7    12    >   INIT_FCALL                                               'array_shift'
         13        SEND_REF                                                 !0
         14        DO_ICALL                                         $8      
         15        CONCAT                                           ~9      'Cc%3A+', $8
         16        CONCAT                                           ~10     ~9, '%0A'
         17        ECHO                                                     ~10
    6    18      > JMP                                                      ->11
         19    >   FE_FREE                                                  $7
    9    20        INIT_FCALL                                               'print_r'
         21        SEND_VAR                                                 !0
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.26 ms | 1011 KiB | 15 Q