filmov
tv
PHP Language Pros and Cons

Показать описание
I need to know PHP language pros and cons.
It is one of the easiest languages to learn, at least for simple tasks. It comes with a lot of free online educational resources as well as a top notch manual.
That’s one of the reasons I’m interested in it, but that does not mean it is worth the effort. I’ve heard people say I should learn Haskell to learn pure programming, which is the equivalent to saying learn Latin before Spanish.
It is used for both web development and regular application development.
I know it is used a lot.
You’ll find a lot of existing PHP modules for whatever you want to do.
Not having to code as much is a plus.
It has garbage collection, though this cannot make up for lazy coding practices.
I’ve heard it is weakly typed.
Pay attention to your variable types and do not reuse them or mutate them, and you’re less likely to get a monstrous result.
That becomes a bigger problem if you’re re-using someone else’s code modules.
Put a file with a PHP extension on your Apache server and point the browser at it, and the web function works. You do not have to run an interpreter, or add libraries to run a lot of PHP extensions and code modules.
Java runs on everything.
And JavaScript rarely renders the same in every browser, whereas PHP does much better at producing a uniform appearance across all devices.
PHP cannot be as perfect as you’re making it sound.
PHP supports namespaces, but it is not easy. It has so many adjustable rules that troubleshooting someone else’s code is a challenge.
I cannot even troubleshoot my own code right now.
It has zero based indexing.
That means nothing to me.
It has C style syntax. There are a lot of different interfaces and tools that let you connect it with C.
I’d get an F in C programming, and that takes points off for PHP with me.
Most configurations run on most OS with little effort. One of the downsides is that global configuration parameters can change language semantics.
Meaning my code mutates depending on the parameters – adding complexity to what is supposed to be simple.
It does not have named parameters, so you have to simulate them with associative arrays.
That’s why it is not a good idea for scientific programming.
And the function names are not standard in the library. Plus it is so easy to learn, that a lot of PHP applications with no IT security or minor bugs are out there.
The only thing worse than writing buggy code is finding out the module I imported added new ones.
It is one of the easiest languages to learn, at least for simple tasks. It comes with a lot of free online educational resources as well as a top notch manual.
That’s one of the reasons I’m interested in it, but that does not mean it is worth the effort. I’ve heard people say I should learn Haskell to learn pure programming, which is the equivalent to saying learn Latin before Spanish.
It is used for both web development and regular application development.
I know it is used a lot.
You’ll find a lot of existing PHP modules for whatever you want to do.
Not having to code as much is a plus.
It has garbage collection, though this cannot make up for lazy coding practices.
I’ve heard it is weakly typed.
Pay attention to your variable types and do not reuse them or mutate them, and you’re less likely to get a monstrous result.
That becomes a bigger problem if you’re re-using someone else’s code modules.
Put a file with a PHP extension on your Apache server and point the browser at it, and the web function works. You do not have to run an interpreter, or add libraries to run a lot of PHP extensions and code modules.
Java runs on everything.
And JavaScript rarely renders the same in every browser, whereas PHP does much better at producing a uniform appearance across all devices.
PHP cannot be as perfect as you’re making it sound.
PHP supports namespaces, but it is not easy. It has so many adjustable rules that troubleshooting someone else’s code is a challenge.
I cannot even troubleshoot my own code right now.
It has zero based indexing.
That means nothing to me.
It has C style syntax. There are a lot of different interfaces and tools that let you connect it with C.
I’d get an F in C programming, and that takes points off for PHP with me.
Most configurations run on most OS with little effort. One of the downsides is that global configuration parameters can change language semantics.
Meaning my code mutates depending on the parameters – adding complexity to what is supposed to be simple.
It does not have named parameters, so you have to simulate them with associative arrays.
That’s why it is not a good idea for scientific programming.
And the function names are not standard in the library. Plus it is so easy to learn, that a lot of PHP applications with no IT security or minor bugs are out there.
The only thing worse than writing buggy code is finding out the module I imported added new ones.