#26762 [Opn]: unserialize() produces lowercase classnames

From: Date: Thu, 01 Jan 2004 23:24:40 +0000
Subject: #26762 [Opn]: unserialize() produces lowercase classnames
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-52657@lists.php.net to get a copy of this message
ID: 26762 User updated by: mail at alexanderklein dot de Reported By: mail at alexanderklein dot de Status: Open Bug Type: Class/Object related Operating System: Linux & Win32 PHP Version: 5.0.0b3 (beta3) New Comment: A short sample script STEP One: function __autoload($sClass) { echo $sClass."<br>"; } ini_set( 'unserialize_callback_func', '__autoload' ); class myTestWithUpper { public $test; protected function __sleep() { return array('test'); } } file_put_contents( "./test.dat", serialize( new myTestWithUpper() ) ); STEP Two: unserialize( file_get_contents ("./test.dat") ); Previous Comments: ------------------------------------------------------------------------ [2004-01-01 18:04:25] mail at alexanderklein dot de Description: ------------ I use the __autoload($sClass) feature, and the $sClass names are always transmitted as is. With upper and lower characters. But when i cache a class with serialize and try to unserialize, the $sClass names are only lowercase. System 1 System Windows NT 5.1 Build Date Jan 1 2004 16:06:44 Server API CGI/FastCGI PHP API 20031224 PHP Extension 20020429 Zend Extension 90021012 System 2 System Linux * 2.4.18 #1 SMP i686 Build Date Dec 23 2003 04:48:50 Server API Apache Virtual Directory Support disabled PHP API 20031103 PHP Extension 20020429 Zend Extension 90021012 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=26762&edit=1

« previous php.bugs (#52657) next »