PHP 7 Ready For Release (softpedia.com)
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 and neck, I think.
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.
IT seems also Php is involved in major version number marketing war.
The php.net website only shows an RC.
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....
All I see is release candidates. Is softpedia jumping the gun for page views?
https://downloads.php.net/~ab/
Horrors addressed: 0 ... but at least now you have the option of statically typing variables, it seems.
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.
You are referencing an article that is over 3 years old. PHP has evolved a lot since then. Not to mention the web in general. Also a majority of that article is personal opinion. Some of it is by design. No horrors, just a different language that is evolving to adapt to new needs.
"I need static typing" == "I'm too lazy to keep track of what I'm doing with my variables"
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.
Or it means you're working on a large or complicated application and want to be able to reason locally about what methods do without examining every caller of the method.
No, it's a horror.
And you don't consider that the retards who made HHVM didn't do exactly the same thing?
Under various circumstances HHVM outperforms PHP5 but the way they approached it is just an design-atrocity.
While they could have done something intelligent as translating the PHP source code on a high level, but instead they just
take out the bytecode, add all kinds of limitations to it in order to speed up the process and then claim it is so much faster.
PHP has been a clusterfuck for so long that three years is pretty much meaningless.
And no, the problems with PHP are not opinion. They're real.
It is absolutely full of horrors.
Something that is broken by design is still broken.
Where's our 64-bit support?..
Thanks, your check is in the mail
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.
PHP - a horribly insecure remote shell that's also kind of a programming language.
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. :)
Just cruising through this digital world at 33 1/3 rpm...
Only a Sith deals in Booleans.
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
http://saveie6.com/
The last time I compared Eevee's "fractal" article to ManiacDan's "hardly" rebuttal, I found that PHP's alleged problems fit into two categories: those that can be easily worked around with coding standards, and about a half dozen real issues.
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.
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 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 seems to be what you are best at.
And like to write functions that can handle every single type used in my program, including all the ones I add in future.
The author of that blog is a fucking moron and I've called him out on it plenty of times.
Or it means you're working on a large or undocumented application and want to be able to reason locally about what methods do without examining the documentation.
There you go.
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.
Some drink at the fountain of knowledge. Others just gargle.
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 feel this way in a few months.
But for now, I'm on cloud 9.
This signature has Super Cow Powers
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?
This signature has Super Cow Powers
I remember coding something in PHP about 12 years ago and couldn't believe how slow it was compared to other languages for relatively simple code. I came to the strong conclusion that its deliberately slow so they can sell speed up tools etc, it all made perfect sense from that point. Its amazing how popular php became with this dark little secret, I am impressed their business model did so well, quite clever indeed.
All of them have been addresses. Below is sample code of what PHP7 looks like
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;
}
}
Slashdot, fix the reply notifications... You won't get away with it...
If you are not with me you're ?TYPE MISMATCH ERROR
I use Macs for work, Linux for education, and Windows for cardplaying.
Static typing is just concise, computer-checkable documentation...
If you're bothering to write up-to-date docs, but eschewing static typing, then something is deeply wrong with your brain.
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 perspective of your metric.
Table-ized A.I.
Some PHP 5 functions do not work correctly with UTF-8 encoding of Cyrillic alphabets. There is usually a work-around. Still I am curious if there will be some updates of Unicode support in PHP 7?
SWEET! It's like PHP has almost caught up to 1996's Java! AWESOME!
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. Whether "123.4" is a string or number depends entirely on the operation acting on it. You don't have to test for a hidden type tag/indicator. I hate those. I want WYSIWYG typing for scalars. Perl and ColdFusion almost got it right. (Perhaps it can store probable numbers as floating point under the hood as a speed optimization, but such "compression" should be hidden from the programmer and not affect results/output.)
* No overloading of common operators such as "+" for both addition and string concatenation. And better syntax or built-in functions to explicitly indicate comparison types. Perl almost got it right, but it's too easy to forget and cross confuse. There are some interesting solutions to this.
* No white-space block indicators, per Python/Ruby. Use either {...} and/or foo...end foo.
* Optional and optionally named parameters. MS's recent languages did this fairly well.
* Better parameter type checking options/syntax (via parsing if need be).
* Type name should come after variable name in declarations, not before. The C family fucked this up. Pascal and VB do it better.
* Modern set-based switch/case statement. C's "break" is fucked.
* A real OOP system, not JS's anonymous function-based bastard.
* Don't sacrifice rank-and-file features for cutesy FP or meta-programming. I'm not necessarily against those, just don't screw up the regular parts to make FP/meta easier or shorter if a trade-off arises. Take care of business before you go Lisp-y or hacky.
* Maps and objects are the same thing. It's one of the few things JS almost got right.
* One-based indexing for string dissection. It makes the string functions much cleaner than zero-based.
Table-ized A.I.
That's the purpose of type relations such as hierarchies...
If you're having trouble achieving that ability with static typing, then your designs are poor, and your thinking is probably muddled.
Dynamic typing is for weak, unorganized, amateur minds.
Here is the php5 version
<?php
$airlinesPartnersNetwork = file('airlines.txt');
Actually, that's the php4 version. You haven't used any features 5 brought to the language. Specifically, 5 was a massive leap forward in terms of OOP.
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.
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 to avoid mistakes. You can see what happens when you allow to much dynamic typing, like in Groovy, which can compile, but then at execution fail randomly because one type case was not considered. This also may happen when some other class and code is changed.
And the second thing is library cleanup.
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.
Just cruising through this digital world at 33 1/3 rpm...
The tag was made, but tags can change. no official release statement has been made yet.
Seriously, who's still using PHP, in TYOOL 2015? I say that as someone who spent a couple years coding in it. But right now webdev is all about nodejs and angular/react.
No wonder Slashdot is dying.
"I need a high level language" == "I'm too lazy to write assembly code"
"I need a procedural language" == "I'm too lazy to keep my code clean enough that it's obvious what my gotos do"
https://wiki.theory.org/YourLanguageSucks
I guess I'll start upgrading all my legacy PHP projects to this new major version, there shouldn't be any "compatibility issues"...
PHP still wants to be javascript, that's so cute. It's like a blubbery down syndrom flipper baby with big beautiful eyes.
Wake me up when PHP can do one simple thing that I can do with nodejs.
var sockets=[];
var IO=io.of('/dataIO');IO.on('connection',function(socket){ sockets.push(socket); });
That isn't very much, but what it allows is direct control and the ability to single out all of the individual connections to the server allowing data to flow from one person to another in real time. PHP can't do it, and it's pathetic.
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.
> Dynamic typing is for weak, unorganized, amateur minds.
Oh? Weak, unorganized, amateur minds like John McCarthy, Niklaus Wirth, Alan Kay, and Seymour Papert?