Live data from Hacker News

Announcing a specification for PHP

hhvm.com

171–180 of 263 posts

Re: Announcing a specification for PHP

#171

Earlier quoted context omitted.

All the reflection and abuse of mixins are pretty worthy of hate.

That's like saying you hate lisp because of macros or that buffer overrun exploits are reason to hate C. That's just shitty programmers doing shitty programming.

Buffer overruns are a completely valid reason to dislike C.

Re: Announcing a specification for PHP

#172

Earlier quoted context omitted.

If you like it because it's like rails, why not just use rails? The rails ecosystem is undoubtedly stronger than laravel's, and it's a more mature framework. I don't see where laravel fits in the spectrum of PHP frameworks.

> "If you like it because it's like rails, why not just use rails?" PHP is ubiquitous on shared hosting platforms, there aren't that many "shared" Rails hosters out there. Morts still use shared hosters.

This was a much more compelling argument when shared hosting was still cheaper than a VPS with root access. But now you can get a VPS from any slew of providers, like digitalocean, for $5 a month. Root access computing has never been more accessible, and shared hosting is rapidly losing any value proposition it once had. So targeting PHP purely because it's more ubiquitous on shared hosting than Rails, is making less and less sense.

Re: Announcing a specification for PHP

#173
post #133
post #7

Earlier quoted context omitted.

There are languages that everybody hates, and then there are the languages nobody uses.

And then there is C#. ( implication being that I almost never see anyone hating on C#, and yet C# is really used a lot, obviously. Hey, I was probably gonna have to add this part to the post as an edit, anyway; might as well get it out of the way. )

Just learn and code in c#.. Really tense... Code work in visual studio but compile output diff.string and array kinda weak to me..I love pup because of string manipulation.(string) (int) casting both in php and c# also..still learning c#.

Re: Announcing a specification for PHP

#174
post #124

PHP is fantastic if you are starting from scratch and you don't necessarily need any third party libraries. PDO is very well done and the native database drivers are some of the fastest available. With a properly tuned nginx/fpm/apc stack, I've been able to deliver solutions that truly back up the results you see from comparison benchmarks like Techempower. In many cases in web development, PHP can be the right tool…

With HHVM + nginx you can really fly! Seriously, it's amazing how fast it is (and the Techempower benchmarks put it at #1 for anything with multiple requests and data handling!)

You are spot on, Nginx+HHVM is really fast. I am an early adopter of HHVM (since Dez 2012) and it really shines on sites with thousends of requests per seconds. I heard PHP 5.5+ on Nginx (FPM) is fast as well.

And I prefer PHP as I can code websites without the need of frameworks (PHP is "the framework") with a C/C++ like syntax. The idea of libraries is much older than frameworks, and in the end libraries are so much more flexible IMHO.

Re: Announcing a specification for PHP

#175
post #79
post #23

After recently having to work with modern PHP, I have to say a lot of the criticism of the language is unfounded. It's changed a lot since I first used it. But the stdlib is still hard to manage. Different naming conventions, different order on the parameters for functions that do almost the same thing, and every function is global. Couldn't they keep all that for backwards compatibility, but create more sane wrapper…

Fun with PHP: $a = 'b'; $b = 'a'; echo $a."\n"; >>> b echo $$a."\n"; >>> a echo $$$a."\n"; >>> b Yaaa $obj = new StdClass(); $obj->x = 1; function x_plus_one($obj) { $obj->x++; } x_plus_one($obj); var_dump($obj); >>> object(stdClass)#1 (1) { >>> ["x"]=> >>> int(2) >>> } Huh? A local change to the object changed the object outside the local scope? It must have been passed by reference... function null_the_object($obj)…

Pointers.

Re: Announcing a specification for PHP

#176
post #174
post #124

Earlier quoted context omitted.

With HHVM + nginx you can really fly! Seriously, it's amazing how fast it is (and the Techempower benchmarks put it at #1 for anything with multiple requests and data handling!)

You are spot on, Nginx+HHVM is really fast. I am an early adopter of HHVM (since Dez 2012) and it really shines on sites with thousends of requests per seconds. I heard PHP 5.5+ on Nginx (FPM) is fast as well. And I prefer PHP as I can code websites without the need of frameworks (PHP is "the framework") with a C/C++ like syntax. The idea of libraries is much older than frameworks, and in the end libraries are so muc…

> And I prefer PHP as I can code websites without the need of frameworks

That either means A) you re-invent the wheel every time you start a project or B) you have your own implementation of commonly used items (your own framework)

I personally would rather have a framework vetted & maintained by thousands of other developers than one I put together myself.

Re: Announcing a specification for PHP

#177
post #168

Earlier quoted context omitted.

Despite peoples grumblings about parameter order the only real reasonless difference is string functions are haystack / needle, whereas array functions are needle / haystack. Once you know that its not that difficult. Some other minor inconsistencies like array_map vs. array_filter are simply due to the fact that optional parameters have to be at the end of function calls. On array_filter the callback is optional, wh…

> the only real reasonless difference is string functions are haystack / needle, whereas array functions are needle / haystack There's a trick to this that isn't too hard to remember. Searching for a value in an array is much more akin to searching for a needle in a haystack. So, for array functions, it's like searching for a needle in a haystack. For string functions, you're searching in a haystack for a needle. I'm…

> searching for a needle in a haystack > searching in a haystack for a needle

wait, what's the difference?

Re: Announcing a specification for PHP

#178

Earlier quoted context omitted.

Laravel alone was enough to bring me back to PHP. It seriously has made PHP exciting again (I come from a Codeigniter and Zend background). It takes all of the things people love about Ruby on Rails and brings them to a PHP framework utilising modern features like traits alongside the fantastic selection of packages like Cashier. The even more surprising aspect of Laravel isn't how great it is, but rather the fact it…

If you like it because it's like rails, why not just use rails? The rails ecosystem is undoubtedly stronger than laravel's, and it's a more mature framework. I don't see where laravel fits in the spectrum of PHP frameworks.

What makes you think I don't use Rails? I use whatever I think fits the purpose at hand. I sometimes use Rails for a project, sometimes I might use Node.js and other times I'll use PHP. It all depends on different factors like budgets, time, the task and team (if any).

Frameworks and languages are a lot like databases. They all achieve the same thing, they're just all slightly different and good for different purposes. I sometimes use MySQL, other times I'll use PostgreSQL, sometimes I might use a graph database like Neo4j or other times I might even use something like MongoDB.

The Rails community has been around a lot longer than Laravel's community, so you can't even compare them. The only community worthy of being compared to Rails is Codeigniter's and at the peak of Codeigniter's popularity, I would argue Codeigniter had the bigger community. Laravel is a mere couple of years old, the community is already pretty strong. Lets reevaluate soon when the right amount of time has passed and then see where the community is at. You only have to look at the amount of Github stars to see how popular it is.

Re: Announcing a specification for PHP

#179

Earlier quoted context omitted.

> "If you like it because it's like rails, why not just use rails?" PHP is ubiquitous on shared hosting platforms, there aren't that many "shared" Rails hosters out there. Morts still use shared hosters.

This was a much more compelling argument when shared hosting was still cheaper than a VPS with root access. But now you can get a VPS from any slew of providers, like digitalocean, for $5 a month. Root access computing has never been more accessible, and shared hosting is rapidly losing any value proposition it once had. So targeting PHP purely because it's more ubiquitous on shared hosting than Rails, is making less…

Upload and run with all the security and management done for you is a great way to get going in web development. I don't feel that the idea that everyone doing reasonably simple PHP stuff should have root access 'makes sense' actually does.

Re: Announcing a specification for PHP

#180
post #23

After recently having to work with modern PHP, I have to say a lot of the criticism of the language is unfounded. It's changed a lot since I first used it. But the stdlib is still hard to manage. Different naming conventions, different order on the parameters for functions that do almost the same thing, and every function is global. Couldn't they keep all that for backwards compatibility, but create more sane wrapper…

> After recently having to work with modern PHP, I have to say a lot of the criticism of the language is unfounded. It's changed a lot since I first used it.

Criticism doesn't become unfounded because things become better. Things become better because of criticism.

Post reply on HN