3v4l.org

run code in 500+ PHP versions simultaneously
<?php // Lets create a dummy array $array = array(); for($i = 0; $i < 1000; $i++) { $array[] = $i; } // Lets make a randomized temporary array $backUpArray = $array; $tempArray = array(); for($i = 0; $i < 50; $i++) { // Select random Index $randomIndex = rand(0 , count($backUpArray)); // Copy it to the temp array $tempArray[] = $backUpArray[$randomIndex]; // Delete the row from our backup unset($backUpArray[$randomIndex]); // Reorganize the key indexes $backUpArray = array_values($backUpArray); } $string1 = implode(",", $tempArray); var_dump($string1);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 12
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 12
Branch analysis from position: 29
Branch analysis from position: 12
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
Branch analysis from position: 3
filename:       /in/hjuv6
function name:  (null)
number of ops:  35
compiled vars:  !0 = $array, !1 = $i, !2 = $backUpArray, !3 = $tempArray, !4 = $randomIndex, !5 = $string1
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                       !0, <array>
    6     1        ASSIGN                                                       !1, 0
          2      > JMP                                                          ->6
    7     3    >   ASSIGN_DIM                                                   !0
          4        OP_DATA                                                      !1
    6     5        PRE_INC                                                      !1
          6    >   IS_SMALLER                                                   !1, 1000
          7      > JMPNZ                                                        ~10, ->3
   11     8    >   ASSIGN                                                       !2, !0
   12     9        ASSIGN                                                       !3, <array>
   14    10        ASSIGN                                                       !1, 0
         11      > JMP                                                          ->27
   17    12    >   INIT_FCALL                                                   'rand'
         13        SEND_VAL                                                     0
         14        COUNT                                                ~14     !2
         15        SEND_VAL                                                     ~14
         16        DO_ICALL                                             $15     
         17        ASSIGN                                                       !4, $15
   19    18        FETCH_DIM_R                                          ~18     !2, !4
         19        ASSIGN_DIM                                                   !3
         20        OP_DATA                                                      ~18
   21    21        UNSET_DIM                                                    !2, !4
   23    22        INIT_FCALL                                                   'array_values'
         23        SEND_VAR                                                     !2
         24        DO_ICALL                                             $19     
         25        ASSIGN                                                       !2, $19
   14    26        PRE_INC                                                      !1
         27    >   IS_SMALLER                                                   !1, 50
         28      > JMPNZ                                                        ~22, ->12
   27    29    >   FRAMELESS_ICALL_2                implode             ~23     '%2C', !3
         30        ASSIGN                                                       !5, ~23
   29    31        INIT_FCALL                                                   'var_dump'
         32        SEND_VAR                                                     !5
         33        DO_ICALL                                                     
         34      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
157.54 ms | 1912 KiB | 16 Q