PHP 7 makes life a lot better for PHP devs in many ways but one awesome thing is it obsoletes bunch of out-of-date tutorials by finally removing the old Mysql extension \o/<p><a href="http://php.net/manual/en/migration70.removed-exts-sapis.php" rel="nofollow">http://php.net/manual/en/migration70.removed-exts-sapis.php</a><p>I actually met a young aspiring web developer who still learned DB-access with mysql_* functions. I urged him to switch to a sane framework like Laravel. Oh boy he was happy in a month and learned bunch of best practices quickly.
Been learning php on and off for a while, happy to see this release is out. Most likely I will use PHP for my future projects instead of the alternatives.<p>Languages are learning from each other these days, the new PHP definitely benefited from this trend and is actively evolving itself, which is the major reason I'm to stick with it.<p>Some PHP developers recommended nodejs over PHP for the future to me, after a few experience I feel PHP may be better for long-term maintenance. Renovation is good, it's just that javascript may have too much of it for me to chew on nowadays.<p>Wish there will be a light-weight version of PHP, something like micropython or Lua, so I can use it on low-end systems when needed. PHP is still very demanding on resources comparing to other languages, even nodejs can be used on IoT devices with restricted mem/cpu power.
Why do they keep adding global functions like "intdiv"? For example in JS, it being another language with a similar compatibility burden, they are moving most of the global functions (like parseInt) to "namespaces" (like Number.parseInt) while keeping global references there. When I open the docs (for example, the array functions page[1]), I get frightened by the global functions which do not seem to share a naming convention on first glance.<p>disclaimer: I haven't written anything significant with PHP since too many years.<p>[1]: <a href="http://php.net/manual/en/ref.array.php" rel="nofollow">http://php.net/manual/en/ref.array.php</a>
I wish every PHP developer would reread the docs and start using new features available instead of just continuing with what they know already just because it works. And of course if there was any way to remove all those old tutorials out there.
The performance improvements in this release will hopefully encourage people to upgrade, even if the new features don't. Common PHP applications run 70%-100% faster on PHP 7 than they did on PHP 5.6, comparable with or better than HHVM.
I was so excited when I saw this post. Then I realized it's another 'too early' post claiming the tag == release. It's not released until it happens on the PHP site. This is just a tag in the repo. Sure, it likely won't change now, but it could.
Probably one of the biggest releases since 5 in my opinion. Scalar and return type declarations being added in are a couple of massive additions. For a language that used to cop a lot of flak, PHP sure has grown to become a mature and quite decent language.
The scalar and return types are really a great improvement IMHO, I can't wait for Doctrine to fully support it for code generation.<p>But one thing which is missing is the nullable types, as currently it's either you always return a string and you can use scalar typing, or you sometimes return null and you can't use it (which I'm okay with)<p><a href="https://wiki.php.net/rfc/nullable_types" rel="nofollow">https://wiki.php.net/rfc/nullable_types</a>
<a href="https://github.com/php/php-src/pull/1045" rel="nofollow">https://github.com/php/php-src/pull/1045</a><p>With this, it will permit to have even better static analysis "a la" HHVM/hack (i.e detecting that you haven't check for is_null in your code
I'm actually excited for this release!<p>- Type declarations (this is a HUGE move forwards).<p>- Grouped use statements, not sure if I like how that looks<p>- ?? will shorten statements<p>- Anonymous classes seem a bit odd looking to me<p>- Unserialize filter is a nice security bump<p>Anxious to try it out and see the speed improvements I've been hearing about too.
The one thing I'd love to see is a native concurrency story with PHP. I'd put my vote in specifically to have Communicating Sequential Processes. I think that feature alone would take the language to another level. I know they've got stream_select, et al. and I've really enjoyed pecl event, reactphp, and of course there's HackLang's Async / Await if you want to convert, but having some modern / native constructs would be nice to have. Does anyone know if that's on the horizon?
Congratulations to the PHP community with this milestone!<p>I wonder if people who switched to HHVM, will start using PHP again. HHVM has offered much faster performance than previous versions of PHP. The speed of PHP 7 is at par with HHVM.
OK, great! Clicking the main page[1], see the top of README:<p>"build error".<p>Wait, what? You just released it, it should definitely work! Clicking that icon[2], checking the failed build[3]:<p>ERROR: no certificate subject alternative name matches<p>requested host name `pear.php.net'.<p>To connect to pear.php.net insecurely, use `--no-check-certificate'.<p>Really? See what's in <a href="http://pear.php.net/" rel="nofollow">http://pear.php.net/</a><p>> The server running pear.php.net had a fatal hard disk failure and gets replaced by a new machine this week. Until the new machine is setup, this page is up to let you continue installing PEAR packages via the PEAR installer.<p>In 2015? Cool.<p>Connecting to the https website ...<p>% openssl s_client -connect pear.php.net:443
...
Certificate chain
0 s:/CN=mail.cweiske.de<p>So you're using CN=mail.cweiske.de for pear.php.net. I don't even know what to say.. Well, happy hacking!<p>[1]: <a href="https://github.com/php/php-src" rel="nofollow">https://github.com/php/php-src</a>
[2]: <a href="https://travis-ci.org/php/php-src" rel="nofollow">https://travis-ci.org/php/php-src</a>
[3]: <a href="https://travis-ci.org/php/php-src/jobs/94372493" rel="nofollow">https://travis-ci.org/php/php-src/jobs/94372493</a>
The feature I'm most excited about is the availability of a simple, sane, and correct CSPRNG:<p><pre><code> string random_bytes(int $numBytes);
int random_int(int $min, int $max);
</code></pre>
If you want to use this interface in a project that needs to be compatible with PHP 5, there's always <a href="https://github.com/paragonie/random_compat" rel="nofollow">https://github.com/paragonie/random_compat</a>
Have been waiting for this anxiously. I've been running a few test builds on it occasionally, but its nice to have the guarantee to shift prod systems to it.<p>New Features list is at <a href="https://secure.php.net/manual/en/migration70.new-features.php" rel="nofollow">https://secure.php.net/manual/en/migration70.new-features.ph...</a><p>My favorite is scalar typehinting by far.
To me, PHP is still interesting, because of the ProcessWire CMS/CMF [1], which is basically the next best thing afte sliced bread (A generic hierarchical content structure, with a jquery-inspired PHP template API, giving FULL flexibility to customize your design and presentation to anything you like ... even REST apis are just a few lines of code in a template. Add to that dozens of dozens of extremely nicec features built in, such as automatic thumbnail resize through API methods such as <img src="{$image->size(90,90)->url}"> ... and you have something immensely powerful).<p>[1] <a href="http://processwire.com" rel="nofollow">http://processwire.com</a>
Stuff like this hurts: <a href="https://www.drupal.org/node/2454439" rel="nofollow">https://www.drupal.org/node/2454439</a>
When years ago I started learning Ruby and wanted to use it for the web, my intention was using it like you do with PHP (simply including it in HTML) but I got a bit frustrated because all the resources I kept finding showed the only way of using Ruby in a web context was by using a big framework like Rails or, by choosing a wrong path and playing with stuff which required a lot more in depth knowledge that I did not have (and that I didn't want to be forced to have because I just wanted to focus on app code and experiment).<p>I only recently discovered <a href="https://github.com/migrs/rack-server-pages" rel="nofollow">https://github.com/migrs/rack-server-pages</a> which allows to simply shove Ruby in HTML the same way as PHP and as a new Ruby dev could expect to be able to do. I think this approach makes learning projects simpler, and at the same has the added value of making people actually learn a lot about those aspects of HTTP that frameworks keep well hidden under their carpet and that can help you become a good web developer instead of "simply" a framework user.<p>Yes for sure, best practices that frameworks implement are there for a reason, and it's great to have them, but IMHO, this approach has advantages when learning and could also be seen as an essential step to understand what those frameworks you will use next are abstracting and why.<p>IMHO, what still contributes to new generations of devs approaching PHP, is also its immediateness and simplicity with nothing to do except '<?php' code '?>' and with this comment I just wanted to give a bit more exposure to the fact that a similar solution exists for Ruby too, and that it's a bit of a pity that because of the importance of Rails it got a bit overshadowed.
Congratulations and thank you to everybody who has contributed. I've been running PHP 7 for my hobby project for the last couple of months. The update was refreshingly painless and I've had zero compatibility troubles so far.
PHP 7 literally cuts the load in half for PHP code which means hundreds of thousands of servers can either now save power or serve nearly twice the number of connections.<p>win-win<p>almost as fast as hhvm but much easier to adapt
I've been anticipating this for a while. Some great additions, especially scalar type hinting and type hinting on return types. The ability to enable stricter typing via a directive is also great. It's a shame internals voted down short-hand syntax for anonymous functions, including implicit closure over outer scope variables - a function with closures in PHP can get ugly very fast. Using higher-order functions becomes far more unwieldy.
As a person with more of an ops background can someone explain to me why / when PHP might be a viable language? My experience with hosting PHP apps has historicity been one of fending off security issues and I think that often in the past PHP was often a language for designers that didn't have experienced programming skills, it feels like designers have now shifted to using Node for this?
Can anyone closer to the subject provide some info about this: <a href="https://www.reddit.com/r/programming/comments/3v4l98/php_7_released/cxkazco" rel="nofollow">https://www.reddit.com/r/programming/comments/3v4l98/php_7_r...</a>?<p>That comment looks a bit scary if it's true :(
I use PHP for my freelance work mainly because I have no option on hosting. I never got the <i>appeal</i> for PHP (besides being cheap to host). All my personal projects are either done in Python or Node + (Angular, react & now Vue)<p>Python: PURE elegance<p>Node: io breeze<p>PHP: ?<p>Q: is the "module" system still achieved by dumping file content or is there a linking system?
Great release! I think the BC breaks are all justified :)<p>And all the shared hosts around still stuck at 5.3 or so, this is your time to move forward. At least start <i>offering</i> a PHP7 version, if not a straightway upgrade.<p>Huge thanks to the internals for their hard work.
Are they skipping 6.X releases or something?<p>The latest release according to php.net [0] is 5.6.15 which come out October 29th of 2015.<p>[0] <a href="https://secure.php.net/releases/" rel="nofollow">https://secure.php.net/releases/</a>
Given how dependent php is on hosts to upgrade, and how slow php hosts traditionally move, it would seem that php would benefit from a 7-to-5 transpiler, similar to Babel for JS. Does anything like this exist already?
I haven't worked with PHP in quite some time now but I am happy to see its still kicking. Although it does bring back some haunting memories from versions 3 and 4.