Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #4088
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.cablespeedmi.com!news.cablespeedmi.com.POSTED!not-for-mail |
|---|---|
| NNTP-Posting-Date | Mon, 19 Dec 2011 09:09:39 -0600 |
| Date | Mon, 19 Dec 2011 10:09:39 -0500 |
| From | bill <nobody@spamcop.net> |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 |
| MIME-Version | 1.0 |
| Newsgroups | comp.lang.php |
| Subject | empty - not empty() |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Message-ID | <iNGdnbO2--gpznLTnZ2dnUVZ_hCdnZ2d@cablespeedmi.com> (permalink) |
| Lines | 24 |
| X-Usenet-Provider | http://www.giganews.com |
| NNTP-Posting-Host | 24.56.193.205 |
| X-Trace | sv3-c3ze1jL2db9EyUv4AdMYRF8VNoq4d2rydNAPeRqWM4zVijTvcXH/iqcNGbQjYUTaSlgBqslPJm+Zaic!gIQe0HO9IJuR/xNhOfaZw4cYO2763lWxzBgJj8E0ZCJMMP3rrQNQeE5RsDZPFmN9kiApiT6zKbi7!hW70UQt2IFHYn1yBVu/IoSryeQ== |
| X-Abuse-and-DMCA-Info | Please be sure to forward a copy of ALL headers |
| X-Abuse-and-DMCA-Info | Otherwise we will be unable to process your complaint properly |
| X-Postfilter | 1.3.40 |
| X-Original-Bytes | 1712 |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.php:4088 |
Show key headers only | View raw
searching the manual gives lots of hits, none of which appear
relevant (at least by the title).
I had the following code in a scheduling class:
if ($ptNum == "empty") {
$ptNum = 0;
$status= "e";
}
I pass the string "empty" to the function as a patient number if
we are creating an empty appointment slot.
now, this fails because with a patient number of 0 the if returns
true.
I am aware of the function empty() that would work like that, but
do not understand why the compare fails with the constant, "empty."
I fixed the function by making it a strict compare, but would
like to know why the regular compare is true with the numeric
value of zero.
bill
Back to comp.lang.php | Previous | Next — Next in thread | Find similar | Unroll thread
empty - not empty() bill <nobody@spamcop.net> - 2011-12-19 10:09 -0500
Re: empty - not empty() "J.O. Aho" <user@example.net> - 2011-12-19 18:48 +0100
Re: empty - not empty() Chuck Anderson <cycletourist@invalid.invalid> - 2011-12-19 18:14 -0700
Re: empty - not empty() bill <nobody@spamcop.net> - 2011-12-20 08:14 -0500
Re: empty - not empty() "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2011-12-20 17:40 +0100
Re: empty - not empty() bill <nobody@spamcop.net> - 2011-12-20 18:44 -0500
csiph-web