Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Only <code>eval('?&gt;' . file_get_contents('external.php'));</code> variant is correct replacement for include.</p> <p>See tests:</p> <pre><code>&lt;?php $includes = array( 'some text', '&lt;?php print "some text"; ?&gt;', '&lt;?php print "some text";', 'some text&lt;?php', 'some text&lt;?php ', 'some text&lt;?php;', 'some text&lt;?php ?&gt;', '&lt;?php ?&gt;some text', ); $tempFile = tempnam('/tmp', 'test_'); print "\r\n" . "Include:" . "\r\n"; foreach ($includes as $include) { file_put_contents($tempFile, $include); var_dump(include $tempFile); } unlink($tempFile); print "\r\n" . "Eval 1:" . "\r\n"; foreach ($includes as $include) var_dump(eval('?&gt;' . $include . '&lt;?php ')); print "\r\n" . "Eval 2:" . "\r\n"; foreach ($includes as $include) var_dump(eval('?&gt;' . $include)); print "\r\n" . "Eval 3:" . "\r\n"; foreach ($includes as $include) var_dump(eval('?&gt;' . $include . '&lt;?php;')); </code></pre> <p>Output:</p> <pre><code>Include: some textint(1) some textint(1) some textint(1) some text&lt;?phpint(1) some textint(1) some text&lt;?php;int(1) some textint(1) some textint(1) Eval 1: some textNULL some textNULL bool(false) some text&lt;?phpNULL bool(false) some text&lt;?php;NULL some textNULL some textNULL Eval 2: some textNULL some textNULL some textNULL some text&lt;?phpNULL some textNULL some text&lt;?php;NULL some textNULL some textNULL Eval 3: some text&lt;?php;NULL some text&lt;?php;NULL bool(false) some text&lt;?php&lt;?php;NULL bool(false) some text&lt;?php;&lt;?php;NULL some text&lt;?php;NULL some text&lt;?php;NULL </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload