Re: get_property_ptr_ptr, current usage and plans

From: Date: Sun, 07 Mar 2004 22:33:10 +0000
Subject: Re: get_property_ptr_ptr, current usage and plans
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-8434@lists.php.net to get a copy of this message
Hello Pierre-Alain, Saturday, March 6, 2004, 2:27:29 PM, you wrote: > Hello, > What is the usage of get_property_ptr_ptr by ZE2? > For what I read, it is used by the post/pre increment (++,.= and > friends) and in zend_binary_assign_op_obj_helper. I do not know > where the later is used. > What I would like is to know when I am in a pre/post increment > operator and allow some invalid values. For example, in pecl/date, > date::day must be between 1 and 31 (or 28/29). $date->day = 32; > should not be valid, but "$date->day= 31; $date->day++;" is valid. > The problem is to be sure that I'm in a pre/post context. And then > do some additionals operations. For now I hacked the get/set > property under certain conditions, but that also allows invalid > values set if the current value is the min or max value. > I know we do not want to add some kind of operators support, but I'm > wondering if it is possible and if that will not be broken later (ie > this entry is used for something else). > Any comments, thoughts or ideas? such things should be solved by proxies. Those are actually ze2 objects with with only get/set handlers and which actually work on the original object. -- Best regards, Marcus mailto:helly@php.net

« previous php.internals (#8434) next »