3v4l.org

run code in 300+ PHP versions simultaneously
<?php $header = array('Set-Cookie: A tua tia', 'Set-Cookie:Test','Set-cookie:atuatia','xptoset-cookie'); foreach($header as $line) { if(stripos($line, 'Set-Cookie:') === 0) { $line = trim(str_ireplace('Set-Cookie:', '', $line)); } echo $line.PHP_EOL; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 21
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 21
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 18
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 18
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/S72Sj
function name:  (null)
number of ops:  23
compiled vars:  !0 = $header, !1 = $line
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    4     1      > FE_RESET_R                                       $3      !0, ->21
          2    > > FE_FETCH_R                                               $3, !1, ->21
    5     3    >   INIT_FCALL                                               'stripos'
          4        SEND_VAR                                                 !1
          5        SEND_VAL                                                 'Set-Cookie%3A'
          6        DO_ICALL                                         $4      
          7        IS_IDENTICAL                                             $4, 0
          8      > JMPZ                                                     ~5, ->18
    6     9    >   INIT_FCALL                                               'trim'
         10        INIT_FCALL                                               'str_ireplace'
         11        SEND_VAL                                                 'Set-Cookie%3A'
         12        SEND_VAL                                                 ''
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                         $6      
         15        SEND_VAR                                                 $6
         16        DO_ICALL                                         $7      
         17        ASSIGN                                                   !1, $7
    8    18    >   CONCAT                                           ~9      !1, '%0A'
         19        ECHO                                                     ~9
    4    20      > JMP                                                      ->2
         21    >   FE_FREE                                                  $3
   10    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.43 ms | 1387 KiB | 19 Q