3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('TEST_VALUE_COUNT', 5000); srand(15); $values = array(); for ($i = 0; $i < TEST_VALUE_COUNT; $i++) { $values[] = rand(); } srand(15); foreach($values as $key => $value) { if ($value !== rand()) { print "Bad value at " . $key; exit; } } echo "All were the same in " . count($values) . " values";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 10
Branch analysis from position: 18
2 jumps found. (Code = 77) Position 1 = 22, Position 2 = 32
Branch analysis from position: 22
2 jumps found. (Code = 78) Position 1 = 23, Position 2 = 32
Branch analysis from position: 23
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 31
Branch analysis from position: 28
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 10
Branch analysis from position: 18
Branch analysis from position: 10
filename:       /in/VZXKA
function name:  (null)
number of ops:  38
compiled vars:  !0 = $values, !1 = $i, !2 = $value, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 'TEST_VALUE_COUNT'
          2        SEND_VAL                                                 5000
          3        DO_ICALL                                                 
    5     4        INIT_FCALL                                               'srand'
          5        SEND_VAL                                                 15
          6        DO_ICALL                                                 
    7     7        ASSIGN                                                   !0, <array>
    9     8        ASSIGN                                                   !1, 0
          9      > JMP                                                      ->15
   10    10    >   INIT_FCALL                                               'rand'
         11        DO_ICALL                                         $9      
         12        ASSIGN_DIM                                               !0
         13        OP_DATA                                                  $9
    9    14        PRE_INC                                                  !1
         15    >   FETCH_CONSTANT                                   ~11     'TEST_VALUE_COUNT'
         16        IS_SMALLER                                               !1, ~11
         17      > JMPNZ                                                    ~12, ->10
   13    18    >   INIT_FCALL                                               'srand'
         19        SEND_VAL                                                 15
         20        DO_ICALL                                                 
   15    21      > FE_RESET_R                                       $14     !0, ->32
         22    > > FE_FETCH_R                                       ~15     $14, !2, ->32
         23    >   ASSIGN                                                   !3, ~15
   16    24        INIT_FCALL                                               'rand'
         25        DO_ICALL                                         $17     
         26        IS_NOT_IDENTICAL                                         !2, $17
         27      > JMPZ                                                     ~18, ->31
   17    28    >   CONCAT                                           ~19     'Bad+value+at+', !3
         29        ECHO                                                     ~19
   18    30      > EXIT                                                     
   15    31    > > JMP                                                      ->22
         32    >   FE_FREE                                                  $14
   22    33        COUNT                                            ~20     !0
         34        CONCAT                                           ~21     'All+were+the+same+in+', ~20
         35        CONCAT                                           ~22     ~21, '+values'
         36        ECHO                                                     ~22
         37      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.06 ms | 1400 KiB | 19 Q