#28300 [NEW]: inconsistent __autoload parameret pass with stream_wrapper_register
| From: | buri dot peter at trilogic dot hu | Date: | Thu, 06 May 2004 12:10:47 +0000 |
| Subject: | #28300 [NEW]: inconsistent __autoload parameret pass with stream_wrapper_register | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-59296@lists.php.net to get a copy of this message | ||
From: buri dot peter at trilogic dot hu
Operating system: Windows XP
PHP version: 5CVS-2004-05-06 (dev)
PHP Bug Type: *General Issues
Bug description: inconsistent __autoload parameret pass with stream_wrapper_register
Description:
------------
stream_wrapper_register( 'var', 'VariableStream' );
__autoload get 'variablestream' as parameter [ in lower case ]
but in other situation:
new VariableStream();
__autoload get 'VariableStream' as parameter.
this is inconsistent.
I prefer the case sensitive way. :)
Reproduce code:
---------------
VariableStream.class.php:
<?php
class VariableStream {
function __call() {}
}
?>
VariableStream2.class.php:
<?php
class VariableStream2 {
function __call() {}
}
?>
index.php:
<?php
function __autoload( $class ) {
echo $class, "\n";
include_once( $class . '.class.php' );
}
stream_wrapper_register( 'var', 'VariableStream' );
new VariableStream2();
?>
Expected result:
----------------
VariableStream
VariableStream2
Actual result:
--------------
variablestream
VariableStream2
--
Edit bug report at http://bugs.php.net/?id=28300&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28300&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28300&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=28300&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=28300&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=28300&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=28300&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=28300&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=28300&r=support
Expected behavior: http://bugs.php.net/fix.php?id=28300&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=28300&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=28300&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=28300&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28300&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=28300&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=28300&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=28300&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28300&r=float