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,2)]; $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 = 43
Branch analysis from position: 43
2 jumps found. (Code = 44) Position 1 = 45, Position 2 = 7
Branch analysis from position: 45
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 45, Position 2 = 7
Branch analysis from position: 45
Branch analysis from position: 7
filename:       /in/D4gHA
function name:  (null)
number of ops:  55
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                                                      ->43
   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        SEND_VAL                                                 2
         15        DO_ICALL                                         $16     
         16        FETCH_DIM_R                                      ~17     !2, $16
         17        ASSIGN                                                   !7, ~17
   17    18        FETCH_DIM_R                                      ~20     !6, 0
         19        INIT_ARRAY                                       ~21     ~20, 'user'
   18    20        INIT_FCALL                                               'rand'
         21        SEND_VAL                                                 1
         22        SEND_VAL                                                 500
         23        DO_ICALL                                         $22     
         24        ADD_ARRAY_ELEMENT                                ~21     $22, 'amount'
   19    25        ADD_ARRAY_ELEMENT                                ~21     !7, 'price'
   20    26        ADD_ARRAY_ELEMENT                                ~21     !4, 'id'
   16    27        ASSIGN_DIM                                               !0
   20    28        OP_DATA                                                  ~21
   23    29        FETCH_DIM_R                                      ~24     !6, 1
         30        INIT_ARRAY                                       ~25     ~24, 'user'
   24    31        INIT_FCALL                                               'rand'
         32        SEND_VAL                                                 1
         33        SEND_VAL                                                 500
         34        DO_ICALL                                         $26     
         35        ADD_ARRAY_ELEMENT                                ~25     $26, 'amount'
   25    36        ADD_ARRAY_ELEMENT                                ~25     !7, 'price'
   26    37        ADD                                              ~27     !4, 1
         38        ADD_ARRAY_ELEMENT                                ~25     ~27, 'id'
   22    39        ASSIGN_DIM                                               !1
   26    40        OP_DATA                                                  ~25
   28    41        ASSIGN_OP                                     1          !4, 2
   13    42        PRE_INC                                                  !5
         43    >   IS_SMALLER                                               !5, 61
         44      > JMPNZ                                                    ~30, ->7
   31    45    >   ECHO                                                     '%3Cpre%3E'
   33    46        INIT_FCALL                                               'print_r'
         47        SEND_VAR                                                 !1
         48        SEND_VAL                                                 <false>
         49        DO_ICALL                                                 
   35    50        INIT_FCALL                                               'print_r'
         51        SEND_VAR                                                 !0
         52        SEND_VAL                                                 <false>
         53        DO_ICALL                                                 
         54      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.03 ms | 1400 KiB | 19 Q