3v4l.org

run code in 300+ PHP versions simultaneously
<?php $old = fopen($file, 'r'); $new = fopen($tmpFile, 'w'); while (!feof($old)) { // Your search subject $subject = ''; // Get $numChars for($x = 0, $numChars = 100; $x < $numChars; $x++){ $subject .= fgetc($old); } // Replace and write to $new fwrite($new, preg_replace('/[^\P{Cc}\t\r\n]/u', '', $subject)); // Clean out the characters $subject = ''; } rename($tmpFile, $file);
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 = 37, Position 2 = 11
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 15
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 37, Position 2 = 11
Branch analysis from position: 37
Branch analysis from position: 11
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 15
Branch analysis from position: 22
Branch analysis from position: 15
filename:       /in/DaJM4
function name:  (null)
number of ops:  42
compiled vars:  !0 = $old, !1 = $file, !2 = $new, !3 = $tmpFile, !4 = $subject, !5 = $x, !6 = $numChars
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'fopen'
          1        SEND_VAR                                                 !1
          2        SEND_VAL                                                 'r'
          3        DO_ICALL                                         $7      
          4        ASSIGN                                                   !0, $7
    4     5        INIT_FCALL                                               'fopen'
          6        SEND_VAR                                                 !3
          7        SEND_VAL                                                 'w'
          8        DO_ICALL                                         $9      
          9        ASSIGN                                                   !2, $9
    6    10      > JMP                                                      ->32
    8    11    >   ASSIGN                                                   !4, ''
   11    12        ASSIGN                                                   !5, 0
         13        ASSIGN                                                   !6, 100
         14      > JMP                                                      ->20
   12    15    >   INIT_FCALL                                               'fgetc'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $14     
         18        ASSIGN_OP                                     8          !4, $14
   11    19        PRE_INC                                                  !5
         20    >   IS_SMALLER                                               !5, !6
         21      > JMPNZ                                                    ~17, ->15
   16    22    >   INIT_FCALL                                               'fwrite'
         23        SEND_VAR                                                 !2
         24        INIT_FCALL                                               'preg_replace'
         25        SEND_VAL                                                 '%2F%5B%5E%5CP%7BCc%7D%5Ct%5Cr%5Cn%5D%2Fu'
         26        SEND_VAL                                                 ''
         27        SEND_VAR                                                 !4
         28        DO_ICALL                                         $18     
         29        SEND_VAR                                                 $18
         30        DO_ICALL                                                 
   19    31        ASSIGN                                                   !4, ''
    6    32    >   INIT_FCALL                                               'feof'
         33        SEND_VAR                                                 !0
         34        DO_ICALL                                         $21     
         35        BOOL_NOT                                         ~22     $21
         36      > JMPNZ                                                    ~22, ->11
   22    37    >   INIT_FCALL                                               'rename'
         38        SEND_VAR                                                 !3
         39        SEND_VAR                                                 !1
         40        DO_ICALL                                                 
         41      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.53 ms | 1392 KiB | 25 Q