Re: [PHP-DEV] [PROPOSAL] add a leading backslash to classname when serializing/var_exporting

2013-04-09 Thread Marco Pivetta
For consistency, in strings we should already be using the FQCN implicitly. Therefore output of serialization and var_export should not need the leading backslash. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 9 April 2013 06:38, Madara Uchiha

Re: [PHP-DEV] [RFC] Class instances counter

2013-04-09 Thread Joe Watkins
On 04/09/2013 01:53 AM, David Muir wrote: On 09/04/13 10:29, Joe Watkins wrote: On 04/08/2013 09:07 PM, Madara Uchiha wrote: I'm with Morrison, I see no actual use for this. It's cool, but what would you use it for? On Mon, Apr 8, 2013 at 10:47 PM, Levi Morrison morrison.l...@gmail.com

Re: [PHP-DEV] [PROPOSAL] add a leading backslash to classname when serializing/var_exporting

2013-04-09 Thread Johannes Schlüter
On Tue, 2013-04-09 at 11:28 +0800, Laruence wrote: Hey: bug is described at #64554 I proposal to add a leading backslash to all classnames (not only ns names, since no harm, consistent and make sense) when doing serialize, var_export etc. what do you think? This breaks

[PHP-DEV] [RFC] Class instances counter

2013-04-09 Thread Frank Liepert
Hello internals, I updated the RFC (https://wiki.php.net/rfc/instance_counter): - added support for a class name, so the function can be narrowed down to a specific class - added use case -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit:

Re: [PHP-DEV] [RFC] Class instances counter

2013-04-09 Thread Laruence
if a class need that, it can implement a interface like instance_counter, which will simply can implement like: class A { public static $instance_counter = 0; public function __construct() { self::$instance_counter++; } public function __destruct() { self::$instance_counter--; };

Re: [PHP-DEV] [RFC] Class instances counter

2013-04-09 Thread Joe Watkins
On 04/09/2013 11:23 AM, Laruence wrote: if a class need that, it can implement a interface like instance_counter, which will simply can implement like: class A { public static $instance_counter = 0; public function __construct() { self::$instance_counter++; } public function

Re: [PHP-DEV] [PROPOSAL] add a leading backslash to classname when serializing/var_exporting

2013-04-09 Thread Steve Clay
On 4/8/13 11:28 PM, Laruence wrote: bug is described at #64554 - https://bugs.php.net/bug.php?id=64554 I proposal to add a leading backslash to all classnames (not only ns names, since no harm, consistent and make sense) when doing serialize, var_export etc. Short term: Add note

Re: [PHP-DEV] [PROPOSAL] add a leading backslash to classname when serializing/var_exporting

2013-04-09 Thread Yasuo Ohgaki
2013/4/9 Laruence larue...@php.net I proposal to add a leading backslash to all classnames (not only ns names, since no harm, consistent and make sense) when doing serialize, var_export etc. Additional bool parameter for it would be nice for var_export/serialize. For var_dump, I wish to have

Re: [PHP-DEV] [PROPOSAL] add a leading backslash to classname when serializing/var_exporting

2013-04-09 Thread Stas Malyshev
Hi! I proposal to add a leading backslash to all classnames (not only ns names, since no harm, consistent and make sense) when doing serialize, var_export etc. I'm not sure what this has to do with serialize. For var_export it may be useful but the use case looks kind of limited. I can't

[PHP-DEV] DateTime for #53437 5.3/5.4

2013-04-09 Thread Anatol Belski
Hi, I just wanted to address again these two patches to be applied in 5.3/5.4 http://git.php.net/?p=php-src.git;a=commitdiff;h=0ee71557ffd285552659b6aa37ea236e3bad493f http://git.php.net/?p=php-src.git;a=commitdiff;h=fa3fc711d3fb54bf1746138ffcf7f46426921204 Both are in 5.5 already for some

Re: [PHP-DEV] [PROPOSAL] add a leading backslash to classname when serializing/var_exporting

2013-04-09 Thread Madara Uchiha
Well, why would you need to serialize an object in one version of PHP, and unserialize it in another? On Tue, Apr 9, 2013 at 11:08 PM, Stas Malyshev smalys...@sugarcrm.com wrote: Hi! I proposal to add a leading backslash to all classnames (not only ns names, since no harm, consistent and

Re: [PHP-DEV] [PROPOSAL] add a leading backslash to classname when serializing/var_exporting

2013-04-09 Thread Rasmus Lerdorf
On 04/09/2013 01:23 PM, Madara Uchiha wrote: Well, why would you need to serialize an object in one version of PHP, and unserialize it in another? Unfortunately people do that all the time. They store serialized versions of stuff in databases and other backends and even send it across the wire