|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-01-19 16:09 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 12 03:00:01 2025 UTC |
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) "?>" }