 So you can start. So we have three minutes left. It's okay. Remy Kulot. Am I pronouncing it the same way? Kuli. Kuli? Kuli, yeah. Oh, okay. It's French, sorry. Sorry, French is a bit hard. It's French. Oh, yeah. Okay. Okay. Hello, thanks for coming. I am going to speak about PHP 7, which was released a few months ago. After Osmoorin production, I will try to unlike a few internal changes. Of course, I will not speak about all the changes. There is too much change. But just to understand why you need to upgrade to PHP 7, what will be the benefit for you. Then the user change, the thing most users of PHP will see will have benefits. Then after, which is mostly the why part, we will go to the how part. I mean, when on how PHP 7 will come, we'll go to Fedora. And of course, some questions. So just for people who don't know me, I am mostly the PHP maintainer for Fedora on Red Hat. And I am also now a PHP developer, which means I work upstream for the PHP project. So the first one is about PHP next. So, yes, for PHP developer, 5 plus 1 is 7. Always a bit stronger completely. Mathematic for PHP. The question is where is PHP 6? In fact, a few years ago, there was a PHP 6 development branch, which was mostly tried to ensure to use unicode in PHP, to have unicode everywhere. But after a few years of development, we decided to kill this branch. It was too bad for performance and not enough benefit. It was worth it. So we killed PHP 6. So we decided to jump to PHP 7 because if you search on the internet, you will find articles and books about PHP 6. So to avoid any confusion, we are now going with PHP 7. So what that changed internally, probably most of the things you will never notice because if you use PHP, but it's for developers to understand some of the benefits. First, the goal of PHP 7 was to fix the gap of performance with HHVM. So if you know HHVM, which is a sort of fork of PHP developed by Facebook for their own need, all that people can use. A lot of people think to switch to HHVM because of performance because it is really faster. So the main goal of PHP 7 was to fix the gap of performance. So PHP 7 now uses a new engine, which is the end engine version 3, which includes really a lot of change. All the internal APIs have been cleaned up, right, to improve performance and to improve speed. I'll take one example, which is in all PHP 5, if you look in the code, you will see a lot of pointer to Zvalve. Zvalve is the main object in PHP. And now with PHP 7, we are only to use Zvalve, which means the API is totally different. So everything which is built, see extension, is now broken because the API is really a new API. We are also a new memory management, which has been rewritten nearly from scratch, which is mostly inspired from Gmalloc. It's not really Gmalloc, it's something inspired from Gmalloc. So everything which has been done in this, which was called PHP-NG during the development phase, we save a lot of memory. All the internal structures have been cleaned up, are smaller, so we allocate less memory. And we also do a lot less allocation on everything completely to speed. Another big challenge, because a lot of people, when they thought about the size T in 64, things were going to fix the gap between 32 bytes and 64 bytes. So if you see this picture, you must remind this is an only Windows feature, which allows Windows 64 bits to have 64 bits for PHP. So this is really a no-change for the Linux on our operating system. Except here, we use, in previous PHP 5, we were using Integra for size, for the size of all the screens and all of the objects. Now we are using size T, which makes communication with a system library much more simple and much more clean, because we are also doing the same thing. A few other challenges I'd like to invite. Before, we have a huge parser, which parts the source code to be able to execute the code. Now with the Zen Engine 3, we have a two-pass parser. On the first pass, we try to use an abstract syntax tree, and then it is passed into the code. This could be very impressive for the future when we are going to try to implement JIT just in time to get most users of PHP who don't care about this, but a developer, a debugger, a lot of static analysis tools, so we'll take a lot of benefits of this part. I don't know if some of you have already tried to write C extension for PHP. It was quite hard for the trade-safe build because we have to carry the trade ID everywhere in the code in every kitchen pool. It was quite hard. Now we have a native trade layer, so it's very, very simple. On quite simple, you can clean up all the stuff which is no more needed. You can keep the code if you want to have an extension. We work with PHP 5 and PHP 7, but all the macros are now anti-macros. So you clean up. About what is called expectation. Expectation is... In fact, it's when you want to use Asset in your PHP code. Asset exists in PHP 5, but are mostly usable because when you have insert in your code, even if you are not in debug mode, if you are in production, you lose a lot of performance, and PHP becomes very slow because of Asset. Asset channels have been rewritten from scratch, but now you can really use Asset in your source code because when you are in production mode, this is a no-cost, this is really clean up, removed from the op-code, really, really no cost for execution. So now Asset can be used in PHP 7. Start in PHP 7. I have a new PHP 7 introduced, what we call forever object. I will talk about this a bit later in the user long, which is mostly what is used for extension in the language. There was a lot of challenge in the exception in the language. As I can talk about all the challenges PHP 7, so if you want, you can see this link, which are written all the RFC, which are draft under discussion, under vote, implemented in PHP 7, in all PHP 5. So what is the result? The result is performance. So here is a small graph from Zen about PHP 5.6 on 7.0. So it is not an abstract benchmark, this is a benchmark done on a real application. So you have Zen from Rock 1, Zen from Rock 2, Vubar, Sugar from CRM, Majecto, Media which is a really, real case application, something that everybody use. What we can see is globally twice faster. Really a huge performance boost. It's rather the number of page third part seconds, but it's the result is the same. So you can take this as a joke, but of course if PHP is twice faster, this means you can shut down half of your server. Yes, the war warming, probably not the reason why people are going to use PHP 7, but really when you only need half of the server you have today, this means you are going to lower the cost of your infrastructure. So this is one of the reasons why a lot of people want to switch as soon as possible to PHP 7 to be able to reduce the cost of an infrastructure. Really a huge benefit. Of course this also means as the language is much more faster, you are able to do much thing directly in PHP. You have less need for writing say extension, because say extension are of course faster, but really hard to maintain. So you can now write for a lot of things, you are now able to use pure PHP library, pure PHP implementation. As I said, the internal API have really changed, really new API, which means most of the extension which works for PHP 5 will not work for PHP 7. It's a huge, huge challenge. So here, a small list, it's not an exhaustive list of all the extension which exists for PHP, but this is the list of the extension available in Fedora. So you see, today, there is around half of the extension which are already ready for PHP 7. But some are really missing. Some are in progress, for example, Imagic or Memcache or Xdebug, which are really big extension, very often used extension. They are not really but close to be released. Some are not ready. We are waiting for upstream to port the extension. I can try to help some of them. I already port some, but we are waiting. So in the big one, which is missing, we have a eJabinary over your Reduce, Excage, Trig as a tool. So we are waiting for this extension. So, something you have to notice, a few extensions have to choose to release and to use the same version to produce a version which is compatible with both PHP 5 and PHP 7. This is really simpler for user. You use the same version for both. But this means you have a lot of conditional and it's much more complex to maintain. So, this is for example, Xdebug, for example, I have the same version which works with PHP 5 and PHP 7. But some other extension have to choose to have one version for PHP 5 on another new version for PHP 7. So, for example, a PCU version 4 works with PHP 5 on version 5 works with PHP 7. So, it can be confusing for user. So, because you see a new version, but you can't install it with your old PHP 5. So, this is sort of blocker for me. Really, we have around 10 extension releases for PHP 7 in the last week. So, really, things go further. We have new version every week. But I'm still waiting for some of them. Just to enlighten one which is very used, the Mongo extension is compatible only with PHP 5 and will never be ported to PHP 7. So, if you use this extension, you have to change your code to use something else. And something else is the MongoDB extension which is a bit different which is really cleaner and which is already compatible with PHP 5 and 7. So, if you have PHP 5 code, you can start to work on moving from Mongo to MongoDB. So, something probably more simple what change for user of PHP for people writing application using PHP. First, PHP is not a type of language. So, everything you have a string on an integer PHP try to change and to cast and to transform your data. This is by design. PHP was designed 12 years ago and it was chosen to be a non-type of language. What? But user ask us, we want a type of language. We could have say, if you want a type of language, don't use PHP use something else. But, so, first thing we introduce Scala tip in tip icons. So, you can say, a function expect a need which was not possible in PHP 5. PHP 5, you can say I expect one object or one array, but not about Scala. So now, you can say, my function expect an integer. Really something new for the pitch pillar. In the same way, you can also I don't really care of the example, but you can also say this function will return an array which is really new. You can declare about the written tip of a function. Totally new, really a big change, but a change requested by our user. And finally we can say enter the street tips mode which means if the function expect an integer and you call it using a float it will not work. Without this flag, it will work as before. It will convert the float to an integer and the function will work. You can have a warning or something. But if you want a street type of language you can using this. For example, I have not the code but you will have a fatal error when you are trying to call a function which expect an integer and you give it a float. So really, really a new word for PHP. User ask for it. We've done it. About exception. Exception is something old PHP. But you have exception and you also have error. And when you encounter the code encounter a fatal error or a partial error or something or now a tip error the program just die. And you are not able to catch. This is an error this is not an exception. So now with PHP 7 we have oh, sorry I took all the way of 4.0 interface which is the top level. We have exception which are exactly the same that exception PHP 5 and we have error which now are exception another kind of exception which can be raised by type error or partial error but now you can catch them. It's very, very, very new. This doesn't introduce change on incompatibility. This is very important. So if you have an old PHP 5 code which catch exception it will continue to work on only catch exception. If you want to write PHP 7 code now catch error and you will catch for example the type error but there is no bigger change with PHP 5 we still run the same way which was compatibility was very, very important for a lot of feature in PHP 7. So of course this is a major version so of course we have a few things so I would like to highlight a few things which are which breaks which can break your application the first we remove for extension those extension were deprecated for yours and for yours we are telling people don't use this anymore of course people are still using this for example my SQL extension is very used because there is tons of example in documentation on internet about using the minusql extension this is deprecated this is dead and this is unmaintained in PHP 5 if you have a bug in my SQL nobody will fix it in PHP 5 nobody cares about this extension really so you have to switch to minusql e or pdo minusql which exists for yours but I imagine people are coming a lot of people are coming on pride well we use my extension so ereg is also very old this one is to access Microsoft SQL server but it is mostly unmaintained I was a bit sad to see this extension disappear because windows user have a good extension which is a native windows SQL server extension but for Linux we only have my SQL extension also we move a lot of server API but probably if you look at the list this is not something you nobody use this for yours this is all really deprecated thing of course apache is the old apache 1 extension we still have support for apache 2 so if you have all the another application running on PHP 5 you should really look at deprecated message I understand on prediction machine we always disable deprecated message but only for development we need to fix all the deprecated things with PHP 5 because when you go to PHP 7 we fix it and we are removed as it was expected another deprecation this is really about very old thing this is PHP 4 constructor probably if you look some old code you will see a function with the same name than the class this is the old this is PHP 4 really 10 years ago which is totally deprecated but PHP project we are always nice too nice guy so we don't remove it we just deprecated make it deprecated which means you can continue to use it but it will be removed in PHP 8 but seriously for me this is a criteria for the thing I maintain for example I recently removed from federal repository more than 30 packages which was a peer package we are still use this constructor and when I saw in an application or in a library that the library worked with PHP 4 I said this one should die 10 years after PHP 5 it should die but we still allow it until we just write deprecated message in your log on the server round it should never exist which exists in PHP which is you can do static call to not static method this is very strong if bar is a non-static method you can call it static click and we still allow it because the peer library use it a lot in the function you have if it set this it's a normal call else it's a static call so this is very awful but it exists it was a whole thing from PHP 4 again so it still worked another small break now when you use internal classes there is an error in the constructor PHP which was an exception when you can cast you can catch this is really what every people writing our object application expects from an object language so this is just something that everybody ask us to do so this we cannot have change but if you try to have an exception or an error as the constructor now raise an exception rather than an error you have to adapt your code to be able to catch properly the things so but just something very interesting for people wanting to write nice code so the next one is probably the worst breakage in PHP 7 the examples are a bit complex but when you are awful things like this first if you want search awful things you have a problem which really want simpler things but with PHP 5 you cannot have one DOM interpretation one DOM understanding with PHP 7 it's clearly left to right in all cases so you are you have change in the behavior I say this is the worst change this is a cleanup, this is something which need to be down at some point it's very hard to detect because you have to run the code to detect there is something broken it doesn't work the same often it will raise a partial error on a defined object so if you have really test it's not a problem you will detect it very quickly but this is the worst thing because it's very hard to detect and to fix the examples are probably a bit complex so last there is a new some new Wizard of K Word sorry Wizard of K Word such as BlueLintegerString which is now K Word but you cannot use it anymore yes these breaks some application I remember a big library which uses a class named string so it doesn't work anymore but yes we need Wizard of K Word so just to summarize which is very important the compatibility with PHP 5 is very good of course I have tried to enlighten the breakage but the compatibility is very good most of the time a clean application a clean PHP 5 application will work without change on PHP 7 so yes Symphony is already ready and it is already compatible with PHP 7 Zend Fromwork version 2.5 is already compatible when I say it's compatible I mean Zend say it is compatible and we support it which is very important because a lot of things works but don't support PHP 7 yes, yet so for this too big piece it is supporting so in federal when when are we going to see PHP 7 in federal a lot of people ask me the question we are still running 5.6 in federal so in federal we have a single stack a single version of PHP our plan is to update PHP to 7.0.3 for all I don't know to work to ensure everything works we have a nice tool with this crochet probably worth a talk only about this tool probably we have to drop until we move a lot of things which are dead unmounted and which are not compatible so a big cleanup of the repository the work is already done just has to happen in federal we can imagine a dual stack which is just something I don't want to do because if someone else wants to do it I have very very bad experience with PHP and PHP 5.3 in a real 5 so I prefer to not do it in federal we can imagine parallel version having 2 stack like 2 Python 3 but this is not something which is very interesting in federal because as I said compatibility is very good so we don't have to keep 2 versions during 10 years like Python 2, Python 3 things really we have to move from 5 to 7 oops and the last thing I'd like to see is the software collection because this is really the best solution of something I'd like to see but this is just not allowed in federal so really we should have PHP 7 since federal at 22 and we should when we are going to update to PHP 7 I think we should keep PHP 5.6 for software collection for developer if we want to provide a full feature really really I think we need the software collection so just a quick demo if it works so I'm just pull a clone of a composer it's a PHP 2 very well used just to show you how it works so I'm going to activate the software collection so we don't care about the system I am running it can be federal at 23 it can be real 6 or 7 I just switch to PHP 5.6 and run the unit test it should be quite just so we have 5.6 oh is it 5.6 yeah so 6 so now I switch to use sorry PHP 7 and I run the test suite again as you see it's much faster on use less memory I just switch to the presentation time can vary but globally we are half of the time half of the memory so well it's worth it so just to the last slide when my plan if nobody complain is to use federal at 24 for a big cleanup to to upgrade things we need to be upgraded for example I remember on cloud need to be updated to 8.2 cleanup old stuff then introduce PHP 7 in federal at 25 another project and probably PHP 7.1 for federal at 26 or 27 this is the plan a few links we will be able to find just to a light there is a federal PHP special interest group with a mailing list you can join if you want and there is also a sent to us special interest group about suffragetation so if you have question yes it's still needed we have cash you have something like 10 a factor of 10 so only yes you still need it but now as the cash is part of PHP itself it is maintained with the language we don't have any more the problem we encounter with the old which was maintained separately on which was laid for PHP 5.4 if I remember correctly it was laid it was a blocker for a lot of people now upcash is part of PHP so it is working with PHP 5 and it is working with PHP 7 there is absolutely no problem so I think you for the time so is there any integration for the syntax you choose to type in in the term because it's made compared to any other typing it was discussed as often in PHP we have discussion and we have a vote and the syntax was improved it looks a bit like a bit like C so I think everybody will like it so I think we are out of time so I think we can talk outside but I think we have to leave the room thanks I like the talk I am not a PHP fan but it was an awesome presentation may we please have the about just copy PDF if possible I understand which works here at the top if the name is descriptive if the name is yeah ok thank you very much ok I am Alex can you read this? yes I can I am Alex what are you doing?