PHP Bugs  
php.net | support | documentation | report a bug | advanced search | search howto | statistics | login

go to bug id or search bugs for  

Bug #18630 require_once is case sensitive
Submitted:29 Jul 2002 2:53pm UTC Modified: 1 Nov 2002 2:43am UTC
From:dparks at verinform dot com Assigned to:
Status:Closed Category:Documentation problem
Version:4.2.1 OS:Windows NT 4.0
View/Vote Developer Edit Submission

Welcome! If you don't have a SVN 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.
SVN Username: SVN Password:
Quick Fix:
Status: Assign to:
Category:
Summary:
From: dparks at verinform dot com
New email:
Version: OS:
New/Additional Comment:

[29 Jul 2002 2:53pm UTC] dparks at verinform dot com
require_once('bah.php');
require_once('BAH.php');

Will "require" bah.php twice. I realize this makes sense on a case
sensitive file system, but on Windows (NTFS, I guess) or Mac OS X (HFS+)
it can be a surprise. Users should really use case consistently, but
sometimes a search and replace will change case or something (that's
what happened to me).

I'm not sure this behavior should be changed; it would be nice if it was
documented, though.

Sorry, I can't confirm this happens in a newer version of PHP!
[29 Jul 2002 4:58pm UTC] goba@php.net
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/. In case this was a documentation 
problem, the fix will show up soon at http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.
[1 Nov 2002 2:43am UTC] alan_k@php.net
this also affects 4.2.2 (and probably 4.2.3)
[9 Mar 2003 11:01pm UTC] csaba at alum dot mit dot edu
This is documented quite clearly, but this behaviour on Windows is just
SO WRONG.

I vote (for all it counts) that the behaviour be changed.

Csaba Gabor from New York
(PHP 4.3 on Win 2K / Apache 2.0.43)

RSS feed | show source 

PHP Copyright © 2001-2009 The PHP Group
All rights reserved.
Last updated: Sat Nov 21 10:30:49 2009 UTC