Re: Ternary operator enhancement for fluent code

From: Date: Tue, 04 Jul 2000 23:45:29 +0000
Subject: Re: Ternary operator enhancement for fluent code
References: 1 2 3 4  Groups: php.dev 
Request: Send a blank email to php-dev+get-23516@lists.php.net to get a copy of this message
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 ° · ° . ¤ ·

« previous php.dev (#23516) next »