3v4l.org

run code in 500+ PHP versions simultaneously
<?php $base = array_merge(range(0,9), range(0,9)); $winning_number = [mt_rand(0,9)]; $all_numbers = array_merge($base, $winning_number); shuffle($all_numbers); $scratch_card = array_slice($all_numbers, 0,9); echo join($scratch_card);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NjItR
function name:  (null)
number of ops:  38
compiled vars:  !0 = $base, !1 = $winning_number, !2 = $all_numbers, !3 = $scratch_card
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'array_merge'
          1        INIT_FCALL                                                   'range'
          2        SEND_VAL                                                     0
          3        SEND_VAL                                                     9
          4        DO_ICALL                                             $4      
          5        SEND_VAR                                                     $4
          6        INIT_FCALL                                                   'range'
          7        SEND_VAL                                                     0
          8        SEND_VAL                                                     9
          9        DO_ICALL                                             $5      
         10        SEND_VAR                                                     $5
         11        DO_ICALL                                             $6      
         12        ASSIGN                                                       !0, $6
    4    13        INIT_FCALL                                                   'mt_rand'
         14        SEND_VAL                                                     0
         15        SEND_VAL                                                     9
         16        DO_ICALL                                             $8      
         17        INIT_ARRAY                                           ~9      $8
         18        ASSIGN                                                       !1, ~9
    6    19        INIT_FCALL                                                   'array_merge'
         20        SEND_VAR                                                     !0
         21        SEND_VAR                                                     !1
         22        DO_ICALL                                             $11     
         23        ASSIGN                                                       !2, $11
    7    24        INIT_FCALL                                                   'shuffle'
         25        SEND_REF                                                     !2
         26        DO_ICALL                                                     
    9    27        INIT_FCALL                                                   'array_slice'
         28        SEND_VAR                                                     !2
         29        SEND_VAL                                                     0
         30        SEND_VAL                                                     9
         31        DO_ICALL                                             $14     
         32        ASSIGN                                                       !3, $14
   11    33        INIT_FCALL                                                   'join'
         34        SEND_VAR                                                     !3
         35        DO_ICALL                                             $16     
         36        ECHO                                                         $16
         37      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
168.23 ms | 1193 KiB | 19 Q