3v4l.org

run code in 300+ PHP versions simultaneously
<?php $file = file_put_contents("testteststasfasdaskdjfbasdlkfbaslkdcjnbal;dfn"); $tmpFile = file_put_contents(""); $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 = 40
Branch analysis from position: 40
2 jumps found. (Code = 44) Position 1 = 45, Position 2 = 19
Branch analysis from position: 45
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 23
Branch analysis from position: 30
2 jumps found. (Code = 44) Position 1 = 45, Position 2 = 19
Branch analysis from position: 45
Branch analysis from position: 19
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 23
Branch analysis from position: 30
Branch analysis from position: 23
filename:       /in/K1v3f
function name:  (null)
number of ops:  50
compiled vars:  !0 = $file, !1 = $tmpFile, !2 = $old, !3 = $new, !4 = $subject, !5 = $x, !6 = $numChars
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'file_put_contents'
          1        SEND_VAL                                                 'testteststasfasdaskdjfbasdlkfbaslkdcjnbal%3Bdfn'
          2        DO_ICALL                                         $7      
          3        ASSIGN                                                   !0, $7
    4     4        INIT_FCALL                                               'file_put_contents'
          5        SEND_VAL                                                 ''
          6        DO_ICALL                                         $9      
          7        ASSIGN                                                   !1, $9
    5     8        INIT_FCALL                                               'fopen'
          9        SEND_VAR                                                 !0
         10        SEND_VAL                                                 'r'
         11        DO_ICALL                                         $11     
         12        ASSIGN                                                   !2, $11
    6    13        INIT_FCALL                                               'fopen'
         14        SEND_VAR                                                 !1
         15        SEND_VAL                                                 'w'
         16        DO_ICALL                                         $13     
         17        ASSIGN                                                   !3, $13
    8    18      > JMP                                                      ->40
   10    19    >   ASSIGN                                                   !4, ''
   13    20        ASSIGN                                                   !5, 0
         21        ASSIGN                                                   !6, 100
         22      > JMP                                                      ->28
   14    23    >   INIT_FCALL                                               'fgetc'
         24        SEND_VAR                                                 !2
         25        DO_ICALL                                         $18     
         26        ASSIGN_OP                                     8          !4, $18
   13    27        PRE_INC                                                  !5
         28    >   IS_SMALLER                                               !5, !6
         29      > JMPNZ                                                    ~21, ->23
   18    30    >   INIT_FCALL                                               'fwrite'
         31        SEND_VAR                                                 !3
         32        INIT_FCALL                                               'preg_replace'
         33        SEND_VAL                                                 '%2F%5B%5E%5CP%7BCc%7D%5Ct%5Cr%5Cn%5D%2Fu'
         34        SEND_VAL                                                 ''
         35        SEND_VAR                                                 !4
         36        DO_ICALL                                         $22     
         37        SEND_VAR                                                 $22
         38        DO_ICALL                                                 
   21    39        ASSIGN                                                   !4, ''
    8    40    >   INIT_FCALL                                               'feof'
         41        SEND_VAR                                                 !2
         42        DO_ICALL                                         $25     
         43        BOOL_NOT                                         ~26     $25
         44      > JMPNZ                                                    ~26, ->19
   24    45    >   INIT_FCALL                                               'rename'
         46        SEND_VAR                                                 !1
         47        SEND_VAR                                                 !0
         48        DO_ICALL                                                 
         49      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.33 ms | 1400 KiB | 27 Q