note 22715 deleted from function.include-once by sniper
| From: | sniper@php.net | Date: | Tue, 04 Nov 2003 00:43:48 +0000 |
| Subject: | note 22715 deleted from function.include-once by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-59806@lists.php.net to get a copy of this message | ||
Note Submitter: f.vulto@re-base.com
----
As stated in the previous contribution, both 'include_once' and 'require_once'
do a case sensitive job on Win32, although the Win32 filesystem itself isn't case sensitive.
This may cause you a 'Cannot redeclare class' error when a class definition file gets
included twice incorrectly. For example, with a file 'test.class.php' containing:
<?php
class CTest {}
?>
executed by the file 'require.php':
<?php
require_once 'test.class.php';
require_once 'Test.class.php';
?>
you would receive the error:
Cannot redeclare class ctest in Test.class.php on line 2
Tested with PHP v4.2.1 on Windows 2000.