Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
btilly
on May 27, 2011
|
parent
|
context
|
favorite
| on:
These are things in PHP which make me sad
$foo++ isn't an exception. It has documented behavior on strings. That is sometimes very useful.
rjh29
on May 29, 2011
[–]
I meant it's an exception because it does not throw a warning, even though you are treating a string as a number. (This is contrary to $foo = $foo + 1). The DWIM string auto-increment doesn't even kick in unless the variable matches /^[a-z]/i.
Consider applying for YC's Fall 2026 batch!
Applications
are open till July 27.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: