Live data from Hacker News

PHP 7 Released

github.com

151–160 of 317 posts

Re: PHP 7 Released

#151
post #103
post #21

Earlier quoted context omitted.

I think it's great to point new developers to the right resources. Besides sane frameworks, there are some good starting/best practices guides to help (that are regularly updated), such as: http://www.phptherightway.com https://phpbestpractices.org Also, I would encourage them to look at different frameworks, not just one. It'll help if they later move onto other languages, as they'll be already exposed to different…

Very first part of the tutorial: "Use the Current Stable Version (5.6)"

Yes, 7.0 isn't out yet (it's only been tagged, it comes out tomorrow). And for a while yet it might be a good idea to stick with 5.6

Re: PHP 7 Released

#152
post #25

Earlier quoted context omitted.

PHP is very likely to be the language used by Mort: http://blog.codinghorror.com/mort-elvis-einstein-and-you/ I doubt any of those developers are ever going to switch what they're already using unless they are forced by some external factor. The more serious factor is: if you're on Hackernews, you're at least Elvis or even Einstein. Mort is out of reach for most internet media for programmers.

This is an arrogant and immature type of thing to write. This is programming, not high school cool-kids club. PHP is a wonderful tool that was mostly responsible for the dynamic web. Before it became popular, the web was mostly static HTML with an occasional CGI form, probably written in something like Perl, mostly just for emailing the webmaster. Maybe some small amount of JavaScript for something like rollover effe…

Umm... no. I was talking about the subset of devs which are just chugging along without much thought put into the craft of programming. Which includes me sometimes, as well as many PHP developers. But not all of them.

Go search internet forums: "how i script PHP mail?" folks won't use the latest best practices.

And there were dynamic webpages before PHP, PHP just gave a ton more people access to them by easy installation, configuration and most importantly, development/feedback cycle.

Re: PHP 7 Released

#153

I wish every PHP developer would reread the docs and start using new features available instead of just continuing with what they know already just because it works. And of course if there was any way to remove all those old tutorials out there.

And every php developer would wish that suddenly all php in the world upgrades to v7. We are years away from 7 having a big penetration in the ecosystem. And years more till it hits enterprise.

GoPHP5 successfully forced the community to move to 5 en masse. We can do the same again for 7 if we need to.

Re: PHP 7 Released

#154

Earlier quoted context omitted.

Wordpress alone runs 25%+ of all websites. PHP's time is clearly still now. I probably won't bother with PHP, but it can't hurt to keep my idea of what it's like up to date. It's only technology, no need to be fanatical about it.

Cobol is still in use. That doesn't make it good. PHP is a poorly written language. From comparisons to namespaces to other gotchas, it's just pigs guts. From the ground up, it's a badly designed language. Look up "Fractal of bad design" for a better understanding of why.

Yes, so everybody says, but I prefer forming my own opinion!

I simply don't like to call something that millions of programmers work with "pigs guts" if I haven't actually looked at it for about a decade.

Re: PHP 7 Released

#155
post #63
post #7

PHP 7 makes life a lot better for PHP devs in many ways but one awesome thing is it obsoletes bunch of out-of-date tutorials by finally removing the old Mysql extension \o/ http://php.net/manual/en/migration70.removed-exts-sapis.php I actually met a young aspiring web developer who still learned DB-access with mysql_* functions. I urged him to switch to a sane framework like Laravel. Oh boy he was happy in a month an…

> I urged him to switch to a sane framework like Laravel ...why didn't you taught him about PDO, so he can start with something more universal, not tied to one particular framework that happens to be popular nowadays?! Then he can learn whichever OR/DM or DAL he might like need (Eloquent, Doctrine, Redbean, IdiORM/Paris etc.), and also be able to pop the hood and debug it when needed. I never get it why so many other…

> instead of playing to the language's advantages and using light-weight tools and libraries that would allow them to move faster.

Depending on what you mean by "move faster", I may have to disagree. Besides a one-off script, I can't envision a scenario where using "tools and libraries" would allow you to move faster than using Laravel.

Laravel comes with an unbelievable amount of stuff done for you, right out of the box. Routing, Auth, Database, Queueing, Caching, Asset Pipeline, Templating, etc, etc. If your goal is to rapidly develop an application, there really is no better framework than Laravel to get that going. There's even a vagrant box that's all tooled for Laravel.

TBF, I may have misunderstood what you meant by "move faster".

Re: PHP 7 Released

#156

Why do they keep adding global functions like "intdiv"? For example in JS, it being another language with a similar compatibility burden, they are moving most of the global functions (like parseInt) to "namespaces" (like Number.parseInt) while keeping global references there. When I open the docs (for example, the array functions page[1]), I get frightened by the global functions which do not seem to share a naming c…

When you put stuff in namespaces you need to remember in which namespace it is (and which library to refrence). Number.parseInt is not that bad but I'll take to_json() global function instead of (new System.Web.Script.Serialization.JavaScriptSerializer()).Serialize() (or was it Newtonsoft.Json.JsonConvert.SerializeObject()?) any day. Sure, names of PHP functions look arbitrary and inconsistent but when you know the n…

Number.parseInt is not that bad but I'll take to_json() global function instead of (new System.Web.Script.Serialization.JavaScriptSerializer()).Serialize() (or was it Newtonsoft.Json.JsonConvert.SerializeObject()?) any day.

Or, to keep with the JS example:

   JSON.stringify()
Not exactly that bad.

Re: PHP 7 Released

#157
OK, great! Clicking the main page[1], see the top of README:

"build error".

Wait, what? You just released it, it should definitely work! Clicking that icon[2], checking the failed build[3]:

ERROR: no certificate subject alternative name matches

requested host name `pear.php.net'.

To connect to pear.php.net insecurely, use `--no-check-certificate'.

Really? See what's in http://pear.php.net/

> The server running pear.php.net had a fatal hard disk failure and gets replaced by a new machine this week. Until the new machine is setup, this page is up to let you continue installing PEAR packages via the PEAR installer.

In 2015? Cool.

Connecting to the https website ...

% openssl s_client -connect pear.php.net:443 ... Certificate chain 0 s:/CN=mail.cweiske.de

So you're using CN=mail.cweiske.de for pear.php.net. I don't even know what to say.. Well, happy hacking!

[1]: https://github.com/php/php-src [2]: https://travis-ci.org/php/php-src [3]: https://travis-ci.org/php/php-src/jobs/94372493

Re: PHP 7 Released

#158

Earlier quoted context omitted.

Wordpress alone runs 25%+ of all websites. PHP's time is clearly still now. I probably won't bother with PHP, but it can't hurt to keep my idea of what it's like up to date. It's only technology, no need to be fanatical about it.

To be fair, don't just down vote the parent comment because your don't like someone bashing php; it's a pretty reasonable question to ask. Most people don't actually know that php powers such a large portion of the internet, because globally there's waning interest in php ( http://www.tiobe.com/index.php/content/paperinfo/tpci/PHP.ht... ) and it's generally dreaded by developers ( http://stackoverflow.com/research/de…

I never suggested I wanted to get into PHP, I just want to see modern PHP to see how much of its reputation is still deserved.

Curiosity is a perfectly good reason to do things, isn't it?

Re: PHP 7 Released

#159
post #7

PHP 7 makes life a lot better for PHP devs in many ways but one awesome thing is it obsoletes bunch of out-of-date tutorials by finally removing the old Mysql extension \o/ http://php.net/manual/en/migration70.removed-exts-sapis.php I actually met a young aspiring web developer who still learned DB-access with mysql_* functions. I urged him to switch to a sane framework like Laravel. Oh boy he was happy in a month an…

aspiring web developer

Did he already know javascript? if not, why didn't you point him to that instead?

Re: PHP 7 Released

#160
post #69

Earlier quoted context omitted.

I like the IKEA parallel as IKEA is cheap. So was php (to host), hence the popularity I guess. And as a result of that, there are lots of developers.. and many equals cheap. And the vicious circle continues. Doesn't make it a good language :) (To be honest, I like IKEA, and I don't think it suck)

> To be honest, I like IKEA, and I don't think it suck Ikea sucks. Quite a bit of the furniture is just painted cardboard, the quality is absolutely horrible. It looks ok but 'under the hood' it is terrible. It is throwaway furniture, the very opposite of sustainable.

Weird, I've been using my IKEA bed, wardrobe and drawers for many years now and they're fine. Maybe I'm just happy to make do with convenience - like many PHP developers.
Post reply on HN