php.net |  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
Votes:3
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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: lunter at interia dot pl
New email:
PHP Version: OS:

 

 [2005-10-20 14:14 UTC] lunter at interia dot pl
Description:
------------
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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-10-20 14:19 UTC] tony2001@php.net
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] derick@php.net
This will be addressed in PHP 6 only.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 15:01:29 2024 UTC