From:             melnikow at hotbox dot ru
Operating system: WinXP SP2
PHP version:      5.0.1
PHP Bug Type:     Feature/Change Request
Bug description:  __toSleep() wont work

Description:
------------
The new __toString() magic method wont work

Reproduce code:
---------------
The new __toString() magic method allows you to overload the object to
string conversion:
<?php 
class Foo { 
   function __toString() { 
       return "What ever"; 
   } 
} 

$obj = Foo; 
$str = (string) $obj; // call __toString() 
echo $obj; // call __toString() 
?> 

Expected result:
----------------
What ever

Actual result:
--------------
Object#n

-- 
Edit bug report at http://bugs.php.net/?id=30421&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30421&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30421&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30421&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=30421&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=30421&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=30421&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=30421&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=30421&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=30421&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=30421&r=notwrong
Not enough info:             http://bugs.php.net/fix.php?id=30421&r=notenoughinfo
Submitted twice:             http://bugs.php.net/fix.php?id=30421&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=30421&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30421&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=30421&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=30421&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=30421&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30421&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30421&r=mysqlcfg

Reply via email to