|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34930 include/require sugestion
Submitted: 2005-10-20 14:14 UTC Modified: 2005-10-20 14:45 UTC
Avg. Score:3.0 ± 1.4
Reproduced:3 of 3 (100.0%)
Same Version:1 (33.3%)
Same OS:2 (66.7%)
From: lunter at interia dot pl Assigned:
Status: Wont fix Package: Unknown/Other Function
PHP Version: 5.1.0RC3 OS: all
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: lunter at interia dot pl
New email:
PHP Version: OS:


 [2005-10-20 14:14 UTC] lunter at interia dot pl
PHP 5.1 suggestion:

include ( string filename )
include_once ( string filename )
require ( string filename )
require_once( string filename )

If you include/require file codding with UTF-8, you include/require to inside output data chr(239).chr(187).chr(191) (3-byte UFT-8 header from incluging/requiring file).
It is no good. It will be good to add two paramerters:

include ( string filename, int start [, int length] )
include_once ( string filename, int start [, int length] )
require ( string filename, int start [, int length] )
require_once( string filename, int start [, int length] )

expamle for UTF-8:

include ( 'file-utf-8.php', 3 )
include_once ( 'file-utf-8.php', 3 )
require ( 'file-utf-8.php', 3 )
require_once( 'file-utf-8.php', 3 )

Reproduce code:
Read description.

Expected result:
Read description.

Actual result:
Read description.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-10-20 14:19 UTC]
Remove BOM by yourself.
 [2005-10-20 14:22 UTC] lunter at interia dot pl
Removing BOM by myself is very uncomfortable, becouse text editor add it every time when I edit PHP file.
 [2005-10-20 14:45 UTC]
This will be addressed in PHP 6 only.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 15 11:01:30 2024 UTC