3v4l.org

run code in 300+ PHP versions simultaneously
<?php $users = [ ['username' => 10010, 'password' => '01019'], ['username' => 10011, 'password' => '01151'], ['username' => 10012, 'password' => '01214'] ]; $user_id = '10011'; $password_id = '01151'; if (array_search(['username' => $user_id, 'password' => $password_id], $users)) { echo 'Found'; } else { echo 'Not found'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cDh53
function name:  (null)
number of ops:  14
compiled vars:  !0 = $users, !1 = $user_id, !2 = $password_id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    8     1        ASSIGN                                                   !1, '10011'
    9     2        ASSIGN                                                   !2, '01151'
   11     3        INIT_FCALL                                               'array_search'
          4        INIT_ARRAY                                       ~6      !1, 'username'
          5        ADD_ARRAY_ELEMENT                                ~6      !2, 'password'
          6        SEND_VAL                                                 ~6
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $7      
          9      > JMPZ                                                     $7, ->12
   12    10    >   ECHO                                                     'Found'
   11    11      > JMP                                                      ->13
   14    12    >   ECHO                                                     'Not+found'
   15    13    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
126.67 ms | 1009 KiB | 14 Q