3v4l.org

run code in 300+ PHP versions simultaneously
<?php $users = [ 'a' => 2, 'b' => 1, 'c' => 1, 'd' => 3 ]; $lowestValue = min($users); $lowestValueKeys = array_keys($users, $lowestValue); print_r($lowestValueKeys); $lowestUsers = array_intersect_key($users, array_flip($lowestValueKeys)); print_r($lowestUsers); $lowestValue = min($users); $lowestUsers = array_filter($users, function ($v) use ($lowestValue) { return $v === $lowestValue; }); print_r($lowestUsers);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aZ3rr
function name:  (null)
number of ops:  39
compiled vars:  !0 = $users, !1 = $lowestValue, !2 = $lowestValueKeys, !3 = $lowestUsers
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   10     1        INIT_FCALL                                               'min'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !1, $5
   11     5        INIT_FCALL                                               'array_keys'
          6        SEND_VAR                                                 !0
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $7      
          9        ASSIGN                                                   !2, $7
   12    10        INIT_FCALL                                               'print_r'
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                                 
   13    13        INIT_FCALL                                               'array_intersect_key'
         14        SEND_VAR                                                 !0
         15        INIT_FCALL                                               'array_flip'
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                         $10     
         18        SEND_VAR                                                 $10
         19        DO_ICALL                                         $11     
         20        ASSIGN                                                   !3, $11
   14    21        INIT_FCALL                                               'print_r'
         22        SEND_VAR                                                 !3
         23        DO_ICALL                                                 
   16    24        INIT_FCALL                                               'min'
         25        SEND_VAR                                                 !0
         26        DO_ICALL                                         $14     
         27        ASSIGN                                                   !1, $14
   17    28        INIT_FCALL                                               'array_filter'
         29        SEND_VAR                                                 !0
         30        DECLARE_LAMBDA_FUNCTION                          ~16     [0]
         31        BIND_LEXICAL                                             ~16, !1
         32        SEND_VAL                                                 ~16
         33        DO_ICALL                                         $17     
         34        ASSIGN                                                   !3, $17
   18    35        INIT_FCALL                                               'print_r'
         36        SEND_VAR                                                 !3
         37        DO_ICALL                                                 
         38      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aZ3rr
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $v, !1 = $lowestValue
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
          2        IS_IDENTICAL                                     ~2      !0, !1
          3      > RETURN                                                   ~2
          4*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.21 ms | 1021 KiB | 19 Q