2 ms·
I think OP's point was that for starting developer PHP is super easy. - edit a text file with any text editor (notepad?) - copy file onto a server (ftp? scp? g
by adamzochowski 7y ago
I think OP's point was that for starting developer PHP is super easy.
- edit a text file with any text editor (notepad?)
- copy file onto a server (ftp? scp? git push? -- most servers will process php)
- access it through url in browser
The example was about simplicity. OPs text file is 11 bytes long "Hello World", and is a valid PHP, it will run on a server.
This is about how easy a person with no knowledge and no special tools can start doing things.
Your example implies that developer has node installed, and expects the developer to run a server from within node, and then understand how the server handles URLs to functions. Additionally, I don't know how an early developer is expected to get this onto a server. First copy, then ssh onto server, then start the node server on server. That is a lot of steps for beginner to remember.
Additionally, as you mention, changes to file require server restarts, or building a self reload capability. I play with Flask, which has self reloading available, when developer pushes broken code Flask can just crash (self reload fails), and then developer has to start flask again. With PHP, broken code does not crash apache/nginx.
For developers that live and breathe computing knowledge running things through additional steps make sense. C/Java/C++/C# all have compilation and linker steps. Things like Grunt or Less are nothing scary for developers that ran C/C++ code through M4 preprocessors before compiling (now M4 is built into compilers).
So yes, for professionals, PHP is just a programming tool as any other.
But for beginners, PHP is awesome easy to grasp and use.
- seangrogg 7y ago> Your example implies that developer has node installed, and expects the developer to run a server from within node, and then understand how the server handles URLs to functions The OP's example implies that the developer has Apache and PHP installed at a minimum and that Apache is set to proxy requests to PHP. This requires SSH and starting Apache. I remember doing this back when I first configured my first LAMP server, though most hosting companies will do this for you and usually as part of a cPanel setup (even more dependencies). > Additionally, as you mention, changes to file require server restarts, or building a self reload capability In fact, I said just the opposite.