Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
adambard
on Aug 10, 2011
|
parent
|
context
|
favorite
| on:
I Like PHP
Actually, here's a more insane version:
$x = 0; if(!empty($x)){ echo '"0" is empty'; }
pornel
on Aug 10, 2011
[–]
empty() is an alias for 'isset($x) && $x', so this example is semantically identical to the previous one (since $x is always set). PHP doesn't have any special concept of "emptyness" to check for.
Consider applying for YC's Spring batch! Applications are open till Feb 11.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: