daily pastebin goal
28%
SHARE
TWEET

Untitled

a guest Aug 17th, 2018 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. $path = "/tmp/phar.phar";
  3. if (is_file($path)) { unlink($path); }
  4. $phar = new Phar($path);
  5. $phar->startBuffering();
  6. $phar->addFromString('test.txt', 'text');
  7. $phar->setStub('<?php echo "STUB!\n"; __HALT_COMPILER();');
  8. $phar->stopBuffering();
  9. echo file_get_contents("phar://$path/test.txt")."\n";
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top