3v4l.org

run code in 300+ PHP versions simultaneously
<?php $vowels = array('a','e','i','o','u'); $other = array(); $prev = null; for ($x=0,$s=null,$s=null;$x<4;$x++) { if (in_array($prev, $other)) { $s .= $vowels[mt_rand(0,4)]; } else { $s .= $other[mt_rand(0,4)]; } $prev = $s; } echo $s;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 7
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 19
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 7
Branch analysis from position: 29
Branch analysis from position: 7
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 7
Branch analysis from position: 29
Branch analysis from position: 7
filename:       /in/qqWH0
function name:  (null)
number of ops:  31
compiled vars:  !0 = $vowels, !1 = $other, !2 = $prev, !3 = $x, !4 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, <array>
    5     2        ASSIGN                                                   !2, null
    6     3        ASSIGN                                                   !3, 0
          4        ASSIGN                                                   !4, null
          5        ASSIGN                                                   !4, null
          6      > JMP                                                      ->27
    8     7    >   INIT_FCALL                                               'in_array'
          8        SEND_VAR                                                 !2
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $11     
         11      > JMPZ                                                     $11, ->19
    9    12    >   INIT_FCALL                                               'mt_rand'
         13        SEND_VAL                                                 0
         14        SEND_VAL                                                 4
         15        DO_ICALL                                         $12     
         16        FETCH_DIM_R                                      ~13     !0, $12
         17        ASSIGN_OP                                     8          !4, ~13
         18      > JMP                                                      ->25
   11    19    >   INIT_FCALL                                               'mt_rand'
         20        SEND_VAL                                                 0
         21        SEND_VAL                                                 4
         22        DO_ICALL                                         $15     
         23        FETCH_DIM_R                                      ~16     !1, $15
         24        ASSIGN_OP                                     8          !4, ~16
   13    25    >   ASSIGN                                                   !2, !4
    6    26        PRE_INC                                                  !3
         27    >   IS_SMALLER                                               !3, 4
         28      > JMPNZ                                                    ~20, ->7
   17    29    >   ECHO                                                     !4
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.13 ms | 1396 KiB | 17 Q