Live data from Hacker News

PHP 8 to Add a JIT

blog.krakjoe.ninja

71–80 of 190 posts

Re: PHP 8 to Add a JIT

#71
post #28
post #10

Earlier quoted context omitted.

I think PHP had a couple of obvious advantages - it almost had a "first mover" advantage in that it happened to be installed alongside CGI-BIN on shared webhosts way back in the way - plus Drupal and WordPress being PHP projects. But to me, one of the most significant advantages PHP has is that its documentation is terrific . PHP.net is simple, clear about parameters and return values (as clear as PHP lets it be anyw…

I haven't found PHP documentation to be better or worse than the documentation of other languages I've used. What I dislike about it is the comments that every page includes. Most of them are very poorly written snippets of code from 15 years ago. If you dislike those comments too, consider adding this to your ad blocker: php.net###usernotes

I've actually found many of the comments rather useful over the years, and although I'm not crazy on how old and random they often are, I find them at least worth a quick look.

Re: PHP 8 to Add a JIT

#72
post #45

Earlier quoted context omitted.

How is syncing your PHP code with the server serverless?

and now you see why "serverless" is misleading. "serverless" now means you don't run your own web server, you use someone else's.

That's not what serverless means. It means that your code isn't running on a specific server, and between requests it isn't in any kind of running state whatsoever. It's effectively in cold storage until it's needed, then it's pushed to a frontend/edge server and run. Serverless doesn't mean that there's no servers anywhere, but rather that you don't have a webserver or set of webservers that your code is on; it goes onto a webserver when it's needed, and not before.

Re: PHP 8 to Add a JIT

#73
post #25

Earlier quoted context omitted.

"it almost had a "first mover" advantage in that it happened to be installed alongside CGI-BIN on shared webhosts way back in the way" That's a good observation. Because the mod_php and mod_perl Apache modules were much faster and lighter weight than CGI-BIN, and pre-installed on shared hosting, both PHP and Perl dominated the early web days.

When / where was mod_perl ever widespread? Perl was usually provided via CGI, and php was mostly deployed with mod_php back in the day which gave it a great speed advantage, often at the price of security.

When? Before 2000.. php came after PERL. PHP wasn't a serious language was the general though. ASP was seen as that.. or Java/JSP

Re: PHP 8 to Add a JIT

#74

The article says that this will help PHP in areas outside of the web. But what others areas actually want PHP? Even in its niche, the web, it has fallen out of grace for new projects.

Web PHP projects that want to move some stuff out of a web request? Like delayed_job

Web PHP projects that want to add some command line programs for doing maintenance tasks etc

Re: PHP 8 to Add a JIT

#75
post #6
post #2

There is something to be said about PHP's staying power. The early versions of the language weren't considered "right". Except maybe they were right for the problem at hand. The way I see it was PHP captured the vector of change , and left ample room for future developments. Both internal changes (hello, bytecode; hello, JIT), language level features (hi there, namespaces), and runtime level features (oh hai, countle…

I agree with just about all of your post except using Rails as an example of something that burnt out quickly. It was the most popular web framework around for the best part of a decade and is still being chosen for new projects.

Rails was never the most popular framework. But for a certain geography it was. Those were the anti-java crowd.

Re: PHP 8 to Add a JIT

#76

Earlier quoted context omitted.

> making a dynamic language perform well Perhaps the advantage here is that PHP really all that dynamic. PHP is much closer in design to taking Java and compiling it on every request than it is like Python or Ruby.

Well, you can do $moo = "hello"; $zork = "moo"; echo $$zork; // hello It doesn't get much more dynamic than that.

It can. Python, for example, builds up classes at runtime. PHP builds up classes at compile time. There are plenty of other examples. PHP is really dynamic through eval() but that's more rare.

Although PHP does support the above syntax, it's actually pretty rare in production code. PHP can be optimized like JavaScript is: perform direct variable/member access but provide a slow path for these kinds of dynamic lookups.

Re: PHP 8 to Add a JIT

#77
post #47

Earlier quoted context omitted.

Rails was popular among those that never saw such approaches before, like on AOLServer and Zope. I just kept using Java, .NET and C++, while enjoying their performance, IDE tooling, and whatever ideas they could bring into their web stacks. Nowadays most cool companies that were pushing Ruby, are on JVM languages.

I think your view is skewed and doesn't reflect what actually happened in the mid-00s.

All views are correct. Look at the number of jobs in cities around the world. Ruby was 1 in California but no where else during that time period.

Re: PHP 8 to Add a JIT

#78
post #2

There is something to be said about PHP's staying power. The early versions of the language weren't considered "right". Except maybe they were right for the problem at hand. The way I see it was PHP captured the vector of change , and left ample room for future developments. Both internal changes (hello, bytecode; hello, JIT), language level features (hi there, namespaces), and runtime level features (oh hai, countle…

Another thing PHP had was good reference documentation with a comments section for every function.

Re: PHP 8 to Add a JIT

#80

The article says that this will help PHP in areas outside of the web. But what others areas actually want PHP? Even in its niche, the web, it has fallen out of grace for new projects.

Real time processing of Garmin fitness data takes a lot of cpu. We had to use a c module to handle this can't wait to try php 8.
Post reply on HN