Re: checking the return value of member function with empty

From: Date: Sun, 10 Aug 2003 06:46:42 +0000
Subject: Re: checking the return value of member function with empty
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-159019@lists.php.net to get a copy of this message
Count the number of ('s and )'s, or get a text editor which can help you balance them out in some way:
   1      2               3               321
if (!empty($this->GetParam('someparameter'))) { // foo }
This *SHOULD* be syntactically correct, but php doesn't think so. Should I file a bug on this one? Oh yeah, normal information about running environment. PHP version 4.3.2
You file a bug to whoever wrote the code :P Seriously, find a text editor that highlights or somehow assists you with matching up your braces... BBEdit (mac) beeps and/or flashes the screen when you screw up, and when you double-click on a brace, it highlights all the code all the way up or down to the matching brace at the other end. Crimson editor (PC) underlines the matching brace when you highlight it. If all else fails, count :) Justin

« previous php.general (#159019) next »