5 ms·
I don't care what anyone says— I absolutely love PHP. I automated my home theatre with it as seen here: https://www.youtube.com/watch?v=Cc8K6lg7Ag8 https://www
by thrusong 5y ago
I don't care what anyone says— I absolutely love PHP.
I automated my home theatre with it as seen here:
https://www.youtube.com/watch?v=Cc8K6lg7Ag8 https://www.youtube.com/watch?v=Cc8K6lg7Ag8
I built a website just for me so I can stream my movie collection anywhere I go, but it also has a button to start playing an automated show in my theatre.
I call it the Phantom. When you start a show, it plays a Dolby ad, a dancing hot dog-style vintage drive-in ad, and several random trailers in the same genre before the feature.
The Phantom PHP code controls the lights, projector, curtain, and sound system.
The lights come up for the credits and the whole room goes to sleep 30 minutes after the presentation.
I've only shared it once here before and someone, I'm guessing a PHP hater, gave it a thumbs down on YouTube.
PHP is extremely powerful in my experience and has been very lucrative in my career.
One of the best things I ever did was learn how to program with it.
- TrispusAttucks 5y agoAgreed. Ignore the haters. PHP is a silent giant that is hugely under-rated. While it is a perfect fit for the web, it is also an excellent general purpose scripting language for things that can traditional be done with bash. PS. Sweet home theatre setup!
- thrusong 5y agoThank you! Not ironically— another thumbs down. All some people have to offer this world is negativity. I feel sorry for them.
- ashitlerferad 5y agoAlso, HN removed it from the front page despite the upvotes. After, November 28 it may be more worthy
- IshKebab 5y agoI've done a bit of PHP and it is not under-rated. Compared to most other languages it is terrible. Nobody is saying that you can't make cool stuff with it. Try Typescript in your next project.
- dr-detroit 5y agoYou literally made a personal home page with PHP, disproving your own point that it belongs in the industry.
- jpgvm 5y agoI think there is nothing wrong with PHP if you are using it for what it was built for and you aren't pretending it's something it's not. It's the people saying "PHP is the best language for building web apps in 2021" that are problematic. No. It's simply not. We have come a long way since then and that view point can only be held out of ignorance. That isn't to say you can't build awesome stuff in PHP, you can and in your case did. But to say PHP > Java/C#/Rust/Elixir/etc is just being an edgelord for the sake of it. Language tech improved, PHP didn't come with it. That is fine, C didn't come with it either but it still has it's place. Right tool right job, PHP can still be the right choice for lots of things if you have experience with it and can use it to make the thing you want.
- conradfr 5y agoPHP did evolve, and still is.
- TrispusAttucks 5y ago> It's the people saying "PHP is the best language for building web apps in 2021" that are problematic. OP didn't say this. > No. It's simply not. We have come a long way since then and that view point can only be held out of ignorance. > Language tech improved, PHP didn't come with it. Are you familiar with the changelogs over the past 10 years? Are you ignorant of the changelogs? > But to say PHP > Java/C#/Rust/Elixir/etc is just being an edgelord for the sake of it. OP isn't saying that. > Right tool right job, PHP can still be the right choice for lots of things if you have experience with it and can use it to make the thing you want. Isn't this true of any language?
- jpgvm 5y agoI was agreeing with OP. You can use PHP, just don't be someone like you and it's fine.
- josephd79 5y agoWeird, I thought there was a resurgence of web app developers using React|VueJS on the frontend and Laravel (PHP framework) on the backend?
- silicon2401 5y agoWhy did you go with PHP over another language? Do you have comparable experience with other languages to have had legitimate alternative options? Genuine question. I'm deeply interested in your project as I have a similar goal. I would also like to create my own custom entertainment setup, throwing in commercials/trailers with feature presentations. Do you have a website or place I can reach out to you with questions? Or for Hacker News readers, if I want to create a similar custom media playlist kind of thing, is it possible to do that with VLC or would I have to write a custom solution?
- thrusong 5y agoI've dabbled a bit in C/C++, and even a little Python, but not enough to build something like this. Maybe one day I'd like to re-write it with everything I've learnt so I can compile it and monetize it. I've also thought about open sourcing it, but the code is a little rough (messy) as-is and I struggle with what to do. I know JavaScript and PHP, and PHP just seemed to do everything I needed. I built a website a long time ago for collaborative music composition. It interacted with command line software and used XMPP to communicate with the server. That sorta lead to using PHP to control everything in the theatre, plus a lot of the components I bought can be controlled through HTTP commands. Overall, this was a side-project and I've slowly perfected the timing and the features over the past six years to where I have it pretty feature complete and reliable now. Everything is timed perfectly, it can handle intermissions, overtures, and exit music. If there's some sort of break down, it shows film melting, shuts off the projector, and brings the lights up... Stuff like that. As for VLC: This all runs on a Raspberry Pi 4. I originally used VLC but started having trouble with it when I moved from the Odroid XU4 to the Pi, so now it runs on mpv. Moved to the Pi because I wanted to run Netflix in the theatre easily as well. If the Odroid ran Netflix (and some other small things), I'd prefer it.
- denton-scratch 5y agoFor my part, I learned PHP because a lot of small web-shops were using it, and I wanted a job in a small web-shop. Previously I had coded professionally in COBOL, C, VB6, and Java, and I knew Forth. I made money writing PHP for a decade-and-a-half. Straight PHP is not particularly lucrative work; but Drupal module development can pay quite well. For the "custom media playlist": VLC is just a player. But there's a player built-into your browser; my home-brew playlist originally used VLC, but I switched to using the <video> tag once it became reliable (and would play ogg/vorbis properly). You still need a backend; and you'll probably need quite a bit of Javascript.
- denton-scratch 5y agoI also like PHP. It is also an awful language, though, and always has been. Inconsistent parameter ordering, the infamous NULL/0/""/FALSE heffalump trap, object-orientation as an afterthought. Many more. It's OK once you know the language well, but a lot of PHP developers don't. I have a PHP app written in PHP5.6, for my own use (not exposed on the internet). Naturally it broke when I upgraded to Debian Buster. Upgrading the code would have taken ages; but it took me just a day or so to work out how to get PHP5.6 working on Buster. I've retired, because I can, and because I prefer not to work if I don't have to. There's a pretty steep learning curve from PHP5 to PHP8; I don't want to do that learning, if it's no longer necessary for my job, and I'm only using it for a private app. I've not used PHP8 on anything serious, but my impression is that it's a HUGE improvement on PHP5. It's a lot more coherent, a lot faster, and a lot more secure. A lot of what has been dropped was dropped because it was insecure crap - it had to go sooner or later. In the end it was "better late than never".
- thomaslord 5y agoI think PHP7+ has provided a lot in terms of modernization and focus on the OO paradigm. For what it's worth, there are a couple of tools out there that should help getting your personal app up and running on PHP7 if you're interested in doing that at some point. Most of the breaking changes I've run into are because deprecated features were removed, which in a lot of cases seemed like strange/wrong syntax to me anyway. I have a legacy app that can't feasibly be updated past 5.6 because it uses a totally undocumented framework that wasn't built in-house. While I could run one of the tools I mentioned, 99% of the framework code probably never runs so there would be a lot of work done for nothing.