ID: 36087
Updated by: [EMAIL PROTECTED]
Reported By: bob at xbob dot nl
-Status: Open
+Status: Bogus
Bug Type: Filesystem function related
Operating System: linux
PHP Version: 5.1.2
New Comment:
Use "View source" to see what your script *really* produces.
Previous Comments:
------------------------------------------------------------------------
[2006-01-19 16:00:23] bob at xbob dot nl
Description:
------------
when file() is reading a rule with '<?' in it, it will fail.
the next rule is in place of the '<?' rule and index key remains. The
next rule's index is copmletly gone. see code example for more
information.
Reproduce code:
---------------
--- file 1 --- class.A.php --- file to read ---
<?php
class A {
protected $var;
}
?>
--- file 2 --- run.php --- file to run ---
<?php
echo '<pre>';
var_dump(file('class.A.php'));
echo '</pre>';
?>
Expected result:
----------------
array(5) {
[0]=>
string(3) "<?
"
[1]=>
string(10) "class A {
"
[2]=>
string(16) "protected $var;
"
[3]=>
string(2) "}
"
[4]=>
string(2) "?>"
}
Actual result:
--------------
array(5) {
[0]=>
string(6) "
string(10) "class A {
"
[2]=>
string(16) "protected $var;
"
[3]=>
string(2) "}
"
[4]=>
string(2) "?>"
}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36087&edit=1