inconsistent __autoload parameret pass with stream_wrapper_register
| Bug #28300 | inconsistent __autoload parameret pass with stream_wrapper_register | ||||
|---|---|---|---|---|---|
| Submitted: | 2004-05-06 14:08 UTC | Modified: | 2004-05-06 16:30 UTC | ||
| From: | buri dot peter at trilogic dot hu | Assigned: | |||
| Status: | Closed | Package: | *General Issues | ||
| PHP Version: | 5CVS-2004-05-06 (dev) | OS: | Windows XP | ||
| Private report: | No | CVE-ID: | None | ||
[2004-05-06 14:08 UTC] buri dot peter at trilogic dot hu
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
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2004-05-06 16:30 UTC] pollita@php.net