Even if it's not part of the PHP core language, it's certainly easy to put
it in an include file. Right now both of the functions I provide at
http://gateway.digitaria.com/~chris/php/first_valid/ simply do a !empty()
check. One function checks a list of variables and the other checks a bunch
of arrays to find the first which has a !empty() value for a given key. It
would take very little time to modify either function to use something other
than !empty().
Sure, but if it´s part of PHP´s functions it´ll be fast,fast,faster.
I´ve various kindw of include´d var-checking functions (checking with variable arguments, checking multi-dim arrays of vars, checking object vars and so on...), I´m sure like you everyone has it´s own worse or better functions...
--
o----------0-¬---------O-·---¬----o---®-----o o O ° .
| http://www.kiffen.de | pRoteçt y0ur bRaín |0 O ° ¤ °
·
0°·³°²'²³-¹'³´³°^°³~³²³°'³²²¨³²^³¹³²°²³`³º³°Þ °
o © ° . ·
| psychedelic experience | gott@kiffen.de | O ° o °
o-¬--o--0-----©-·--O-----o-----0-¤----------o 0 ° · ° . ¤ ·