3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Force an all-numeric uniqid (happens at certain system clock values) $my_key = uniqid("\x00"); $my_key = preg_replace('/[a-zA-Z]/', "4", $my_key); $my_key .= "a"; $var[$my_key] = TRUE; foreach($var as $key => $val) { if ($key === $my_key) { echo 'You got it right'; } else { echo 'You got it wrong'; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 14, Position 2 = 22
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 22
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 20
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/CDnJN
function name:  (null)
number of ops:  24
compiled vars:  !0 = $my_key, !1 = $var, !2 = $val, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'uniqid'
          1        SEND_VAL                                                 '%00'
          2        DO_ICALL                                         $4      
          3        ASSIGN                                                   !0, $4
    4     4        INIT_FCALL                                               'preg_replace'
          5        SEND_VAL                                                 '%2F%5Ba-zA-Z%5D%2F'
          6        SEND_VAL                                                 '4'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $6      
          9        ASSIGN                                                   !0, $6
    6    10        ASSIGN_OP                                     8          !0, 'a'
    7    11        ASSIGN_DIM                                               !1, !0
         12        OP_DATA                                                  <true>
    8    13      > FE_RESET_R                                       $10     !1, ->22
         14    > > FE_FETCH_R                                       ~11     $10, !2, ->22
         15    >   ASSIGN                                                   !3, ~11
   10    16        IS_IDENTICAL                                             !3, !0
         17      > JMPZ                                                     ~13, ->20
   11    18    >   ECHO                                                     'You+got+it+right'
         19      > JMP                                                      ->21
   13    20    >   ECHO                                                     'You+got+it+wrong'
    8    21    > > JMP                                                      ->14
         22    >   FE_FREE                                                  $10
   15    23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.97 ms | 1395 KiB | 17 Q