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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.14 ms | 1400 KiB | 19 Q