3v4l.org

run code in 300+ PHP versions simultaneously
<?php $weather = array('晴れ', '晴れ時々雨', '雪のち雨'); $ary = array( '晴れ' => 'sunny', '雨' => 'rainy', '曇' => 'cloudy', '雪' => 'snowy', 'のち' => 'later', '時々' => 'and' ); for ($i=0; $i < 3; $i++) { //$telop = $weather->forecasts[$i]->telop; $telop = $weather[$i]; foreach ($ary as $key => $value) { $telop = str_replace((string)$key, $ary[$key].' ', $telop); $telopList = explode(' ', $telop); array_pop($telopList); } if( count($telopList) === 1 ) { echo '<span id="'.$telopList[0].'" class="only"></span><br>'; } else { echo '<span id="'.$telopList[0].'" class="'.$telopList[1].' '.$telopList[2].'"></span><br>'; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 47
Branch analysis from position: 47
2 jumps found. (Code = 44) Position 1 = 49, Position 2 = 4
Branch analysis from position: 49
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 27
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 27
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 27
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 36
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 46
Branch analysis from position: 46
2 jumps found. (Code = 44) Position 1 = 49, Position 2 = 4
Branch analysis from position: 49
Branch analysis from position: 4
Branch analysis from position: 36
2 jumps found. (Code = 44) Position 1 = 49, Position 2 = 4
Branch analysis from position: 49
Branch analysis from position: 4
Branch analysis from position: 27
filename:       /in/S3bAR
function name:  (null)
number of ops:  50
compiled vars:  !0 = $weather, !1 = $ary, !2 = $i, !3 = $telop, !4 = $value, !5 = $key, !6 = $telopList
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
   13     2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->47
   16     4    >   FETCH_DIM_R                                      ~10     !0, !2
          5        ASSIGN                                                   !3, ~10
   17     6      > FE_RESET_R                                       $12     !1, ->27
          7    > > FE_FETCH_R                                       ~13     $12, !4, ->27
          8    >   ASSIGN                                                   !5, ~13
   18     9        INIT_FCALL                                               'str_replace'
         10        CAST                                          6  ~15     !5
         11        SEND_VAL                                                 ~15
         12        FETCH_DIM_R                                      ~16     !1, !5
         13        CONCAT                                           ~17     ~16, '+'
         14        SEND_VAL                                                 ~17
         15        SEND_VAR                                                 !3
         16        DO_ICALL                                         $18     
         17        ASSIGN                                                   !3, $18
   19    18        INIT_FCALL                                               'explode'
         19        SEND_VAL                                                 '+'
         20        SEND_VAR                                                 !3
         21        DO_ICALL                                         $20     
         22        ASSIGN                                                   !6, $20
   20    23        INIT_FCALL                                               'array_pop'
         24        SEND_REF                                                 !6
         25        DO_ICALL                                                 
   17    26      > JMP                                                      ->7
         27    >   FE_FREE                                                  $12
   23    28        COUNT                                            ~23     !6
         29        IS_IDENTICAL                                             ~23, 1
         30      > JMPZ                                                     ~24, ->36
   24    31    >   FETCH_DIM_R                                      ~25     !6, 0
         32        CONCAT                                           ~26     '%3Cspan+id%3D%22', ~25
         33        CONCAT                                           ~27     ~26, '%22+class%3D%22only%22%3E%3C%2Fspan%3E%3Cbr%3E'
         34        ECHO                                                     ~27
         35      > JMP                                                      ->46
   26    36    >   FETCH_DIM_R                                      ~28     !6, 0
         37        CONCAT                                           ~29     '%3Cspan+id%3D%22', ~28
         38        CONCAT                                           ~30     ~29, '%22+class%3D%22'
         39        FETCH_DIM_R                                      ~31     !6, 1
         40        CONCAT                                           ~32     ~30, ~31
         41        CONCAT                                           ~33     ~32, '+'
         42        FETCH_DIM_R                                      ~34     !6, 2
         43        CONCAT                                           ~35     ~33, ~34
         44        CONCAT                                           ~36     ~35, '%22%3E%3C%2Fspan%3E%3Cbr%3E'
         45        ECHO                                                     ~36
   13    46    >   PRE_INC                                                  !2
         47    >   IS_SMALLER                                               !2, 3
         48      > JMPNZ                                                    ~38, ->4
   28    49    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.99 ms | 1400 KiB | 19 Q