Answers.Body: <p>Actually, yes. Remember, that due to the history of PHP development, some very good things has formed what we have now:</p>
  
  <ul>
  <li><p>From a simple/laggy/limited interpreter in PHP 3, we have now three mainstream lines coming one-by-one like v5/v6/v7 with <em>full bytecode</em> supported.   </p></li>
  <li><p>In PHP v7 you don't even need a bytecode cache due to HHVM, old Zend VM is a hell-good-debugged and using a cacher like XCache you can achieve a true native execution speed <strong>and</strong> payload</p></li>
  <li><p>The PHP language interface allows <strong>any</strong> external C/C++ library <em>just to be added</em> as a module via very simple wrapper that can be written by the person that just red Kerrigan&amp;Richie and Straustrup base books on C and C++. This is amazing feature, exclusive to PHP as far as I know</p></li>
  <li><p>In PHP v7 you're welcome to use <em>native</em> multi-threading and even CUDA-based things, if you wish to do it. I did it, so I can confirm that it works</p></li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-04T12:50:23.533Z
Answers.LastActivityDate: 2016-08-04T12:50:23.533Z
Answers.UserDisplayName: Alexey Vesnin
Answers.Body: <p><em>Question on-topicness questionable, but...</em></p>
  
  <hr>
  
  <p>The most logical reason why PHP is unsuited for neural networks is that PHP is, well, intended to be used for server side webpages. It can connect to various external resources, such as databases, via native language features. It is very much a glue language, and not a processing language. PHP is also mostly stateless, only allowing you to store state in either clients, file storage or databases.</p>
  
  <p>As such, it's <strong>not</strong> suitable for this sort of thing - not because PHP is a high level language, but rather because it's so request based and focused towards creating pages to serve to clients.</p>
  
  <p>That won't stop people from trying, though - there are various esoteric programming languages out there in which regular programming would be an insane task or not possible at all - but from a ease of development perspective, making a neural network in PHP makes no sense.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-04T12:35:10.167Z
Answers.LastActivityDate: 2016-10-31T09:06:48.290Z
Answers.LastEditDate: 2016-10-31T09:06:48.290Z
Answers.UserDisplayName: Pimgd
Body: <p>I read some information<sup>1</sup> about attempts to build neural networks in the PHP programming language. Personally I think PHP is not the right language to do so at all probably because it's a high-level language, I assume low level language are way more suitable for AI in terms of performance and scalability. </p>
  
  <p>Is there a good/logical reason why you should or shouldn't use PHP as a language to write AI in?</p>
  
  <p><em><sup>1</sup></em> <a href="http://www.developer.com/lang/php/creating-neural-networks-in-php.html" rel="nofollow noreferrer">http://www.developer.com/lang/php/creating-neural-networks-in-php.html</a> and <a href="https://stackoverflow.com/questions/2303357/are-there-any-artificial-intelligence-projects-in-php-out-there">https://stackoverflow.com/questions/2303357/are-there-any-artificial-intelligence-projects-in-php-out-there</a> </p>
  
Tags: <neural-networks><programming-languages>
Title: Can PHP be considered as a serious programming language for AI?
UserDisplayName: Bob Ortiz
ThreadText: # Can PHP be considered as a serious programming language for AI?
  
  (Asked by: username_0 on 2016-08-04)
  
  I read some information1 about attempts to build neural networks in the PHP programming language. Personally I think PHP is not the right language to do so at all probably because it's a high-level language, I assume low level language are way more suitable for AI in terms of performance and scalability.
  
  Is there a good/logical reason why you should or shouldn't use PHP as a language to write AI in?
  
  *1* <http://www.developer.com/lang/php/creating-neural-networks-in-php.html> and <https://stackoverflow.com/questions/2303357/are-there-any-artificial-intelligence-projects-in-php-out-there>
  
  **Tags:** neural-networks, programming-languages
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2016-08-04. Score: 6 | Accepted answer
  
  *Question on-topicness questionable, but...*
  
  ---
  
  The most logical reason why PHP is unsuited for neural networks is that PHP is, well, intended to be used for server side webpages. It can connect to various external resources, such as databases, via native language features. It is very much a glue language, and not a processing language. PHP is also mostly stateless, only allowing you to store state in either clients, file storage or databases.
  
  As such, it's **not** suitable for this sort of thing - not because PHP is a high level language, but rather because it's so request based and focused towards creating pages to serve to clients.
  
  That won't stop people from trying, though - there are various esoteric programming languages out there in which regular programming would be an insane task or not possible at all - but from a ease of development perspective, making a neural network in PHP makes no sense.
  
  
  ---
  
  ### Answer by username_1 on 2016-08-04. Score: 3
  
  Actually, yes. Remember, that due to the history of PHP development, some very good things has formed what we have now:
  
  * From a simple/laggy/limited interpreter in PHP 3, we have now three mainstream lines coming one-by-one like v5/v6/v7 with *full bytecode* supported.
  * In PHP v7 you don't even need a bytecode cache due to HHVM, old Zend VM is a hell-good-debugged and using a cacher like XCache you can achieve a true native execution speed **and** payload
  * The PHP language interface allows **any** external C/C++ library *just to be added* as a module via very simple wrapper that can be written by the person that just red Kerrigan&Richie and Straustrup base books on C and C++. This is amazing feature, exclusive to PHP as far as I know
  * In PHP v7 you're welcome to use *native* multi-threading and even CUDA-based things, if you wish to do it. I did it, so I can confirm that it works
  
  
  ---
  
  