Although the first alpha build of PHP7 was released just two weeks ago, the second build is already being rolled out. A variety of issues from 5.6 have been fixed as part of version 7's alpha build, and a rather comprehensive overview of new features and other language changes have been posted on PHP's official GitHub repository. Some of the most notable improvements are the boasted performance enhancement over PHP5.6, claimed to be up to twice as fast on 64-bit systems, and the well-debated inclusion of scalar type hints.
Additional history of the drafted and implemented changes for version 7 can be seen at the PHP Request for Comments Wiki.
(Score: 2) by MichaelDavidCrawford on Thursday June 25 2015, @01:40PM
It's not that I regard PHP as a bad language. Rather it gets that reputation because it is favored by clueless newbies.
Yes I Have No Bananas. [gofundme.com]
(Score: 0) by Anonymous Coward on Thursday June 25 2015, @02:05PM
Wasn't that the case with Java and C++ at some point?
(Score: 3, Interesting) by MichaelDavidCrawford on Thursday June 25 2015, @02:43PM
A client asked me to figure out why his server kept crashing. Youre running out of swap spave because of memory leaks in your java app. But thats not possible java has garbage collection. That because suns marketing people lied to you.
I set up a cron to reboot every night.
Bjarne intended for c++ to solve many problems but for that to happen you have to write c++ the way it is meant to be written.
mike whats that there in your source. its an initialization list. whats that? it enables transactional commit rollback object initialization.
100 programmer years in a single executable and they had never even heard of initialization lists.
Mentor Graphics adopted c++ because object oriented code is reusable. what they got was a clusterfuck. good assembly is reusable but bad c++ is not.
Yes I Have No Bananas. [gofundme.com]
(Score: 2) by M. Baranczak on Thursday June 25 2015, @07:12PM
Youre running out of swap spave because of memory leaks in your java app. But thats not possible java has garbage collection. That because suns marketing people lied to you.
Did anyone from Sun ever actually claim that memory leaks are "impossible" in Java (as opposed to "much less likely")? Or did you just make that up?
(Score: 2) by MichaelDavidCrawford on Thursday June 25 2015, @07:29PM
I dont know about sun specifically but java fans iften make that claim.
optimize-it was a java leak detector that borland sold for thousands of dollars per license.
i dont regard java as being less likely than C++ to leak. it's easy to write leak free c++.
Yes I Have No Bananas. [gofundme.com]
(Score: 2) by fleg on Friday June 26 2015, @02:56AM
>i dont regard java as being less likely than C++ to leak.
wow, my bind is moggled.
>it's easy to write leak free c++
"easy"? do tell
(Score: 2) by MichaelDavidCrawford on Friday June 26 2015, @10:14AM
not that one cannot write leak free java but that java is harder to get right.
http://www.warplife.com/tips/code/c++/memory-management/parameters/ [warplife.com]
Yes I Have No Bananas. [gofundme.com]
(Score: 2) by fleg on Sunday June 28 2015, @02:27AM
funny. so which bit of that would cover "it's easy to write leak free c++"? operative word being "easy". because "easy" does not mean "this really is a complicated and detailed topic, and I worry that I will scare away beginners." which is from your own intro.
(Score: 2) by TheRaven on Friday June 26 2015, @12:08PM
sudo mod me up
(Score: 2) by fleg on Sunday June 28 2015, @02:32AM
interesting, i havent been keeping up with c++ (all my experience is pre c++11) so i hadnt come across those make_ functions before. thanks.
(Score: 2) by TheRaven on Monday June 29 2015, @08:49AM
sudo mod me up
(Score: 2, Insightful) by mechanicjay on Thursday June 25 2015, @02:11PM
I mostly agree. It's not hard to write well-structured lucid php. There are some really infuriating language features, mostly surrounding inconsistencies in the handling of NULLs and Boolean values, but there are worse things. Mostly I find it flexible, performant, with enough standard libraries that I'm not reinventing the wheel for mundane tasks.
Of all the things that I pick up to maintain from others, give me a PHP app any day. Ruby on Rails apps are impenetrable to my brain, and the pile of perl scripts I've inherited at work sometimes make me hurt.
My VMS box beat up your Windows box.
(Score: 2) by MichaelDavidCrawford on Thursday June 25 2015, @02:46PM
radio paradise was down for a few days. when it came back up, bill explained that he had rewritten the entire site completely from scratch, without using nuke. he hasnt had any more security problems.
Yes I Have No Bananas. [gofundme.com]
(Score: 1) by yarp on Thursday June 25 2015, @02:50PM
Here's a good run-down of things that infuriated one person in particular: http://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/ [eev.ee].
Not having used PHP in anger for a few years I'm not sure how many are still relevant, but I imagine a lot of it is.
(Score: 4, Insightful) by Thexalon on Thursday June 25 2015, @02:48PM
By contrast, I regard it as a terrible language that has been polished to the point where it doesn't look quite as bad.
It hasn't just been favored by clueless newbies over its entire existence, it was cobbled together by an admitted clueless newbie for an intended audience of clueless newbies. For comparison's sake, look at Basic and Pascal for languages designed by experts with an audience of clueless newbies in mind.
The classic PHP: A fractal of bad design [eev.ee] lays out a large number of examples of how PHP got things horribly horribly wrong.
The one that bothers me the most: There is absolutely no consistency about what happens when something goes wrong. The possibilities I've encountered in recent 5.x versions include:
A. An exception is thrown back up the call stack.
B. An error is fired off, which can go to an error_handler function if you define one somewhere.
C. The function returns a result which indicates that an error occurred, which may or may not be also a valid result for that function call. (And even if it's not a valid result from that function call, it may be indistinguishable from a valid result if you use "==" instead of "===".)
D. The error is ignored and PHP tries to continue as if nothing went wrong, with some variables set to null or something.
E. The function returns what appears to be a valid result, but what you expected to happen didn't actually happen, so you need to call a separate error-checking function to see if something silently went wrong.
F. A fatal error occurs that crashes your program immediately, with no opportunity to do anything about it. Information about what went wrong may be logged somewhere if you're lucky.
G. The process running PHP (either "php" on the command line or the Apache process if using mod_php) seg faults and is killed with no error information whatsoever.
Contrast this to the wide range of possibilities in Python, Ruby, Java, and a bunch of other languages:
A. An exception is thrown up the call stack.
That sort of thing is not the fault of the developers using the language, that's the fault of the language. And it's definitely the fault of the language that there was no specification whatsoever until late July of last year (the language has been in use since 1995). Libraries like Zend and Kohana have done a fairly good job of covering up the more egregious flaws, but that doesn't excuse the language developers. Its popularity now rests entirely on its popularity in 1998 or so, and also rather heavily on the popularity of Wordpress because a lot of businesspeople don't know that other content management systems exist.
The only thing that stops a bad guy with a compiler is a good guy with a compiler.
(Score: 2) by MichaelDavidCrawford on Thursday June 25 2015, @03:32PM
ill informed businessmen also lead to the notion that java was suitable for croos platfor development.
Yes I Have No Bananas. [gofundme.com]
(Score: 1, Insightful) by Anonymous Coward on Thursday June 25 2015, @05:01PM
It's not? Or are you just thinking of a handful of use-cases where it doesn't make sense and ignoring the literally millions of examples where Java works just fine cross-platform?
(Score: 2) by MichaelDavidCrawford on Thursday June 25 2015, @05:52PM
Ive written quite a lot of c++ crossplatform code. Ivenever seen java work as well as what is easily achieved with c++.
Yes I Have No Bananas. [gofundme.com]
(Score: 2) by fleg on Friday June 26 2015, @03:14AM
in what context?
(Score: 1) by ghost on Thursday June 25 2015, @02:59PM
(Score: 2) by mechanicjay on Thursday June 25 2015, @04:01PM
Sometimes a lesser product succeeds where a better product fails.
History is chock full of such examples. What I've observed over the last 10 years, is that as newer languages have a meteoric rise and subsequent fall, PHP seems to be consistently popular. Sure there are Ruby sites, and Django sites, and .net sites and .jsp sites, but the fact is that PHP runs a huge percentage of the web quite competently. Perhaps this is aided by the fact that it's dead-nuts simple to get something serving a php site, or that its also simple to get PHP sites to scale, or there is just a really low barrier to entry -- perhaps some magic combination there of.
Is it the Lowest Common Denominator of web programming languages? Probably.
Is that necessarily a bad thing? I don't think so.
My VMS box beat up your Windows box.
(Score: 2) by TheRaven on Friday June 26 2015, @12:06PM
sudo mod me up