Created
June 26, 2014 04:48
-
-
Save JoelMarcey/3d08abb88454efc2d4e4 to your computer and use it in GitHub Desktop.
php:// hhvm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Set the limit to 5 MB. | |
$fiveMBs = 5 * 1024 * 1024; | |
$fp = fopen("php://temp/maxmemory:$fiveMBs", 'r+'); | |
fputs($fp, "hello\n"); | |
// Read what we have written. | |
rewind($fp); | |
echo stream_get_contents($fp); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment