Skip to content

Instantly share code, notes, and snippets.

@videlalvaro
Created March 11, 2012 09:55
Show Gist options
  • Select an option

  • Save videlalvaro/2015816 to your computer and use it in GitHub Desktop.

Select an option

Save videlalvaro/2015816 to your computer and use it in GitHub Desktop.
some empty file.
<?php
error_reporting(E_ALL ^ E_WARNING);
exec('ulimit -n', $output);
$fds = array();
for ($i = 0; $i < (int) $output[0]; $i++) {
$fds[] = @fopen('./require_test.php', 'r');
}
require('./lib.php');
@videlalvaro

Copy link
Copy Markdown
Author

Try this script like this:

php require_test.php

Then try also displaying warnings to see the actual errors. The question is why an error that might cause a fatal error is flagged as a Warning in PHP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment