3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 0 => "aaa", 1 => "bbb", 2 => "ccc", 3 => "bbb", 4 => "ddd", 5 => "ccc"]; end($array); $key = key($array); foreach($array as $k=>$v){ if($k !== $key){ print "${k}=>${v} まだ最後じゃないよ\n"; }else{ print "${k}=>${v} これが最後だよ\n"; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 25
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 25
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 19
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
filename:       /in/E3Doe
function name:  (null)
number of ops:  27
compiled vars:  !0 = $array, !1 = $key, !2 = $v, !3 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   11     1        INIT_FCALL                                               'end'
          2        SEND_REF                                                 !0
          3        DO_ICALL                                                 
   12     4        INIT_FCALL                                               'key'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $6      
          7        ASSIGN                                                   !1, $6
   14     8      > FE_RESET_R                                       $8      !0, ->25
          9    > > FE_FETCH_R                                       ~9      $8, !2, ->25
         10    >   ASSIGN                                                   !3, ~9
   15    11        IS_NOT_IDENTICAL                                         !3, !1
         12      > JMPZ                                                     ~11, ->19
   16    13    >   ROPE_INIT                                     4  ~13     !3
         14        ROPE_ADD                                      1  ~13     ~13, '%3D%3E'
         15        ROPE_ADD                                      2  ~13     ~13, !2
         16        ROPE_END                                      3  ~12     ~13, '+%E3%81%BE%E3%81%A0%E6%9C%80%E5%BE%8C%E3%81%98%E3%82%83%E3%81%AA%E3%81%84%E3%82%88%0A'
         17        ECHO                                                     ~12
         18      > JMP                                                      ->24
   18    19    >   ROPE_INIT                                     4  ~16     !3
         20        ROPE_ADD                                      1  ~16     ~16, '%3D%3E'
         21        ROPE_ADD                                      2  ~16     ~16, !2
         22        ROPE_END                                      3  ~15     ~16, '+%E3%81%93%E3%82%8C%E3%81%8C%E6%9C%80%E5%BE%8C%E3%81%A0%E3%82%88%0A'
         23        ECHO                                                     ~15
   14    24    > > JMP                                                      ->9
         25    >   FE_FREE                                                  $8
   20    26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.38 ms | 1401 KiB | 17 Q