On 19 September 2015 00:04:46 BST, "François Laupretre" <franc...@php.net> 
wrote:
>So, as everyone seems to have exposed his arguments, I think we need an
>RFC and a patch now. Unless anyone volunteers, I'll write the patch.
>Who 
>can write the RFC ? Robert ?

I may have given the impression of stubbornness in this discussion, but I have 
listened to people's arguments, and am considering an RFC proposing two 
functions:

- a syntactic sugar for array_key_exists and property_exists, maybe called 
hasitem(); hasitem($foo['bar']) would check $foo has the item 'bar', but 
hasitem($foo) would be an error

- a function for checking if a variable is in the current symbol table, maybe 
called variable_exists to match class_exists etc; it would take a string naming 
the variable, e.g. variable_exists('foo'); I am worried that this will be 
abused, and tempted to give it a "scarier" name

Importantly, neither of these should be presented as "fixing isset", since I 
have seen absolutely zero evidence that it is broken; the names and behaviours 
are designed to highlight that these are functions to be used for specific 
purposes.

Regards,
-- 
Rowan Collins
[IMSoP]


-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to