3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = [ 'hello', 'leetcode', 'atwood' ]; foreach ($strings as &$string) { $count = preg_match_all('~[aeiou]~', $string, $m, PREG_OFFSET_CAPTURE); for ($i = 1; $i <= $count; ++$i) { $string[$m[0][$count - $i][1]] = $m[0][$i - 1][0]; } } var_export($strings);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 2, Position 2 = 26
Branch analysis from position: 2
2 jumps found. (Code = 126) Position 1 = 3, Position 2 = 26
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 12
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 12
Branch analysis from position: 25
Branch analysis from position: 12
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename:       /in/civeE
function name:  (null)
number of ops:  31
compiled vars:  !0 = $strings, !1 = $string, !2 = $count, !3 = $m, !4 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1      > FE_RESET_RW                                      $6      !0, ->26
          2    > > FE_FETCH_RW                                              $6, !1, ->26
   10     3    >   INIT_FCALL                                               'preg_match_all'
          4        SEND_VAL                                                 '%7E%5Baeiou%5D%7E'
          5        SEND_VAR                                                 !1
          6        SEND_REF                                                 !3
          7        SEND_VAL                                                 256
          8        DO_ICALL                                         $7      
          9        ASSIGN                                                   !2, $7
   11    10        ASSIGN                                                   !4, 1
         11      > JMP                                                      ->23
   12    12    >   SUB                                              ~11     !2, !4
         13        FETCH_DIM_R                                      ~10     !3, 0
         14        FETCH_DIM_R                                      ~12     ~10, ~11
         15        FETCH_DIM_R                                      ~13     ~12, 1
         16        SUB                                              ~16     !4, 1
         17        FETCH_DIM_R                                      ~15     !3, 0
         18        FETCH_DIM_R                                      ~17     ~15, ~16
         19        FETCH_DIM_R                                      ~18     ~17, 0
         20        ASSIGN_DIM                                               !1, ~13
         21        OP_DATA                                                  ~18
   11    22        PRE_INC                                                  !4
         23    >   IS_SMALLER_OR_EQUAL                                      !4, !2
         24      > JMPNZ                                                    ~20, ->12
    9    25    > > JMP                                                      ->2
         26    >   FE_FREE                                                  $6
   15    27        INIT_FCALL                                               'var_export'
         28        SEND_VAR                                                 !0
         29        DO_ICALL                                                 
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.7 ms | 1007 KiB | 15 Q