Re: Functions for getting long / double from zval with casts

From: Date: Mon, 19 Nov 2012 04:09:04 +0000
Subject: Re: Functions for getting long / double from zval with casts
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-63965@lists.php.net to get a copy of this message
Hi! > Hi internals! > > It happens quite often that you need to extract an integer from a zval and > you also want it to work for integers in strings, etc. In order to do so > you currently have to cast the zval to integer. This is always rather > complicated because you often don't want to actually change the passed Where it happens quite often outside of function arguments (where it is covered by parameter parsing APIs)? Should it handle all conversions the engine performs or only from string? We could probably expose zendi_convert_to_long() and similar ones, but I'm not sure what the use case for these would be. Could you give more background on this? -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227

« previous php.internals (#63965) next »