Hello Andi,

>>4) php 5.1 is aiming to increase performance and security => ifsetor
>>
>>   It is nice and easy and fast...only it's name. Well guys come on that's
>>   the stupiest reason to reject. The name is selfspeaking, you're all only
>>   not so used to its name as you are with foreach for now.

AG> It wasn't only the name but also the implementation. Actually, I was hoping
AG> that the input filter API would resolve this issue once and for all even if
AG> in a bit of a different (and IMO better) way.

Input filtering does not solve the problem ifsetor() is designed to
solve.  It tackles a small part of it, but ifsetor() is a general purpose
construct that is used for $_GET, $_POST, as well as ANY OTHER array
element or variable in your script.

  $x = ifsetor($somearray[$foo][$bar], 0);

Is a lot cleaner than:

  $x = isset($somearray[$foo][$bar]) ? $somearray[$foo][$bar] : 0;

--
ifsetor()'s purpose is simple and clear:

To return a variable value if it exists or a default value if it does
not exist WITHOUT generating any error.

Thanks.

-- 
Best regards,
 Jason                            mailto:[EMAIL PROTECTED]

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

Reply via email to