It's different because I, as a Perl programmer, don't have to worry about the next function name I choose colliding with any of over 3000 built-ins or any function defined in any file I might ever want to include.
Don't PHP classes solve exactly that problem? For example:
<?php class foo { function hello() { print "hello world\n"; } } class bar { function hello() { print "greetings planetary body\n"; } } foo::hello(); bar::hello(); ?>
Can't you treat PHP classes like Perl packages?
(Disclaimer: I'm not a PHP coder so I'm probably missing something blatant ;-)
In reply to Re^6: Perl vs. PHP
by adrianh
in thread Perl vs. PHP
by nikos
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |