Bug #75295 [Opn->Nab]: include read data outside parentheses
| From: | requinix@php.net | Date: | Sat, 30 Sep 2017 17:48:41 +0000 |
| Subject: | Bug #75295 [Opn->Nab]: include read data outside parentheses | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-211479@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75295&edit=1
ID: 75295
Updated by: requinix@php.net
Reported by: brilicru at yandex dot ru
Summary: include read data outside parentheses
-Status: Open
+Status: Not a bug
Type: Bug
Package: *General Issues
Operating System: Windows 10 x64, Ubuntu x64
PHP Version: 7.1.10
Block user comment: N
Private report: N
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
> Because include is a special language construct, parentheses are not needed
> around its argument.
http://php.net/manual/en/function.include.php
See what happens in example #4.
Previous Comments:
------------------------------------------------------------------------
[2017-09-30 17:44:29] brilicru at yandex dot ru
incorrect package.
------------------------------------------------------------------------
[2017-09-30 15:52:15] brilicru at yandex dot ru
Description:
------------
A strange work include, which does not stop reading data even outside parentheses.
Test script:
---------------
<?php
$filename = './include.php';
file_exists($filename) or file_put_contents($filename, $filename);
var_dump(include($filename).''); //correct
var_dump(include($filename).' ololo'); //warning
Expected result:
----------------
include.phpint(1)
include.phpint(1) ololo
Actual result:
--------------
include.phpint(1)
PHP Warning: include(./include.php ololo): failed to open stream: No such file or directory in
D:\script.php on line 5
Warning: include(./include.php ololo): failed to open stream: No such file or directory in
D:\script.php on line 5
PHP Warning: include(): Failed opening './include.php ololo' for inclusion
(include_path='.') in D:\script.php on line 5
Warning: include(): Failed opening './include.php ololo' for inclusion
(include_path='.') in D:\script.php on line 5
bool(false)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75295&edit=1