|  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
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
Have you experienced this issue?
Rate the importance of this bug to you:

 [2005-01-11 23:21 UTC] daniel dot schierbeck at gmail dot com
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';


Add a Patch

Pull Requests

Add a Pull Request


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]
-Status: Open +Status: Wont fix -Package: Feature/Change Request +Package: *General Issues
 [2012-09-23 16:45 UTC]
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-2021 The PHP Group
All rights reserved.
Last updated: Sun Oct 24 14:03:35 2021 UTC