|
|
|
|
|
by svnpenn
2128 days ago
|
|
PHP is damn good in certain areas. It is one of the best choices (if not the best choice) for rapid prototyping of a program. Its damn fast to similar alternatives (Python, Ruby, Dart, JavaScript), and the standard library is huge. It does have footguns. I am not a fan of the loose typing, but you can take some steps to mitigate. You can do "===", "strict_types" and type hinting for function input and output. It is similar to C in that the language itself doesnt really do much to stop you from writing bad code. Also the function naming is not consistent, and even function arguments are not consistent. However PHP 8 will help with that somewhat, as you can now do named arguments. Also PHP has the best language documentation I have ever seen. I would prefer more examples, but its well above some other languages. |
|
PHP is basically a wrapper of C modules.
String functions are ($haystack,$needle)
Array functions are ($needle, $haystack)
Because that's the way the underlying modules worked. I had used PHP for a long time without realizing this.