xp-framework/rfc — Issue #73: Change default implementation of toString() 
Author: thekid
Created: 2011-10-17 15:51:34+00:00
State: closed
Labels: framework, implemented

Scope of Change
====
The default implementation of the toString() method will be changed to
use xp::stringOf() instead of var_export().

Rationale
====
var_export() output has changed in PHP5 toward an increasingly unreadable
form.

Functionality
====
Basically, this is the change to lang.Object:

(Unified diff):

```php
getClassName().'@'.var_export($this, 1);
+ return xp::stringOf($this);
}
?>
```

Security considerations
====
n/a

Speed impact
====
Slower.

Dependencies
====
n/a

Related documents
====
- http://bugs.php.net/bug.php?id=29361
The bug leading to the changes.

- http://derickrethans.nl/varexport_and_classes.php
The fix

- http://xp-framework.net/rfc/contrib/rfc0073.diff
Patch implementing this RFC