Off topic, but curious - Is there any discussion on whether there will be a support for a good concurrent programming in PHP in the future? (e.g. channels in Go & Elixir) - of course, you might say "you're using the wrong tool.."
I don't know if you can classify it as "good" concurrent programming but there's this https://github.com/krakjoe/pthreads EDIT "pthreads v3 is restricted to operating in CLI only" - from the project page.
Upcoming changes in PHP 7.1
71–80 of 137 posts
Re: Upcoming changes in PHP 7.1
#72Earlier quoted context omitted.
Better yet, don't reinvent the world and just use commas?
Commas are used in PHP as a sequence of things, not multiple options. This single-pipe notation is already established as the further-up comments states.
Choosing a pipe because it's easier for an obscure language feature, is not least astonishment. Commas are used for lists. The pipe is a bad choice among a nice feature.
Re: Upcoming changes in PHP 7.1
#73Is there any good introduction for people how "know" PHP4 and want to get started with PHP7, using best practises?
Re: Upcoming changes in PHP 7.1
#74Off topic, but curious - Is there any discussion on whether there will be a support for a good concurrent programming in PHP in the future? (e.g. channels in Go & Elixir) - of course, you might say "you're using the wrong tool.."
React has been around for a while - http://reactphp.org/
Re: Upcoming changes in PHP 7.1
#75Earlier quoted context omitted.
I was talking more about the inconsistency between return type void when it returns null. I'm asking whether this behavior has changed and functions without a return will now return void or ???. It's a pretty big inconsistency IMHO.
Even if you have a point it wouldn't matter because making void functions return something else than null would be a big (useless) BC break. There's a lot of code that uses "return;" to mean "return null;" and honestly I don't see it as a big problem.
Re: Upcoming changes in PHP 7.1
#76It is a stupid, stupid piece of crap. It is very hard, even for people with more than 10 years of experience, to know all the potential gotchas that are hidden deep inside this death trap of a language [1]
You will be surprised how casual the actual core development of the language is. Tiny behaviours are added, modified and removed with little or no thought and with as little justification as "This doesn't make sense to me" or without any sort of notice at all [3]..
[2] Here is how Php 7 tries to "improve" security of a function...
And the community. Is there a more shittier community than that of this language? It is dominated by people with drama loving, infantile minds.
Keep as far as possible from this language, if you have to work with it, wear on a mental condom before you start and never involve in any kind of Php discussions.
[1] https://www.reddit.com/r/PHP/comments/41bm7j/new_rfc_allow_s...
[2] https://www.reddit.com/r/PHP/comments/3j88v4/something_about...
[3] http://stackoverflow.com/questions/14703363/why-is-the-stand...
Re: Upcoming changes in PHP 7.1
#77Don't use Php. Just don't. It is a stupid, stupid piece of crap. It is very hard, even for people with more than 10 years of experience, to know all the potential gotchas that are hidden deep inside this death trap of a language [1] You will be surprised how casual the actual core development of the language is. Tiny behaviours are added, modified and removed with little or no thought and with as little justification…
Re: Upcoming changes in PHP 7.1
#78Don't use Php. Just don't. It is a stupid, stupid piece of crap. It is very hard, even for people with more than 10 years of experience, to know all the potential gotchas that are hidden deep inside this death trap of a language [1] You will be surprised how casual the actual core development of the language is. Tiny behaviours are added, modified and removed with little or no thought and with as little justification…
The language is not perfect (is any?) but it works and delivers business value.
If it's not your cup of tee, that is fine, but I don't see you promoting better solutions, just bashing on PHP. Some people think that that is cool, well, it's not.
Re: Upcoming changes in PHP 7.1
#79Don't use Php. Just don't. It is a stupid, stupid piece of crap. It is very hard, even for people with more than 10 years of experience, to know all the potential gotchas that are hidden deep inside this death trap of a language [1] You will be surprised how casual the actual core development of the language is. Tiny behaviours are added, modified and removed with little or no thought and with as little justification…
Seriously though, it's just a tool. Sometimes it's the right tool. I come from working with other dynamic languages to using (modern) PHP daily in my current job and it's fine. Absolutely fine to work with. Does it have gotchas? Sure, just as much as any other language.
Re: Upcoming changes in PHP 7.1
#80Earlier quoted context omitted.
If you're using type signatures, the alternative is probably going to be that your program crashes at a later time. "Foo is not a Bar" is a better error message than "$foo->xyz() isn't a function", and this happens much closer to the point where you've messed up.
I disagree. I think that this type of "late type binding" is actually an advantage of dynamically typed languages. That way it does not matter if you pass a map/array/dictionary or an instance of a class as long as the properties are the same.