3v4l.org

run code in 300+ PHP versions simultaneously
<?php function randome_array($n) { $array=array(); $x = 1; while($x <= $n) { $temp = mt_rand(0,1); array_push($array,$temp); $x++; } return $array; } print_r(randome_array(5));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZSrMX
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'print_r'
          1        INIT_FCALL                                               'randome_array'
          2        SEND_VAL                                                 5
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

Function randome_array:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 4
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 4
Branch analysis from position: 16
Branch analysis from position: 4
filename:       /in/ZSrMX
function name:  randome_array
number of ops:  18
compiled vars:  !0 = $n, !1 = $array, !2 = $x, !3 = $temp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    6     1        ASSIGN                                                   !1, <array>
    7     2        ASSIGN                                                   !2, 1
    8     3      > JMP                                                      ->14
    9     4    >   INIT_FCALL                                               'mt_rand'
          5        SEND_VAL                                                 0
          6        SEND_VAL                                                 1
          7        DO_ICALL                                         $6      
          8        ASSIGN                                                   !3, $6
   10     9        INIT_FCALL                                               'array_push'
         10        SEND_REF                                                 !1
         11        SEND_VAR                                                 !3
         12        DO_ICALL                                                 
   11    13        PRE_INC                                                  !2
    8    14    >   IS_SMALLER_OR_EQUAL                                      !2, !0
         15      > JMPNZ                                                    ~10, ->4
   13    16    > > RETURN                                                   !1
   14    17*     > RETURN                                                   null

End of function randome_array

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.44 ms | 1003 KiB | 17 Q