fork(1) download
  1. <?php
  2.  
  3. $null = chr(0);
  4. $data = file_get_contents('o');
  5.  
  6. // Separate the dictionary from data (two nulls delimiter)
  7. list($words, $data) = explode($null . $null, $data);
  8.  
  9. // Separate the dictionary words from each other (one null delimiter)
  10. $words = explode($null, $words);
  11.  
  12.  
  13. // Our first substitution is the sting "0", so start from there.
  14. $num = 0;
  15.  
  16. // For each of the words...
  17. foreach ($words as $w) {
  18. // Replace its number form with itself
  19. $data = preg_replace('|\b'. $num .'\b|', $w, $data);
  20.  
  21. // Next number for substitution
  22. $num++;
  23. }
  24.  
  25. file_put_contents('d', $data);
  26.  
  27. ?>
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty