php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #31499 Support for including multiple files with a single include call.
Submitted: 2005-01-11 23:21 UTC Modified: 2012-09-23 16:45 UTC
Votes:3
Avg. Score:4.7 ± 0.5
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: daniel dot schierbeck at gmail dot com Assigned:
Status: Wont fix Package: *General Issues
PHP Version: 5.0.3 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
43 + 27 = ?
Subscribe to this entry?

 
 [2005-01-11 23:21 UTC] daniel dot schierbeck at gmail dot com
Description:
------------
It would be a nice feature if more than one file could be included in a single include call. I've read the manual pages, and it doesn't look like it's possible at the moment.

(this of course also goes for include_once, require, and require_once)

Reproduce code:
---------------
// Today
include 'a.php';
include 'b.php';
include 'c.php';

// Tomorrow
include 'a.php', 'b.php', 'c.php';


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-01-18 18:09 UTC] daniel dot schierbeck at gmail dot com
Sooooooo, no comments? Anyone?
 [2005-02-09 16:25 UTC] mirabal at adinet dot com dot uy
well, i have to agree with this one... although it is not very important
 [2012-09-23 16:45 UTC] nikic@php.net
-Status: Open +Status: Wont fix -Package: Feature/Change Request +Package: *General Issues
 [2012-09-23 16:45 UTC] nikic@php.net
Including several files at the same time is needed rather rarely, at least since the rise of autoloading.

Furthermore the proposed syntax has several issues when considering that include is an expression with a return value. What would it return? The return value of the last script? An array of return values? What would foo(include 'a', 'b') mean? Would it be foo((include 'a', 'b') or rather foo((include 'a'), 'b')? Etc.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 00:01:30 2024 UTC