3 ms·
In all fairness, it's what I switched from VB to. My current position is that HHVM's existence means that PHP is a serious contender and kicking it out the win
by i336_ 11y ago
In all fairness, it's what I switched from VB to.
My current position is that HHVM's existence means that PHP is a serious contender and kicking it out the window is probably not the greatest of ideas.
The fact that it doesn't have good console interaction support out of the box kind of killed it for me though.
Once my computer setup's stable (this 1024x768 laptop screen isn't that great for dev work :p) I'm going to be looking at some other languages.
I don't mind PHP overall, and since it's so widespread if I want a small script that'll almost certainly run "in most places" I'm likely to turn to PHP. (To continue the console argument, though, it's entirely possible that php[-cli] might not be installed, only the Apache module, which is annoying.) Similarly, if I was to build a major "community-oriented" project which I wanted to succeed... I might actually write it in PHP because it's such a simple language to work with and learn (at least it was in my case).
My personal goal is to keep it a "minority" language, though. Going forward, if I write for my own purposes I want to try and use other things, and if I had to use PHP internally somewhere I wouldn't be that impressed. :p
- toothbrush 11y agoFriends don't let friends use PHP. > since it's so widespread if I want a small script that'll almost certainly run "in most places" I'm likely to turn to PHP I'm curious about this though—isn't sh literally required by the POSIX standard? How is PHP more ubiquitous than sh? I certainly don't have PHP installed.
- i336_ 11y agoGood point. A "small script" might not necessarily be very simple - it might only have 5-10 lines, but those lines might involve parsing HTML, connecting to a remote host somewhere, running a one-time listening server, nontrivially processing a set of files... any number of different tasks. sh is good for job execution, piping and redirection, and task management, and it launches processes like sed, grep, and awk to handle text processing. Beyond that, simple, one-time HTML parsing can be done with sed and grep, but it doesn't work very well (and I'd never use it in production), I can't really easily connect to a server without netcat or socat (or, in a pinch, bash's exec operator, which is slow in practice - I wrote an IRC bot in bash, its CPU usage skyrocketed easily), or for more complex tasks involving HTTP requests, curl or wget. It's ultimately impossible to know whether someone has Python, Perl, Tcl, Haskell, Ruby, Node.js, or even PHP installed, and able to run console scripts... but only a language like one of these comes with a base library competent enough to include functionality to achieve all the goals I noted above.
- jordanlev 11y agoYeah, it seems that most of the anti-PHP bias is from programmers building things that they deploy themselves. But for sites that are built by non-programmers (e.g. web designers... there are a ton out there building CMS-based sites, they dabble in programming but don't get too deep), the fact that it easily deploys on most shared hosts can't be beat.