3v4l.org

run code in 300+ PHP versions simultaneously
<?php $lucky_numbers = []; for($i = 0; $i < 5; $i++) { while(true) { $number = rand(1, 35); if (!in_array($number, $lucky_numbers)) { $lucky_numbers[] = $number; break; } } } sort($lucky_numbers); echo PHP_EOL . 'Laimīgie skaitļi: ' . implode(', ', $lucky_numbers) . PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 3
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 4
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 3
Branch analysis from position: 22
Branch analysis from position: 3
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 18
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
Branch analysis from position: 18
filename:       /in/Y8CTS
function name:  (null)
number of ops:  33
compiled vars:  !0 = $lucky_numbers, !1 = $i, !2 = $number
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->20
    6     3    > > JMP                                                      ->18
    8     4    >   INIT_FCALL                                               'rand'
          5        SEND_VAL                                                 1
          6        SEND_VAL                                                 35
          7        DO_ICALL                                         $5      
          8        ASSIGN                                                   !2, $5
    9     9        INIT_FCALL                                               'in_array'
         10        SEND_VAR                                                 !2
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $7      
         13        BOOL_NOT                                         ~8      $7
         14      > JMPZ                                                     ~8, ->18
   11    15    >   ASSIGN_DIM                                               !0
         16        OP_DATA                                                  !2
   12    17      > JMP                                                      ->19
    6    18    > > JMPNZ                                                    <true>, ->4
    4    19    >   PRE_INC                                                  !1
         20    >   IS_SMALLER                                               !1, 5
         21      > JMPNZ                                                    ~11, ->3
   16    22    >   INIT_FCALL                                               'sort'
         23        SEND_REF                                                 !0
         24        DO_ICALL                                                 
   17    25        INIT_FCALL                                               'implode'
         26        SEND_VAL                                                 '%2C+'
         27        SEND_VAR                                                 !0
         28        DO_ICALL                                         $13     
         29        CONCAT                                           ~14     '%0ALaim%C4%ABgie+skait%C4%BCi%3A+', $13
         30        CONCAT                                           ~15     ~14, '%0A'
         31        ECHO                                                     ~15
         32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.16 ms | 1396 KiB | 21 Q