3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'moooozeee'; $words = explode(' ', $str); foreach($words as $key => $word) { foreach(str_split($word) as $index => $char) { $thisOrd = ord($char); if ($index > 0 AND $thisOrd !== $lastOrd + 1) { unset($words[$key]); break; } $lastOrd = $thisOrd; } } echo implode(' ', $words);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 31
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 31
Branch analysis from position: 8
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 29
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 29
Branch analysis from position: 14
2 jumps found. (Code = 46) Position 1 = 21, Position 2 = 24
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 27
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 24
Branch analysis from position: 29
Branch analysis from position: 29
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
filename:       /in/P1VT3
function name:  (null)
number of ops:  38
compiled vars:  !0 = $str, !1 = $words, !2 = $word, !3 = $key, !4 = $char, !5 = $index, !6 = $thisOrd, !7 = $lastOrd
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'moooozeee'
    4     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '+'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $9      
          5        ASSIGN                                                   !1, $9
    6     6      > FE_RESET_R                                       $11     !1, ->31
          7    > > FE_FETCH_R                                       ~12     $11, !2, ->31
          8    >   ASSIGN                                                   !3, ~12
    8     9        INIT_FCALL                                               'str_split'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                         $14     
         12      > FE_RESET_R                                       $15     $14, ->29
         13    > > FE_FETCH_R                                       ~16     $15, !4, ->29
         14    >   ASSIGN                                                   !5, ~16
    9    15        INIT_FCALL                                               'ord'
         16        SEND_VAR                                                 !4
         17        DO_ICALL                                         $18     
         18        ASSIGN                                                   !6, $18
   10    19        IS_SMALLER                                       ~20     0, !5
         20      > JMPZ_EX                                          ~20     ~20, ->24
         21    >   ADD                                              ~21     !7, 1
         22        IS_NOT_IDENTICAL                                 ~22     !6, ~21
         23        BOOL                                             ~20     ~22
         24    > > JMPZ                                                     ~20, ->27
   11    25    >   UNSET_DIM                                                !1, !3
   12    26      > JMP                                                      ->29
   14    27    >   ASSIGN                                                   !7, !6
    8    28      > JMP                                                      ->13
         29    >   FE_FREE                                                  $15
    6    30      > JMP                                                      ->7
         31    >   FE_FREE                                                  $11
   19    32        INIT_FCALL                                               'implode'
         33        SEND_VAL                                                 '+'
         34        SEND_VAR                                                 !1
         35        DO_ICALL                                         $24     
         36        ECHO                                                     $24
         37      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.8 ms | 1400 KiB | 21 Q