As far as I know, PHP is a dynamic type language. We don’t need to declare variable and don’t need to define data type of variables and function return.
I found an article on sitepoint and one commenter said PHP is not dynamic enough because…
PHP does to many things at
compile-time (like the whole “static”
“self::” stuff) instead run-time.
I’m curious with it. Can someone define what is dynamic type language in simplest form? Is PHP dynamic enough?
Thanks
This is purely subjective, but I’d say “yes” : as long as it allows you/me do do what is needed from it, it is good/dynamic/fast/whatever enough 😉
About the static/self stuff : there have been some great improvements in PHP 5.3 (released at the end of June this year) : there is now Late Static Binding, which has been implemented precisely to answer that concern :
Of course, PHP 5.3 is not yet widely available… But that’ll come, one day or another ^^