3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'This is a string of words with multiple vowels.'; $found = false; $newstr = ""; for ($i=strlen($string); $i >= 0 ; $i--) { $chr = substr($string, $i, 1); if (!$found && stripos("aeiou", $chr) !== false) { $found = true; continue; } $newstr = $chr . $newstr; } return $newstr;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 6
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 46) Position 1 = 14, Position 2 = 20
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 23
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 6
Branch analysis from position: 28
Branch analysis from position: 6
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 6
Branch analysis from position: 28
Branch analysis from position: 6
Branch analysis from position: 20
filename:       /in/I8Mdo
function name:  (null)
number of ops:  30
compiled vars:  !0 = $string, !1 = $found, !2 = $newstr, !3 = $i, !4 = $chr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'This+is+a+string+of+words+with+multiple+vowels.'
    4     1        ASSIGN                                                   !1, <false>
    5     2        ASSIGN                                                   !2, ''
    6     3        STRLEN                                           ~8      !0
          4        ASSIGN                                                   !3, ~8
          5      > JMP                                                      ->26
    7     6    >   INIT_FCALL                                               'substr'
          7        SEND_VAR                                                 !0
          8        SEND_VAR                                                 !3
          9        SEND_VAL                                                 1
         10        DO_ICALL                                         $10     
         11        ASSIGN                                                   !4, $10
    8    12        BOOL_NOT                                         ~12     !1
         13      > JMPZ_EX                                          ~12     ~12, ->20
         14    >   INIT_FCALL                                               'stripos'
         15        SEND_VAL                                                 'aeiou'
         16        SEND_VAR                                                 !4
         17        DO_ICALL                                         $13     
         18        TYPE_CHECK                                  1018  ~14     $13
         19        BOOL                                             ~12     ~14
         20    > > JMPZ                                                     ~12, ->23
    9    21    >   ASSIGN                                                   !1, <true>
   10    22      > JMP                                                      ->25
   12    23    >   CONCAT                                           ~16     !4, !2
         24        ASSIGN                                                   !2, ~16
    6    25    >   PRE_DEC                                                  !3
         26    >   IS_SMALLER_OR_EQUAL                                      0, !3
         27      > JMPNZ                                                    ~19, ->6
   14    28    > > RETURN                                                   !2
         29*     > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.67 ms | 1401 KiB | 17 Q