3v4l.org

run code in 300+ PHP versions simultaneously
<?php $params = array('limit' => -1); $limit = $params['limit']; $data = array(); for($i = 0; $i < 100; $i++) { $data[$i] = array( 'uid' => $i, 'userid' => 'extrauser' . $i ); } asort($data); print_r(array_slice($data, 0, $limit));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 6
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 6
Branch analysis from position: 14
Branch analysis from position: 6
filename:       /in/J30YB
function name:  (null)
number of ops:  26
compiled vars:  !0 = $params, !1 = $limit, !2 = $data, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        FETCH_DIM_R                                      ~5      !0, 'limit'
          2        ASSIGN                                                   !1, ~5
    4     3        ASSIGN                                                   !2, <array>
    5     4        ASSIGN                                                   !3, 0
          5      > JMP                                                      ->12
    7     6    >   INIT_ARRAY                                       ~10     !3, 'uid'
    8     7        CONCAT                                           ~11     'extrauser', !3
          8        ADD_ARRAY_ELEMENT                                ~10     ~11, 'userid'
    6     9        ASSIGN_DIM                                               !2, !3
    8    10        OP_DATA                                                  ~10
    5    11        PRE_INC                                                  !3
         12    >   IS_SMALLER                                               !3, 100
         13      > JMPNZ                                                    ~13, ->6
   11    14    >   INIT_FCALL                                               'asort'
         15        SEND_REF                                                 !2
         16        DO_ICALL                                                 
   12    17        INIT_FCALL                                               'print_r'
         18        INIT_FCALL                                               'array_slice'
         19        SEND_VAR                                                 !2
         20        SEND_VAL                                                 0
         21        SEND_VAR                                                 !1
         22        DO_ICALL                                         $15     
         23        SEND_VAR                                                 $15
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.07 ms | 1395 KiB | 19 Q