Live data from Hacker News

Things you should know about PHP 7

pages.zend.com

81–90 of 124 posts

Re: Things you should know about PHP 7

#81

Earlier quoted context omitted.

> 1. Scheduled to come out in Q4 2015 Which won't happen, I can tell you. PHP's release dates always slip by at least a month, and that's without a very unstable master branch like PHP 7 has. If it does happen, it'll take a few micro (7.0.x) releases until it reaches stability. > 3. Return Type Declarations & Scalar Type Hints Also strict scalar typing: However, Zend not mentioning this is to be expected. The company…

> biggest opponents of strict typing in PHP Umm, well I saw Zeev has voted in favor of scalar type hints on the RFC?

He did vote in favour of the RFC. However, this was reluctantly, at the last minute, and under pressure. He is very much opposed to strict types, but he felt this was the only way scalar types would get into 7.

Re: Things you should know about PHP 7

#82
post #7

Earlier quoted context omitted.

So 1 is not a feature, 4 & 5 are the same thing (and maybe a consequence of 3) while 2 can be remplaced by a single function. Seems like the only new feature are type hints. Looks like Hack has been rebranded as PHP 7.

There are tons of new features, this list is pretty pathetic. I'm not sure why the spaceship operator got top billing when there has been so many other great changes.

Because it has a cool name.

Re: Things you should know about PHP 7

#83

Seeing this: > function add( ... ): float {} I think a much better choice would have been: > float function add( ... ) {} Or just: > float add( ... ) {} Since that's how it's done in other languages and people would feel at home with it.

The idea is that the old php syntax "function foo ()" remains unchanged [1] so developers can keep searching for "function foo". Removing "function" as keyword is a different topic and is discussed in a separate php thread [2]. The thing you mention ("float function add(){}") keeps the option to search for "function add", but I am unsure why this is not taken into account in this proposal. Anyhow, I am pretty happy t…

Having 'function foo' be grep-able is _wonderful_. My last language, Ruby, isn't very grep-able, but my current one, Rust, uses 'fn foo', and being able to just use 'git grep' to find things is _wonderful_.

Re: Things you should know about PHP 7

#84
post #71

Earlier quoted context omitted.

Shared hosting does mean that your provider is likely keeping their platform patched and up to date, which is possibly painful for you but likely nice for everyone else. The alternatives seem to be giving customers a VM or a dedicated server which tends to mean it's _never_ going to get any security updates since the day it was first set up. Shared hosting is a pain, but the alternatives have the potential for even m…

As a former herder of dedicated servers purchased for this sort of thing, you'd be surprised how difficult it is telling people they need to pay to upgrade it. We had a client with an old supermicro P3 running red hat 7 (not RHEL) until last year. Genuinely surprised it lasted as long as it did. Edit: it was RH7, not RH5. Just checked. Still bad.

I used to work as a DCO in a relatively large DC. It was always slightly terrifying when you'd be asked to investigate a customers unresponsive dedic only to find out it's attempting to boot ubuntu 6 LTS. "Well I don't see why it's broken -it was working absolutely fine and we've not touched it in years!"

Re: Things you should know about PHP 7

#85
post #12

Earlier quoted context omitted.

Why?

The security implications and unpredictable resource availability never made it feasible to run a real production site from shared hosting.

Yes, many shared hosts suck, but so do many VPS hosts. It doesn't mean shared hosting is an unworkable model.

Re: Things you should know about PHP 7

#87
post #55

The spaceship is actually a lot cooler than many PHP devs realize. Rails devs find it extremely handy. Now that my PHP apps are moving away from being big apps that render full web-pages, and towards being a thin application layer that just renders JSON, I'm finding a higher % of my code is just sorting operations. Closure has helped a lot with this, and nearly all my s are almost certainly going to be in the form of…

> Now that we're finally actually making a proper PHP spec, I'm not as excited about 4 and 5 as they'd like us to be.

I was the only person who seemed to care much about the spec, and I quit. The spec has several broken tests, numerous omissions and inaccuracies, and doesn't mention any of the really important PHP 7 features.

I'm not too optimistic.

Re: Things you should know about PHP 7

#88
post #12

Earlier quoted context omitted.

Why?

The security implications and unpredictable resource availability never made it feasible to run a real production site from shared hosting.

It depends on the hoster and how much you're willing to pay. If you're paying $2.99 a month then yes, you're probably going to have a less than predictable experience.

I work for a shared/dedicated hoster, we're geared price-wise at the higher end of the market and we provide shared hosting for our business customers.

Our shared environments are closely monitored and never oversubscribed. We're constantly looking out for customer sites that misbehave and shut down those that are resource hogs or service affecting.

We have loads of customers running the internet facing parts of their businesses on shared.

Shared hosting, like all other things, is a case of "you get what you paid for".

Re: Things you should know about PHP 7

#89

Note this is just Zend's take on what's important in PHP 7: it's not a complete list. A more comprehensive list: - Dual-mode scalar type hints (weak by default, toggleable to strict via a per-file syntax) ( https://wiki.php.net/rfc/scalar_type_hints_v5 ) - Return type declarations ( https://wiki.php.net/rfc/return_types ) - operator ( https://wiki.php.net/rfc/combined-comparison-operator ) - Null coalesce operator (?…

OH man I want that Null coalesce operator so bad...

I feel like I've needed that since I first started coding PHP 17 years ago!

Re: Things you should know about PHP 7

#90

Earlier quoted context omitted.

Thank you. This website is completely useless on mobile.

Also doesn't work when EFF's Privacy Badger is running.

Move the slider for magic.piktochart.com to the middle position (yellow - allow content but not cookies).
Post reply on HN