PHP 7 Ready For Release (softpedia.com) 159
An anonymous reader writes: After a long wait web developers can finally start migrating their code to PHP 7. The new version comes with minimal syntax modifications, and is more focused on improving performance and upgrading PHP's core interpreter. Softpedia reports: "As mentioned above, PHP 7 is focused on speed, and benchmarks carried out over the past few months, have shown it to be almost twice as fast as older PHP 5.x releases, and neck in neck with Facebook's HHVM project, a Just-In-Time compiler for PHP code." A full list of new features is available here.
neck in neck (Score:1)
neck and neck, I think.
PHP7 Performance (Score:5, Interesting)
I've been benchmarking the PHP 7 RCs against HHVM and PHP 5.6 for quite some time now with my own framework. I'm still perplexed as to why they are claiming it is faster than HHVM. Maybe in some specific benchmark? On my in-house framework, HHVM pushes nearly twice the requests-per-second performance compared to PHP 7. However, on the command line, PHP both 5.6 and 7 have a significantly faster startup time, but this point is mostly irrelevant for web servers.
Logan's run for languages (Score:5, Funny)
All languages start out cute and fuzzy then become smelly adolescents. By the time they hit 7.0 there should be a logan's run for languages.
Re: (Score:1)
I've also been benchmarking my full stack Symfony2 project, and HHVM and php7 are equally fast. (using apache)
Re:Marketing (Score:5, Informative)
I'm not saying the curators of PHP aren't semi-retarded, but the reason they jumped over 6 is because 6 was basically a complete failure. They planned it out, but never managed to deliver. Anything important or useful in v6 was implemented in v5 point releases, and when it came time to put out a new major version, the number 6 had connotations that were undesirable.
So, I don't think "marketing war" is a fair characterization.
Re: (Score:1)
I'm not saying the curators of PHP aren't semi-retarded, but the reason they jumped over 6 is because 6 was basically a complete failure. They planned it out, but never managed to deliver. Anything important or useful in v6 was implemented in v5 point releases, and when it came time to put out a new major version, the number 6 had connotations that were undesirable.
So, I don't think "marketing war" is a fair characterization.
PHP 6's big selling point was going to be Unicode support. That's what fell through. The remaining fun features (and more) eventually went into 5.x.
The problem is that a number of publishers went forward with PHP 6 books - likely to try to stay ahead of the competition. Check Amazon. There's a bunch. And that says nothing about blogs and other online sources. The decision to jump to 7 basically came down to "we'd rather deal with people asking what happened to version 6 than people complaining about how the
Re: (Score:2)
The problem is that a number of publishers went forward with PHP 6 books - likely to try to stay ahead of the competition. Check Amazon. There's a bunch.
I can confirm that there's a book, listed on Amazon under my name as author, but never actually written, for exactly this reason. The publisher went ahead and told Amazon it'd be available on such-and-such a date, then cancelled the project a month or so later. They apparently didn't bother to tell Amazon about this before going into receivership a month or two after that.
For a couple of years afterwards, I had to explain to people that, no, the book didn't actually exist and that I've no control over what
Re: (Score:1)
Re: (Score:2)
Sounds like they a great developers. They realized they had goofed and instead of trying to ram crap down everyone's throats they went away and fixed it.
Re: (Score:2)
And this is bad exactly why?
Re: (Score:2)
Funny, I seem to have no difficulty getting paid to write PHP. Can't say the same for Python, Ruby and whatever else the kids are into these days.
If it has lost its position as the predominant web language, then I guess the vast majority of hosting companies are wrong, and so are their tens of millions of clients. You really ought to tell those poor people, AC.
Re: (Score:3)
Yea, it's whale guts all over the place.
I will say PHP7 might be a huge break from that. The parser changed to be a lot more sane and they finally deprecated all those mysql_ functions. There are a lot more real exceptions in core libraries instead of errors that silently get discarded.
I dunno...it looks a lot less crap. But let's get things straight. PHP4/5 are garbage from a design perspective. There is a lot wrong with their type system. Oh and PHP7 has a type system..that's been bolted on. eh... I'm sur
Re: (Score:2)
That is, of course, aside from the fact that the "freedom" offered by PHP is similar to the freedom you have to wear a ski mask in a bank.
Re: (Score:2)
Agreed (minus the personal attack)
PHP, much like Perl, gives you the flexibility to shoot yourself in the foot if you so desire (or don't know any better).
That's not PHP's fault. Just because other languages and compilers treat the programmer as a helpless child does not mean those languages are better at getting work done. They're just designed around the reality that the vast majority of programmers today are extremely naïve and underqualified. It's like putting a blade guard on a manual can opene
PHP has not yet been released (Score:4, Funny)
Unlike slashdot's normal habit of running behind the times with news stories, this one is too early.
PHP 7 is slated for a full release tomorrow.
Good job guys....
Re: (Score:2)
PHP 7 is slated for a full release tomorrow.
Yeah but I won't be able to use it until 2020 because all the commercial hosting servers are still running PHP 4.
Re: (Score:2)
You mean there are downsides to $6.00/month hosting packages? Who knew?
Re: (Score:2)
You can get a virtual private server for about $15 a month and run whatever version of whatever you want on it. There's little advantage to going with a shared host for $6 unless you just want to do something extremely basic.
Re: (Score:2)
Yes but then you have to know how to keep it up to date or it's yet another zombie waiting to happen. I'd rather most people went with a higher quality hosting service.
Also, $15 is expensive. I pay a lot less than that on OVH.
Re: (Score:1)
Who cares?.. (Score:1)
Re: (Score:2)
it's there on Windows
Re: (Score:1)
Kind of important when dealing with cloud servers and big data transfers.
Cue the haters (Score:5, Interesting)
Cue the PHP haters to flood this topic with endless criticisms and loads of "it's SO awful" stories about how terrible PHP is.
I've said it before and I'll say it again: I like PHP, and coding in it enabled me to make a shitload of money over the last dozen years or so. It still makes me money every single day, and all at a cost to me of almost nothing. Linux, Apache, mySQL, and PHP -the classic LAMP stack- has been very, very good to me.
Hate on it all you want, but working alone in my little home office I learned and used PHP to make more than enough money to buy a nice home, travel the world, support my family, and live a very comfortable life.
Is it the "best" language? I have no idea, but it's good enough for me and that's what counts.
So please, feel free to tell me how terrible and horrible it is. :)
Re: (Score:2)
I thought most of the PHP haters were Microsoft Visual Studio guys.
I wonder. Do the evangelists still roam the internet trash talking any language not approved by the big M?
Or did that go the way of the dodo when Microsoft decided to make hell freeze over by releasing Visual Studio for Linux?
I must admit, the hate boards have been rather quiet for the last year or two.
Re: (Score:2)
I wonder. Do the evangelists still roam the internet trash talking any language not approved by the big M?
I have no idea. Frankly, I couldn't care less what Microsoft likes or doesn't like. Or more accurately, I just hope they stay away from anything in the LAMP stack so they don't fuck it up.
I can see it now: "Microsoft PHP(tm)- from the same great team that brought you Clippy and Microsoft Bob!"
And of course it would be just incompatible enough with the real PHP so as to cause lots of fucky little problems that would be practically impossible to track down. But thankfully they don't seem to be interested in i
Re: (Score:2)
And of course it would be just incompatible enough with the real PHP so as to cause lots of fucky little problems that would be practically impossible to track down. But thankfully they don't seem to be interested in it at this time- they're too busy fucking up Skype to bother with something like PHP. Maybe when they're done ruining Skype they'll have time to make a proprietary, retarded version of PHP.
Wait, you mean like, Microsoft is going to develop HHVM?
Re: (Score:2)
Wait, you mean like, Microsoft is going to develop HHVM?
Oh shit. Time to retire and move to an island in the South Pacific.
Re: (Score:2)
Fair assessment.
At least you're not being mean about it.
Re: (Score:2)
Is that still the case since Microsoft released Visual Studio for Linux?
Re: (Score:2)
Just because you made a fortune selling manure shoveling shit doesn't mean it doesn't stink.
PHP, like Javascript, are complete clusterfucks written by people who don't have a fucking clue how a good language is designed.
Re: (Score:2)
Just because you made a fortune selling manure shoveling shit doesn't mean it doesn't stink.
So what? I still made a fortune. :)
-
PHP, like Javascript, are complete clusterfucks written by people who don't have a fucking clue how a good language is designed.
And guess who doesn't care? (Hint: it's me!)
The point is, Mr Language Snob, that I really don't give a flying fuck how much you hate PHP and Javascript.
PHP and Javascript enable me to live in a nice home and drive a nice car and go on vacations with my wife whenever and wherever the fuck I want. You only wish you could live so well, lol.
So by all means- be as smug as you want in your dreamy little Language Superiority Fantasy land. Just make sure you do your job and wipe
Re: (Score:2)
> So what? I still made a fortune. :) /sarcasm Who needs quality when we can fuck over our customers with insecure crap!
If you're not part of the solution you are part of the problem, but I see all you care about is money.
> PHP and Javascript enable me to live in a nice home and drive a nice car
Here's your cookie kid. I could sell drugs and have a nice home and nice car too.
> You only wish you could live so well, lol.
Typical bogus Strawman argument that has _nothing_ to do with how shit PHP is.
All
Re: (Score:2)
If you're not part of the solution you are part of the problem, but I see all you care about is money.
Oh no, I care about my wife and my son and my businesses, and I care about my hobbies and I care about if it's going to be too hot in Thailand when we go there in the next few weeks and I care about my neighbor who's not been feeling well lately, and so on and so forth. There's lots of things I care about besides money. The money just allows me the freedom to care a little bit more effectively. :)
-
I could sell drugs and have a nice home and nice car too.
Yes, but that would be illegal and what I do isn't illegal. Besides, I doubt a hoser like you would last 5 minu
Re:Cue the haters [language feature wishlist] (Score:2)
To be fair, all the common scripting languages suck. C#/VB.net is actually a fairly decent "compiled" language (ignoring the MS API's and environment).
But, the common scripting/dynamic languages out there all suck in different ways. (I suppose a lot of it is subjective.)
Here are the main features I'd like to see in a "production" dynamic language:
* Non-type-tag-based type system. W
Re: (Score:1)
Bad day? Your rage, anger & elitism stinks. Haven't posted in a decade but to say that.
Agree with OP. 20 years now I've made a great life from PHP, Linux, MySQL, blah blah, and what you may consider other "manure".
Right tool for the job. A lot of IT is shoveling manure, so why not use PHP? ;-)
Re: (Score:2)
Is it the "best" language? I have no idea
We know the answer to this one.
Re: (Score:2)
Security issue prone? Check.
Awkward OOP? Check.
Re: (Score:2)
Bug prone? Check.
Security issue prone? Check.
Awkward OOP? Check.
Made me a shitload of money? Check.
Re: (Score:2)
Re:Cue the haters [job security vs. good] (Score:3)
Job security and "good language" are very different things, and perhaps inversely related. The screwier the language, the more time it takes a coder to work with it. More paychecks for you, perhaps, but the company could be paying more compared to a "good" language.
It's like asking an auto-mechanic if a Ford Escort car is any good. Good to own, or good for his wallet?
I'm not judging PHP here, just questioning the
Re: (Score:2)
I'm not judging PHP here, just questioning the perspective of your metric.
Ii understand. My metric is pretty real-world based, that is, does it make me money? And the answer is "yes".
I'm willing to overlook or ignore a lot of other metrics when it comes to putting food on my table or supporting my family.
Sometimes "good enough" is good enough. For me, PHP is certainly "good enough". None of its bugs, warts, or annoyances (of which there are plenty) make me lose one minute of sleep.
Re: (Score:2)
Re: (Score:2)
...but I will never do a new system in a language that is unable to save the state of things between a request and another without requiring hacks like putting lots of things in the user session
Well, good for you. I'm glad that you let a consideration like that drive your choice of language and development path. I, on the other hand, have stuff to do and PHP lets me get it done. I don't really care, because as I've said repeatedly, it makes me quite a bit of money and keeping my family fed is far more important to me than some heinous blather about what it does with user sessions.
PHP is shit to develop information systems, get over it.
Sure it is, but it's made me a shitload of money, a concept you seem to have difficulty grasping. Lil' ol' me, working
Re: (Score:1)
And if you are more of those with serious
Re: (Score:2)
Re: (Score:2)
It is not "snobbery", my dear moron...
It's snobbery or elitism, take your pick. Why you feel compelled to whine about a particular language is of no real interest to me. Feel free to snivel all you want.
By the way, what language have YOU written that's become incredibly popular and runs on practically every platform in existence? What language have YOU written that's in use on hundreds of millions of web sites?
Recently I could not attend a change requested by one client because of the PHP can not blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah....
Yeah, sure, whatever. Guess it sucks to be you, forced to use a language that raped your mom, shot your dog, ate all your ice cream and
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Well... It's because unlike you I work in the real world and have real-world problems,
Oh my god, that sounds simply dreadful. The "real world", ewwwwwwwwwww!
Re: (Score:3)
This problem is inherent to the http protocol itself. It is simply not possible to store state when the connection is designed to drop between requests.
Re: (Score:2)
Re: (Score:2)
Re: (Score:1)
The arguments on PHP noted in http://eev.ee/blog/2012/04/09/... [eev.ee] are valid point which show that as a language and framework PHP is a mess. This has nothing to do with hate (even though the post sounds like that), it is an honest criticism of the language and framework.
However, if it serves you to build software with PHP, as you have clients who want that, then this is totally fine. Obviously your customers are willing to pay a lot more for development time than necessary. Or you are implementing rather smal
Re: (Score:2)
The arguments on PHP noted in http://eev.ee/blog/2012/04/09/... [eev.ee] are valid point which show that as a language and framework PHP is a mess.
Yes, PHP has lots of problems, and I couldn't care less. It works very well for me and in my world that's where the rubber meets the road. Sure, PHP has a ton of warts, etc etc etc, and the fact is that I don't care one bit.
-
However, if it serves you to build software with PHP, as you have clients who want that, then this is totally fine. Obviously your customers are willing to pay a lot more for development time than necessary.
The only client I have is me. I build what I want, when I want, the way I want. And so far I've done pretty damn well. I don't know if I'd say that I've been a "smashing success", but I will say that I've done damn well. As I've said, PHP has enabled me to live quite comfortably, travel
Re: (Score:2)
Most of PHP's quirks are because it does not abstract you very far from C. And I know the author claimed that this wasn't a valid point, but it really is. PHP is an interpreted C with mandatory sigils (dollar signs) and basic support for classes. Every release seems to move it even closer to C, because that's the language that a lot of people know and are comfortable working with.
What makes PHP crucially different from C is that it is an interpreted language, which means you don't have to recompile and
Re: Cue the haters (Score:2)
The cause of the mess is most likely also known to the author of the blog post. Still it is not a good language design and that is what all the critic is about.
Re: (Score:1)
Only a Sith deals in Booleans.
Re: (Score:3)
If you are not with me you're ?TYPE MISMATCH ERROR
Re: (Score:2)
I am 65 and retired, and I use hater all the time. So, so much for your theory. I also noted that he was willing to post with a name, as opposed to hiding behind anonymous. Which degrades your post even further in my humble opinion.
I have worked in several major corporations and with probably every language you have ever heard of and then some, and PHP is no different than any there - it is no more secure or insecure than the programmer makes it and the application it is used in.
But, have fun hating, it see
Re: (Score:1)
Oh, look, it's a Millennial/Hipster pretending to be an "old guy".
Only Millennials/Hipsters use the term "hater".
And only Millennials/Hipsters are stupid enough to consider solid technical arguments pointing out severe flaws in a given piece of technology to be "hate".
Dude, what's with all the hate, man?
You can talk about your "severe flaws" all you like, brother, but here, on Slashdot... we love you, man.
How about a hug?
Re: (Score:2)
I think I can answer your question, as Mr. comfortable PHP guy's story isn't so different from my own.
1) PHP isn't the point. Solving a need is. Find a need and devise a solution. Bonus points if there are no other solutions on the market. /your dog.
2) Make a solution that works better/cheaper than anything else that compares. May or may not involve PHP/ Python/ Go/ Lua/ Javascript/ Assembler
3) Sell your service to people who need it. Manage it carefully, make sure it really works and keeps getting better.
4
Hey hipsters OTP greater than PHP 7 ?! (Score:2)
Erlang is the shittier man compared to PHP and is sooo kewl with this new version of Erlang called "Outlaw Techno Bitch!?" It's the new trend with your NoSQL database
See all the details here [youtube.com]
Re: (Score:2)
I'm too good for Erlang. I only code in Golang, Rust, and other languages nobody uses.
The right job for the tool (Score:3)
So I just...uhhh...happened to be on this site called imagefap.
They have a banner on their front page advertising for PHP devs.
And I couldn't help thinking that someone has finally found an appropriate use for PHP...
I'm looking forward to this. (Score:2)
I started working in php when version 3 came out.
I feel like I've really grown as a programmer since then, and I've done my best to stay on top of the new features and practices in subsequent versions of php.
Reviewing the new features for php 7, I have to say that I'm excited about the strong typing features, especially. HHVM was appealing because they got there earlier, but it's nice to see the main branch of php getting to a place where everybody agrees that statically typed code is a good idea.
I may not
Re: (Score:2)
Current version seems to be the exception.
But historically, php has been a fantastic prototyping language.
You can do things very quickly in php when you get fluent in it. The adhoc nature of the thing makes it great for developing one offs.
That's changing though.
The new version feels like it's a lot more formal than older ones.
I may be wrong.
Give me a week, I'll tell ya.
What about Unicode support? (Score:3)
Re: (Score:2)
If I'm not mistaken, that was the goal of PHP 6 and they abandoned it.
Re: (Score:2)
Do you have an example of a particular function?
A lot of the old "core" functions do not support UTF-8. They support only single-byte encodings (pre-UTF8, ex: deprecated KOI encodings).
To give a silly example, mb_strtoupper() should be used instead of strtoupper(). http://php.net/manual/en/funct... [php.net]
Re: (Score:2)
Do you have an example of a particular function?
For example, ctype_upper() http://php.net/manual/en/funct... [php.net]
There is no mb_ctype_upper. I wrote a workaround, for about 5 - 7 lines, but it would be nice to have this function for Cyrillic letters too.
Re: (Score:1)
No it has not been released officially (Score:1)
The tag was made, but tags can change. no official release statement has been made yet.
Re: (Score:2)
Horrors addressed: 0 ... but at least now you have the option of statically typing variables, it seems.
Re: (Score:2, Insightful)
"I need static typing" == "I'm too lazy to keep track of what I'm doing with my variables"
Re: (Score:1)
Doesn't matter anyway, apparently I was too lazy to read it right too. They only added strict scalar type declarations for function parameters and return values; not quite the same thing.
Re: (Score:3)
Static typing is really helpful if you want to compile, because the function knows ahead of type the data types that will be passed in.
Re: (Score:1)
PHP has addressed several of those issues over time (and in 7). The author of that blog seems to be updating it as things are fixed.
7 is far less of a fustercluck than 5.2-5.3 (Score:5, Informative)
The last time I compared Eevee's "fractal" article [eev.ee] to ManiacDan's "hardly" rebuttal [devshed.com], I found that PHP's alleged problems fit into two categories: those that can be easily worked around with coding standards [pineight.com], and about a half dozen real issues [slashdot.org].
PHP 7 has completely addressed one of the real issues, namely parse errors in include being fatal, by introducing engine exceptions. Function argument and return value type hints add some of the benefits of Python-style strong typing to PHP. And though associativity on ?: is still on the less useful side for reasons of backward compatibility, the new null coalesce operator ?? is on the proper side for chaining.
Re: (Score:1)
Ignoring the fact that ManiacDan's rebuttal can hardly be called such, because it's basically a bunch of clueless ramblings by an amateur developer who doesn't understand why he's wrong, I notice your supposed list of actual problems misses an awful lot of real actual problems. I can only conclude therefore that you're a PHP fanboy. Honestly, anyone with even the slightest clue about programming languages (we're talking CS101 level of education) would read ManiacDan's post and be able to spot the countless
Re: (Score:2)
Re: (Score:2)
If you have four cores and three requests in PHP, each request can run in a PHP process on a separate core, with a persistence layer such as MariaDB on the fourth. This stateless model makes threading not quite as critical as it would be in a more stateful application server model. Perhaps what was meant was the use of multiple threads to serve a single request or more batch-like processing in the background.
Re: (Score:2)
(...) Java runtime not using the native multi threading implementation (...)
Well, AFAIK you cannot perform processing affinity on Java threads. And also AFAIK it's not part of the POSIX standard, so it's often up to the system scheduler (depending on whether you're using a userland implementation or a kernel-based one) to decide that. You ASSUME it will use all cores.
the realistic use case happens to support multiple processors
The realistic case is that you have no control over this in Java or a standard POSIX implementation. However, eg. Linux does provide extensions for this.
Also one of the features of multi threading is working around blocking API calls, one thread can work while the other is in sleep mode waiting for data from network or disk and the CPU would be otherwise idle ( of course using an async API when available is better ).
I'd suggest you look at some async subsystems to realize this oft
Re: (Score:2)
That's not naivety, that's a deficiency in PHP, you're fobbing it off as a problem in understanding, when in reality it's simply that PHP is poorly designed.
Well, I did quite some work in assembly. I didn't have any thread mechanism available as a core feature of the language, so I'd assume you'd also say CPUs are poorly designed.
There's nothing inherently wrong with wanting to send something off for processing in the background so that the main execution thread can return a response to the user.
No, there's not. What is wrong is the notion that you can only accomplish this by using threads.
The fact PHP can't do that is a problem with PHP, not naivety on behalf of someone wanting to do that because it's sometimes a legitimate thing to be able to do.
Sometimes I want to be able to issue syscalls. Its a legitimate thing to be able to do, and PHP doesn't allow me to do it easily. Or manage how memory is allocated. Or see an assembly dump of what's being executed. Well, its a limitation. So
Re: (Score:2)
Thanks! (Score:2)
I just wanted to thank you for those other links. I enjoyed reading the various opinions about PHP and its problems, and that was well worth the negative score I got for my comment.
Re: (Score:2)
Re: (Score:2)
Go ahead and reuse this or any of my past signatures [pineight.com].
Re:Is it still a clusterfuck? (Score:4, Funny)
public static void main(String[] args){
Scanner scannerToReadAirlines = null;
try{
scannerToReadAirlines = new Scanner(new File("airlines.txt"));
}
catch(IOException e){
System.out.println("Could not connect to file airlines.txt.");
}
if(scannerToReadAirlines != null){
ArrayList<Airline> airlinesPartnersNetwork = new ArrayList<Airline>();
Airline newAirline;
String[] airlineNames;
}
}
Re: (Score:1)
Here is the php5 version
<?php
$airlinesPartnersNetwork = file('airlines.txt');
Re: (Score:2)
A more PHP5-esque implementation would probably use the SplFileObject class.
But no, you're right, what the internet needs is more examples of how to use the language badly. I'm sure I could come up with a dated, not-recommended way of opening a file in $arbitraryLanguage too.
Yes it is (Score:2)
And it will stay that way for the foreseeable future, as fixing things would require to come up with a new language. This would be a little bit like VB6 to VB.net transition. VB6 not even had a grammar. And I do not mean they did not publish a grammar, MS did not have one. When they developed VB.net they had to come up with one. Therefore, not everything could be realized in the new language.
To make PHP a language which can be used without harm, it needs strong typing. Strong and static typing helps people
Re: (Score:2)
how slow it was
Contrary to popular belief, most applications doing real useful work wait the same time for the database, regardless of the language. Maybe a "hello world" is not a good example.
Re: (Score:1)
You can always try running this on your code first : https://github.com/wimg/PHPCompatibility