Req #17439 [Opn->Csd]: __toString support
| From: | terrafrost@php.net | Date: | Wed, 26 May 2010 21:09:14 +0000 |
| Subject: | Req #17439 [Opn->Csd]: __toString support | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-3806@lists.php.net to get a copy of this message | ||
Edit report at http://pear.php.net/bugs/bug.php?id=17439&edit=1
ID: 17439
Updated by: terrafrost@php.net
Reported By: pear at marcuscobden dot co dot uk
Summary: __toString support
-Status: Open
+Status: Closed
Type: Feature/Change Request
Package: Math_BigInteger
Package Version: 1.0.0RC3
PHP Version: 5.3.1
-Assigned To:
+Assigned To: terrafrost
Roadmap Versions:
New Comment:
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: terrafrost
Thank you for your bug report. This issue has been fixed
in the latest released version of the package, which you can download
at
http://pear.php.net/get/
Previous Comments:
------------------------------------------------------------------------
[2010-05-26 08:41:23] terrafrost
The most recent version of this code (which has had __toString for some
time) isn't currently available at pear.php.net. It's available here:
http://phpseclib.cvs.sourceforge.net/viewvc/*checkout*/phpseclib/phpseclib/Math/BigInteger.php
I'll try to update the pear SVN and make a release tomorrow. I'll
close this report then.
------------------------------------------------------------------------
[2010-05-26 08:35:48] lethargy
Description:
------------
It'd be nice to add the __toString magic method for easy string
conversion.
Test script:
---------------
<?php
require 'Math/BigInteger.php';
$foo = new Math_BigInteger(1234);
echo $foo->toString();
echo "\n";
echo $foo;
Expected result:
----------------
1234
1234
Actual result:
--------------
1234
PHP Catchable fatal error: Object of class Math_BigInteger could not
be converted to string in ...
------------------------------------------------------------------------
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=17439&edit=1