3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = <<<EOL name.lastname name.lastname name.lastname myname.mylastname name.lastname EOL; $path = sys_get_temp_dir() . '/test.txt'; $handle = fopen($path, 'wb'); fwrite($handle, $data); fclose($handle); $username = 'myname.mylastname'; $liste = false; $handle = fopen($path, 'rb'); while (false !== ($line = fgets($handle))) { if (trim($line) === $username){ $liste = true; break; } } fclose($handle); var_dump($liste);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
2 jumps found. (Code = 44) Position 1 = 38, Position 2 = 25
Branch analysis from position: 38
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 32
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 38
Branch analysis from position: 38
Branch analysis from position: 32
filename:       /in/SECDo
function name:  (null)
number of ops:  45
compiled vars:  !0 = $data, !1 = $path, !2 = $handle, !3 = $username, !4 = $liste, !5 = $line
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'name.lastname%0Aname.lastname%0Aname.lastname%0Amyname.mylastname%0Aname.lastname'
   11     1        INIT_FCALL                                               'sys_get_temp_dir'
          2        DO_ICALL                                         $7      
          3        CONCAT                                           ~8      $7, '%2Ftest.txt'
          4        ASSIGN                                                   !1, ~8
   12     5        INIT_FCALL                                               'fopen'
          6        SEND_VAR                                                 !1
          7        SEND_VAL                                                 'wb'
          8        DO_ICALL                                         $10     
          9        ASSIGN                                                   !2, $10
   13    10        INIT_FCALL                                               'fwrite'
         11        SEND_VAR                                                 !2
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                                 
   14    14        INIT_FCALL                                               'fclose'
         15        SEND_VAR                                                 !2
         16        DO_ICALL                                                 
   16    17        ASSIGN                                                   !3, 'myname.mylastname'
   17    18        ASSIGN                                                   !4, <false>
   19    19        INIT_FCALL                                               'fopen'
         20        SEND_VAR                                                 !1
         21        SEND_VAL                                                 'rb'
         22        DO_ICALL                                         $16     
         23        ASSIGN                                                   !2, $16
   20    24      > JMP                                                      ->32
   21    25    >   INIT_FCALL                                               'trim'
         26        SEND_VAR                                                 !5
         27        DO_ICALL                                         $18     
         28        IS_IDENTICAL                                             !3, $18
         29      > JMPZ                                                     ~19, ->32
   22    30    >   ASSIGN                                                   !4, <true>
   23    31      > JMP                                                      ->38
   20    32    >   INIT_FCALL                                               'fgets'
         33        SEND_VAR                                                 !2
         34        DO_ICALL                                         $21     
         35        ASSIGN                                           ~22     !5, $21
         36        TYPE_CHECK                                  1018          ~22
         37      > JMPNZ                                                    ~23, ->25
   26    38    >   INIT_FCALL                                               'fclose'
         39        SEND_VAR                                                 !2
         40        DO_ICALL                                                 
   28    41        INIT_FCALL                                               'var_dump'
         42        SEND_VAR                                                 !4
         43        DO_ICALL                                                 
         44      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.03 ms | 1017 KiB | 20 Q