Skip to content

Instantly share code, notes, and snippets.

@KennFatt
Created August 30, 2018 11:38
Show Gist options
  • Save KennFatt/3bba312030639b66dea5eacb906004b1 to your computer and use it in GitHub Desktop.
Save KennFatt/3bba312030639b66dea5eacb906004b1 to your computer and use it in GitHub Desktop.
<?php
/**
* WARNING: Keep your machine safe! This is just for testing purpose.
*
* ini_set("memory_limit", -1); or you can set it manually in php.ini
*/
declare(strict_types=1);
echo "[*] Can your machine handle this script?" . PHP_EOL;
while (true) {
$stacks = [];
for ($i=0; $i < 3; $i++) {
$stacks[] = range(1, 1024 * 1024 * 10);
}
unset($stacks);
echo "[!] Updating memory..." . PHP_EOL;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment