3v4l.org

run code in 300+ PHP versions simultaneously
<?php eval('$i = (string)1/4;'); var_dump($i);echo (string)1/4; $data = array( 'A-AA', 'B-BB', 'C-CC', 'D-DD', 'E-EE', 'F-FF', 'G-GG', 'H-HH', 'I-II', 'J-JJ', ); $randStr = ''; $randArr = array_rand($data, 5);print_r($randArr); shuffle($randArr); // 打乱数组,防止开头的那个随机不到 G H I J. foreach ( $randArr as $k => $v ) { $randStr .= $k == 0 ? $data[$v] . '-[' : substr($data[$v], -2) . ' '; } echo rtrim($randStr) . ']';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 21, Position 2 = 38
Branch analysis from position: 21
2 jumps found. (Code = 78) Position 1 = 22, Position 2 = 38
Branch analysis from position: 22
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 29
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
Branch analysis from position: 38
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 38
filename:       /in/Zrj0S
function name:  (null)
number of ops:  45
compiled vars:  !0 = $i, !1 = $data, !2 = $randStr, !3 = $randArr, !4 = $v, !5 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INCLUDE_OR_EVAL                                          '%24i+%3D+%28string%291%2F4%3B', EVAL
    4     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
          4        CAST                                          6  ~8      1
          5        DIV                                              ~9      ~8, 4
          6        ECHO                                                     ~9
    6     7        ASSIGN                                                   !1, <array>
   19     8        ASSIGN                                                   !2, ''
   20     9        INIT_FCALL                                               'array_rand'
         10        SEND_VAR                                                 !1
         11        SEND_VAL                                                 5
         12        DO_ICALL                                         $12     
         13        ASSIGN                                                   !3, $12
         14        INIT_FCALL                                               'print_r'
         15        SEND_VAR                                                 !3
         16        DO_ICALL                                                 
   21    17        INIT_FCALL                                               'shuffle'
         18        SEND_REF                                                 !3
         19        DO_ICALL                                                 
   22    20      > FE_RESET_R                                       $16     !3, ->38
         21    > > FE_FETCH_R                                       ~17     $16, !4, ->38
         22    >   ASSIGN                                                   !5, ~17
   23    23        IS_EQUAL                                                 !5, 0
         24      > JMPZ                                                     ~19, ->29
         25    >   FETCH_DIM_R                                      ~20     !1, !4
         26        CONCAT                                           ~21     ~20, '-%5B'
         27        QM_ASSIGN                                        ~22     ~21
         28      > JMP                                                      ->36
         29    >   INIT_FCALL                                               'substr'
         30        FETCH_DIM_R                                      ~23     !1, !4
         31        SEND_VAL                                                 ~23
         32        SEND_VAL                                                 -2
         33        DO_ICALL                                         $24     
         34        CONCAT                                           ~25     $24, '+'
         35        QM_ASSIGN                                        ~22     ~25
         36    >   ASSIGN_OP                                     8          !2, ~22
   22    37      > JMP                                                      ->21
         38    >   FE_FREE                                                  $16
   25    39        INIT_FCALL                                               'rtrim'
         40        SEND_VAR                                                 !2
         41        DO_ICALL                                         $27     
         42        CONCAT                                           ~28     $27, '%5D'
         43        ECHO                                                     ~28
         44      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.53 ms | 1400 KiB | 25 Q