Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • 5
    \$\begingroup\$ while(file_put_contents(1,1)); should be enough. Note that running full scripts from command line as php -r '…' is acceptable as per consensus on meta Running PHP with -r instead of code tags. \$\endgroup\$ Commented Apr 1, 2016 at 13:13
  • \$\begingroup\$ Is this actually writing to disk or just a buffer in memory? \$\endgroup\$ Commented Apr 1, 2016 at 14:33
  • 1
    \$\begingroup\$ @manatwork Oh man! I knew there's always room for improvement, but that much... too bad that function hasn't got shorter name. :D I don't know about the buffer.. I wonder if I should update the answer with that shorter solution. \$\endgroup\$ Commented Apr 1, 2016 at 18:47
  • 2
    \$\begingroup\$ If it's shorter, please do update your answer, go ahead! :) \$\endgroup\$ Commented Apr 1, 2016 at 21:35
  • \$\begingroup\$ Is it allowed to call exec() from php? I realize it is no more in php's "scope". \$\endgroup\$ Commented Apr 2, 2016 at 5:59