4 ms·
Not that I disagree with your point, but as a PHP developer myself: 1 - PHP does not require Apache. There is a command-line PHP interpreter: `apt-get instal
by nuclear_eclipse 18y ago
Not that I disagree with your point, but as a PHP developer myself:
1 - PHP does not require Apache. There is a command-line PHP interpreter: `apt-get install php5-cli` allows you to do `php <filename>` and such just fine.
2 - PHP has a lot more libraries available than just what you find in your Apt repositories, such as PEAR, which is PHP's equivalent of CPAN.
3 - Just about every editor I know of has excellent syntax highlighting for PHP; some even go so far as to contextually highlight HTML/CSS/SQL code as it appears in the middle of your PHP code.
4 - As for a REPL, check out [phpsh](http://www.phpsh.org http://www.phpsh.org).
5 - Your point of not using $i for an iterator is absurd, although your point of scoping is not. Using $i for iterators is perfectly fine and sane, assuming the obvious act of not using iterator variables outside hte scope of what they're iterating, which IMO should be standard proctice anyways just for the purpose of clarity...
- jrockway 18y ago1 - PHP does not require Apache. There is a command-line PHP interpreter: `apt-get install php5-cli` allows you to do `php <filename>` and such just fine. Sure, but there is no "./server" that I can run in a directory of PHP files to bring up a testing server. You can run tests from the command-line, which is good, but you can't see web pages without a web server. What a pain.
- nuclear_eclipse 18y agoI still don't see how that's any different than any other language. Something somewhere has have a web server implemented in order for you to test things in your browser. And if you don't like Apache, there's always Lighttpd and other web server options. Probably the best thing for PHP though is that once you set up your trivial testing server, you never have to touch it again. You just keep refreshing the page, or pointing the browser at new pages, no matter how much code you write or file structures you change. It just works.
- jrockway 18y agoYeah, but every time you get a new machine you have to install Apache and setup the httpd.conf. That is a lot of work for a non-production environemnt. Anyway, PHP is the only langauge that does this. Catalyst, Rails, Django, etc. all have their own server. CL has Hutchentoot. It's just PHP that requires a production environment for testing "hello world".