Re:What I Like About PHP
by arenaninja on Tuesday December 09, 2014 @08:19PM
(#8727101)
Conversely, there's a long list of languages where variables would not be local by default
[ Parent
| on HN ]
Insofar as there is a ridiculously long list of languages nobody has ever heard of, I guess this is true. But it's not true if you're comparing it to languages that are actually used in modern programming. Even if you're considering languages as obscure as, say, Standard ML, you'll still not find many that have a default global scope for variables inside functions. There's pretty much JavaScript, Perl, Fortran and Cobol. I can't think of any others that are even worth mentioning nowadays.