Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
Funky_
on Jan 5, 2008
|
parent
|
context
|
favorite
| on:
PHP best practices - The dos and don'ts
The dos and don'ts of UI design should be their first project. :)
ks
on Jan 5, 2008
[–]
And there are several don'ts in the slides too. Never give variables the same name as functions or other parts of the language.
They named their variables $int, $string and $bool...
randallsquared
on Jan 5, 2008
|
parent
[–]
In PHP it hardly matters, since variables have their own namespace. PHP is a lisp2.
SwellJoe
on Jan 6, 2008
|
root
|
parent
[–]
It might matter to the human reading the code.
randallsquared
on Jan 6, 2008
|
root
|
parent
[–]
Well, sure, but that cuts both ways. :) It's convenient to have names like $bool and $int for didactic purposes, at least.
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: