Re: [PHP-DEV] execute compressed PHP command-line application

2013-07-25 Thread Ferenc Kovacs
On Thu, Jul 18, 2013 at 10:38 AM, crankypuss fullm...@newsguy.com wrote: I've been using PHP for linux command-line applications. Some are quite large. I've built the code to combine the mainline plus everything it calls into a single file to avoid portability issues with include libraries.

[PHP-DEV] New handler for retrieving properties when object is serialized

2013-07-25 Thread Jakub Zelenka
Hi, I have just sent this PR: https://github.com/php/php-src/pull/397 It's reaction to the comment from nikic in PR: https://github.com/php/php-src/pull/393 The patch is about adding new object handler that is used when object is serialized. Currently this needs to be done using get_properties

[PHP-DEV] Bug #60873: DateTime properties

2013-07-25 Thread Jakub Zelenka
Hi, This is not only about https://bugs.php.net/bug.php?id=60873 :) First of all, I don't think that this bug is a bug. :) It's about accessing undocumented properties that are created as a side effect of calling get_properties DateTime object handler. The properties are probably created to

Re: [PHP-DEV] Adding a time interval to an interval

2013-07-25 Thread Jakub Zelenka
On Mon, Jul 22, 2013 at 8:24 PM, Simon Schick simonsimc...@gmail.comwrote: On Sun, Jul 21, 2013 at 6:14 PM, Jakub Zelenka bu...@php.net wrote: On Tue, Jul 2, 2013 at 8:21 AM, Simon Schick simonsimc...@gmail.com wrote: On Fri, Jun 28, 2013 at 11:20 PM, Derick Rethans der...@php.net wrote:

Re: [PHP-DEV] New handler for retrieving properties when object is serialized

2013-07-25 Thread Stas Malyshev
Hi! It's useful in situation if you only need to change properties for serialization. It's very similar to get_debug_info that is used only in specific situations (print_r...) Isn't __sleep already doing this? -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/

Re: [PHP-DEV] New handler for retrieving properties when object is serialized

2013-07-25 Thread Nikita Popov
On Thu, Jul 25, 2013 at 9:09 PM, Stas Malyshev smalys...@sugarcrm.comwrote: Hi! It's useful in situation if you only need to change properties for serialization. It's very similar to get_debug_info that is used only in specific situations (print_r...) Isn't __sleep already doing this?

Re: [PHP-DEV] New handler for retrieving properties when object is serialized

2013-07-25 Thread Stas Malyshev
Hi! __sleep returns an array of object property *names* to be serialized. Using __sleep you can restrict the set of serialized properties, but the properties still need to exist. You can create those properties when processing __sleep. Nothing requires them to exist before __sleep was called.

Re: [PHP-DEV] New handler for retrieving properties when object is serialized

2013-07-25 Thread Jakub Zelenka
On Thu, Jul 25, 2013 at 8:56 PM, Stas Malyshev smalys...@sugarcrm.comwrote: You can create those properties when processing __sleep. Nothing requires them to exist before __sleep was called. The problem is that properties will exist after __sleep was called. :) There are situations that you

Re: [PHP-DEV] New handler for retrieving properties when object is serialized

2013-07-25 Thread Gustavo Lopes
On 25-07-2013 18:42, Jakub Zelenka wrote: I have just sent this PR: https://github.com/php/php-src/pull/397 It's reaction to the comment from nikic in PR: https://github.com/php/php-src/pull/393 The patch is about adding new object handler that is used when object is serialized. Currently

Re: [PHP-DEV] New handler for retrieving properties when object is serialized

2013-07-25 Thread Johannes Schlüter
On Thu, 2013-07-25 at 21:01 +0100, Jakub Zelenka wrote: On Thu, Jul 25, 2013 at 8:56 PM, Stas Malyshev smalys...@sugarcrm.comwrote: You can create those properties when processing __sleep. Nothing requires them to exist before __sleep was called. The problem is that properties will