Re: 1 last error to fix before the application is done!
| From: | Colin Guthrie | Date: | Wed, 15 Oct 2008 09:38:40 +0000 |
| Subject: | Re: 1 last error to fix before the application is done! | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-281941@lists.php.net to get a copy of this message | ||
Jochem Maas wrote:
Colin Guthrie schreef:Well, yes, that's how I do it in my apps too, but in internally in that function you may want to use the empty() call :) I agree that when checking for values other than boolean and such you need to do more checks but quite often in practical coding, I find that using empty cuts down quite a lot on function call overhead and double statements. Everyone's different tho' so each to their own way :) Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributor [http://www.mandriva.com/] PulseAudio Hacker [http://www.pulseaudio.org/] Trac Hacker [http://trac.edgewall.org/]if(!empty($_SESSION['userInfo']['loggedin'])) {if (Sess::userLoggedIn()) { /* ... :-) */ }