3v4l.org

run code in 300+ PHP versions simultaneously
<?php $rand = range(0, 50); shuffle($rand); $rand2 = range(0, 50); shuffle($rand2); $arr = array_combine($rand, $rand2); $arr = array_filter($arr,function($k){ return $k <= 15 && $k >= 10; },2); sort($arr); foreach($arr as $key => $value) { echo "$key: $value\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 32, Position 2 = 40
Branch analysis from position: 32
2 jumps found. (Code = 78) Position 1 = 33, Position 2 = 40
Branch analysis from position: 33
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 40
filename:       /in/tQkQu
function name:  (null)
number of ops:  42
compiled vars:  !0 = $rand, !1 = $rand2, !2 = $arr, !3 = $value, !4 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 0
          2        SEND_VAL                                                 50
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !0, $5
    4     5        INIT_FCALL                                               'shuffle'
          6        SEND_REF                                                 !0
          7        DO_ICALL                                                 
    6     8        INIT_FCALL                                               'range'
          9        SEND_VAL                                                 0
         10        SEND_VAL                                                 50
         11        DO_ICALL                                         $8      
         12        ASSIGN                                                   !1, $8
    7    13        INIT_FCALL                                               'shuffle'
         14        SEND_REF                                                 !1
         15        DO_ICALL                                                 
    9    16        INIT_FCALL                                               'array_combine'
         17        SEND_VAR                                                 !0
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                         $11     
         20        ASSIGN                                                   !2, $11
   10    21        INIT_FCALL                                               'array_filter'
         22        SEND_VAR                                                 !2
         23        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FtQkQu%3A10%240'
         24        SEND_VAL                                                 ~13
         25        SEND_VAL                                                 2
         26        DO_ICALL                                         $14     
         27        ASSIGN                                                   !2, $14
   11    28        INIT_FCALL                                               'sort'
         29        SEND_REF                                                 !2
         30        DO_ICALL                                                 
   13    31      > FE_RESET_R                                       $17     !2, ->40
         32    > > FE_FETCH_R                                       ~18     $17, !3, ->40
         33    >   ASSIGN                                                   !4, ~18
   14    34        ROPE_INIT                                     4  ~21     !4
         35        ROPE_ADD                                      1  ~21     ~21, '%3A+'
         36        ROPE_ADD                                      2  ~21     ~21, !3
         37        ROPE_END                                      3  ~20     ~21, '%0A'
         38        ECHO                                                     ~20
   13    39      > JMP                                                      ->32
         40    >   FE_FREE                                                  $17
   15    41      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FtQkQu%3A10%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
filename:       /in/tQkQu
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1        IS_SMALLER_OR_EQUAL                              ~1      !0, 15
          2      > JMPZ_EX                                          ~1      ~1, ->5
          3    >   IS_SMALLER_OR_EQUAL                              ~2      10, !0
          4        BOOL                                             ~1      ~2
          5    > > RETURN                                                   ~1
          6*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FtQkQu%3A10%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.92 ms | 1400 KiB | 23 Q