4 ms·
This is a really great effort, but I noticed a handful of areas where the PHP example was off. I wonder if people with more experience with the other languages
by notJim 15y ago
This is a really great effort, but I noticed a handful of areas where the PHP example was off. I wonder if people with more experience with the other languages noticed the same thing for their language.
Some examples:
Null test:
$var === null // omitted
isset($var) // actually checks if $var exists and is not null (apparently--
I actually didn't know about the not null part)
Undefined variable access: it's a notice. Many people consider it best practice in PHP to treat notices as error, because things like this are notices.
Add time duration
strtotime('+10 minutes') is more typical than the objects
Array out of bounds behavior again issues a notice.
- MattBearman 15y agoI noticed that block statements were missing from PHP, eg: using if(): ... endif; etc. instead of if(){ ... }