14
votes
1answer
606 views

Dollar Sign Blues: Javascript and PHP

I grew up programming C++ and Java where everything was safe and beautiful. Compilers made sure to keep me in check if I ever strayed. Of course, everyone did a little Perl in college, but I didn't ...
5
votes
3answers
879 views

Omit terminating semicolon in a tag - a good idea?

It's possible to omit the terminating semicolon in a tag. Example: <table> <th><td>Name</td><td>Email</td> <? foreach ($receivers as $receiver): ?> ...
5
votes
2answers
3k views

Why do PHP variables need to be preceded with a dollar sign?

I understand that all PHP variables need to be preceded by a dollar sign (e.g. $someValue = 1), but why is this the case? Why was this design choice made? The reason I ask is my girlfriend asked why ...
10
votes
10answers
2k views

How should I pronounce the :: and -> in PHP? [closed]

When I read these lines aloud to someone: $controller->process(); UserManager::getInstance(); How should the -> and :: be pronounced? Reading the characters themselves in cumbersome and I ...
6
votes
3answers
1k views

What are the most common programming mistakes PHP programmers make in Java?

I am more practiced in PHP than in Java, and when I use Java I find myself looking at it from a PHP perspective. This can cause trouble, so I'd like to know, what are the most common programming ...