Case sensitivity of require_once

From: Date: Mon, 19 Jul 2004 08:56:02 +0000
Subject: Case sensitivity of require_once
Groups: php.internals 
Request: Send a blank email to internals+get-11339@lists.php.net to get a copy of this message
File a.php is required twice with this code on Windows: <?php require_once "a.php"; require_once "A.php"; ?> Should I document this behavior or should patch similar to this be applied? Index: zend_execute.c =================================================================== RCS file: /repository/Zend/Attic/zend_execute.c,v retrieving revision 1.316.2.38 diff -u -r1.316.2.38 zend_execute.c --- zend_execute.c 12 Jul 2004 17:47:32 -0000 1.316.2.38 +++ zend_execute.c 19 Jul 2004 08:48:44 -0000 @@ -2148,6 +2148,10 @@ file_handle.opened_path = estrndup(inc_filename->value.str.val, inc_filename->value.str.len); } +#ifdef ZEND_WIN32 + zend_str_tolower(file_handle.opened_path, strlen(file_handle.opened_path)); +#endif + if (zend_hash_add(&EG(included_files), file_handle.opened_path, strlen(file_handle.opened_path)+1, (void *)&dummy, sizeof(int), NULL)==SUCCESS) { new_op_array = zend_compile_file(&file_handle, (EX(opline)->op2.u.constant.value.lval==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE) TSRMLS_CC); zend_destroy_file_handle(&file_handle TSRMLS_CC); -- Jakub Vrana

« previous php.internals (#11339) next »