3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'Chuck Norris'; $shuffle = ''; $i = 0; while(strpos($shuffle = str_shuffle($string), 'Chuck Norris') === false){ $i++; if($i > 20000) { $i = 0; echo "$shuffle\n"; } } echo "\n**$shuffle**";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 4
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 11
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 4
Branch analysis from position: 21
Branch analysis from position: 4
Branch analysis from position: 11
filename:       /in/jUgVh
function name:  (null)
number of ops:  26
compiled vars:  !0 = $string, !1 = $shuffle, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'Chuck+Norris'
    3     1        ASSIGN                                                   !1, ''
    4     2        ASSIGN                                                   !2, 0
    5     3      > JMP                                                      ->11
    6     4    >   PRE_INC                                                  !2
    7     5        IS_SMALLER                                               20000, !2
          6      > JMPZ                                                     ~7, ->11
    8     7    >   ASSIGN                                                   !2, 0
    9     8        NOP                                                      
          9        FAST_CONCAT                                      ~9      !1, '%0A'
         10        ECHO                                                     ~9
    5    11    >   INIT_FCALL                                               'strpos'
         12        INIT_FCALL                                               'str_shuffle'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $10     
         15        ASSIGN                                           ~11     !1, $10
         16        SEND_VAL                                                 ~11
         17        SEND_VAL                                                 'Chuck+Norris'
         18        DO_ICALL                                         $12     
         19        TYPE_CHECK                                    4          $12
         20      > JMPNZ                                                    ~13, ->4
   12    21    >   ROPE_INIT                                     3  ~15     '%0A%2A%2A'
         22        ROPE_ADD                                      1  ~15     ~15, !1
         23        ROPE_END                                      2  ~14     ~15, '%2A%2A'
         24        ECHO                                                     ~14
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.95 ms | 1395 KiB | 17 Q