Warning: Here be dragons.
Never create anything people rely on that runs machine learning in PHP.
Warning: Here be dragons.
Never create anything people rely on that runs machine learning in PHP.
I don't blame you
Let me know if you have any questions
Respect for building fundamentals, but in terms of utility, it needs a proper warning label IMHO.
Two things you mentioned that are incorrect though
The first is the presumption that you need a GPU to do machine learning - the reality is that the average business doesn't need nor has the data to benefit from such large models
The second is that PHP is slow - but when you do comparisons with Python, PHP is actually faster
https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
The reason why Python, for example, is faster in some machine learning applications is because it's probably getting help from a library such as numPY or Tensorflow
Although these tools are missing currently in the PHP ecosystem, I'm confident that we'll have them eventually
For example, here is an attempt to bring numPY-like functionality as a PHP extension
https://github.com/phpsci/phpsci-ext/tree/1.0-dev
We've also had some progress being made accessing Tensorflow from PHP using an FFI (foreign function interface)
https://github.com/dstogov/php-tensorflow
So this is where the convo should begin in my opinion
I've used PHP for a while now. PHP is a language that favors practicality. It's a language that is depended on throughout the world and doesn't (purposely) change as fast to accommodate new trends
Having that said
- The value of machine learning has become very clear over the past decade or so
- 80% of websites on the web are powered by PHP
https://haydenjames.io/80-percent-web-powered-by-php/
I undoubtedly anticipate a steady rise in effort from the PHP community directed at practical applications of ML - Rubix ML being one of the first libraries to make these tools accessible to the PHP engineer
Just because Wordpress generates it, doesn't make it a best practice. Do you think Wordpress websites are the best? It's definitely not the most popular language:
https://github.com/emmanuel-keller/github-language-statistic...
https://www.tiobe.com/tiobe-index
https://redmonk.com/sogrady/2019/03/20/language-rankings-1-1...
PHP is falling because it has major issues. It has poor idioms and is slow. It is trending down, not up.