3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sampleData = <<<EOT username,status TestUser,active Admin,not-active EOT; $csvData = $sampleData; //file_get_contents("data.csv"); $lines = explode(PHP_EOL, $csvData); $a = array(); foreach ($lines as $line) { $a[] = str_getcsv($line); } $usernames = array_column($a, 0); $user = 'Admin'; //readline("Enter Username: "); if (array_search($user,$usernames)) { print_r("good"); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 16
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 16
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 31
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
Branch analysis from position: 16
filename:       /in/FhSCh
function name:  (null)
number of ops:  32
compiled vars:  !0 = $sampleData, !1 = $csvData, !2 = $lines, !3 = $a, !4 = $line, !5 = $usernames, !6 = $user
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'username%2Cstatus%0ATestUser%2Cactive%0AAdmin%2Cnot-active'
    9     1        ASSIGN                                                   !1, !0
   10     2        INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 '%0A'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $9      
          6        ASSIGN                                                   !2, $9
   11     7        ASSIGN                                                   !3, <array>
   13     8      > FE_RESET_R                                       $12     !2, ->16
          9    > > FE_FETCH_R                                               $12, !4, ->16
   14    10    >   INIT_FCALL                                               'str_getcsv'
         11        SEND_VAR                                                 !4
         12        DO_ICALL                                         $14     
         13        ASSIGN_DIM                                               !3
         14        OP_DATA                                                  $14
   13    15      > JMP                                                      ->9
         16    >   FE_FREE                                                  $12
   17    17        INIT_FCALL                                               'array_column'
         18        SEND_VAR                                                 !3
         19        SEND_VAL                                                 0
         20        DO_ICALL                                         $15     
         21        ASSIGN                                                   !5, $15
   19    22        ASSIGN                                                   !6, 'Admin'
   21    23        INIT_FCALL                                               'array_search'
         24        SEND_VAR                                                 !6
         25        SEND_VAR                                                 !5
         26        DO_ICALL                                         $18     
         27      > JMPZ                                                     $18, ->31
   22    28    >   INIT_FCALL                                               'print_r'
         29        SEND_VAL                                                 'good'
         30        DO_ICALL                                                 
   23    31    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
231.04 ms | 1015 KiB | 18 Q