3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sells = []; $buys = []; $prices = ['0.0001','0.0000995','0.0000996','0.000099']; $users = [1,23,5,4,9,10]; $j = 1; for($i = 0; $i < 61; $i++){ $user = array_rand($users,2); $price = $prices[array_rand($prices)]; $sells[] = [ 'user'=>$user[0], 'amount'=>rand(1,500), 'price'=>$price, 'id'=>$j ]; $buys[] = [ 'user'=>$user[1], 'amount'=>rand(1,500), 'price'=>$price, 'id'=>($j+1) ]; $j += 2; } echo'<pre>'; print_r($buys,false); print_r($sells,false);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 42
Branch analysis from position: 42
2 jumps found. (Code = 44) Position 1 = 44, Position 2 = 7
Branch analysis from position: 44
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 44, Position 2 = 7
Branch analysis from position: 44
Branch analysis from position: 7
filename:       /in/ahYNL
function name:  (null)
number of ops:  54
compiled vars:  !0 = $sells, !1 = $buys, !2 = $prices, !3 = $users, !4 = $j, !5 = $i, !6 = $user, !7 = $price
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    6     1        ASSIGN                                                   !1, <array>
    9     2        ASSIGN                                                   !2, <array>
   10     3        ASSIGN                                                   !3, <array>
   12     4        ASSIGN                                                   !4, 1
   13     5        ASSIGN                                                   !5, 0
          6      > JMP                                                      ->42
   14     7    >   INIT_FCALL                                               'array_rand'
          8        SEND_VAR                                                 !3
          9        SEND_VAL                                                 2
         10        DO_ICALL                                         $14     
         11        ASSIGN                                                   !6, $14
   15    12        INIT_FCALL                                               'array_rand'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                         $16     
         15        FETCH_DIM_R                                      ~17     !2, $16
         16        ASSIGN                                                   !7, ~17
   17    17        FETCH_DIM_R                                      ~20     !6, 0
         18        INIT_ARRAY                                       ~21     ~20, 'user'
   18    19        INIT_FCALL                                               'rand'
         20        SEND_VAL                                                 1
         21        SEND_VAL                                                 500
         22        DO_ICALL                                         $22     
         23        ADD_ARRAY_ELEMENT                                ~21     $22, 'amount'
   19    24        ADD_ARRAY_ELEMENT                                ~21     !7, 'price'
   20    25        ADD_ARRAY_ELEMENT                                ~21     !4, 'id'
   16    26        ASSIGN_DIM                                               !0
   20    27        OP_DATA                                                  ~21
   23    28        FETCH_DIM_R                                      ~24     !6, 1
         29        INIT_ARRAY                                       ~25     ~24, 'user'
   24    30        INIT_FCALL                                               'rand'
         31        SEND_VAL                                                 1
         32        SEND_VAL                                                 500
         33        DO_ICALL                                         $26     
         34        ADD_ARRAY_ELEMENT                                ~25     $26, 'amount'
   25    35        ADD_ARRAY_ELEMENT                                ~25     !7, 'price'
   26    36        ADD                                              ~27     !4, 1
         37        ADD_ARRAY_ELEMENT                                ~25     ~27, 'id'
   22    38        ASSIGN_DIM                                               !1
   26    39        OP_DATA                                                  ~25
   28    40        ASSIGN_OP                                     1          !4, 2
   13    41        PRE_INC                                                  !5
         42    >   IS_SMALLER                                               !5, 61
         43      > JMPNZ                                                    ~30, ->7
   31    44    >   ECHO                                                     '%3Cpre%3E'
   33    45        INIT_FCALL                                               'print_r'
         46        SEND_VAR                                                 !1
         47        SEND_VAL                                                 <false>
         48        DO_ICALL                                                 
   35    49        INIT_FCALL                                               'print_r'
         50        SEND_VAR                                                 !0
         51        SEND_VAL                                                 <false>
         52        DO_ICALL                                                 
         53      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.85 ms | 1400 KiB | 19 Q