3v4l.org

run code in 300+ PHP versions simultaneously
<?php $imgs = []; foreach (range(1,3) as $number) { $lala1= "\"img$number\","; $imgs[] = $lala1; } echo $imgs[array_rand($imgs)];
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 14
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 14
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/UrGu6
function name:  (null)
number of ops:  21
compiled vars:  !0 = $imgs, !1 = $number, !2 = $lala1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'range'
          2        SEND_VAL                                                 1
          3        SEND_VAL                                                 3
          4        DO_ICALL                                         $4      
          5      > FE_RESET_R                                       $5      $4, ->14
          6    > > FE_FETCH_R                                               $5, !1, ->14
    5     7    >   ROPE_INIT                                     3  ~7      '%22img'
          8        ROPE_ADD                                      1  ~7      ~7, !1
          9        ROPE_END                                      2  ~6      ~7, '%22%2C'
         10        ASSIGN                                                   !2, ~6
    6    11        ASSIGN_DIM                                               !0
         12        OP_DATA                                                  !2
    4    13      > JMP                                                      ->6
         14    >   FE_FREE                                                  $5
    8    15        INIT_FCALL                                               'array_rand'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $11     
         18        FETCH_DIM_R                                      ~12     !0, $11
         19        ECHO                                                     ~12
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
135.38 ms | 1000 KiB | 15 Q