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 zval. So you end up allocating / separating zvals and stuff like that. And I'm always confused just which exactly of the 50 different ways to cast a zval one should use in a particular situation.
What I'd like to propose is a set of two new functions, which castingly get an integer or a float from a zval. The functions could look like this: long zval_get_long_with_cast(zval *value) double zval_get_double_with_cast(zval *value) What do you think? Nikita