PHP UK Conference 2013

Los traits de PHP, ¿una oportunidad o un problema?

Nick Belhomme  · 
PHP

Transcripción

Extracto de la transcripción automática del vídeo realizada por YouTube.

so these are web-based so HP dotnet twenty percent that's a lot but PHP almost eighty percent of all websites run on PHP today that's a lot that's really dominating a web language at this time and it keeps growing last time I gave this talk it

was seventy-four percent so we increase with another four percent and I think it will be keeping increasing because PHP is open source and it's a really mature language it gives evolving for the better so let's take a look we are used by many sides

but the high traffic sites are mostly still using Java and such because yea high traffic sites there are some high traffic sites today which adopt PHP but most really high traffic sites are still running java because their legacy systems like banks and such

so they use other technologies but the PHP version adoption this is something that's really interesting we can safely say that everybody has switched to PHP 5 so that's a whopping ninety six percent all the other versions are literally dead I don't

know what's still here but I think it's really really really old coat or maybe some banking which doesn't trust changing your coat if it works don't fix it don't change anything now php5 we've still got TP and 5-door to running I don't

understand that pitch p53 is out for a long long long time 55 before I'd be released in stable version last year March so it's one year old it's got huge huge huge benefits in performance in in language constructs in in a lot of things but if you

are not yet ready to go to five dots for all systems okay all systems do use all linux distributions already have five to three running so I don't see any real use case why you would have still run in fact the two but clearly we still do that so why is

there a slow adoption for php5 dot for mainly me myself I blame you guys you have to push your boss your your team lead your team manager your your CEO you're CTO I don't care they are not as technically advanced as you guys you know your you should

push your you would you would have to say no five dot 4 or 5 to 3 has huge huge security benefits has huge performance benefits we need to adopt so mainly hu you can blame it a shared hosting but in the end huge you choose that shared hosting you can switch

the provider who does give it to you the company's refrain from updating stable systems or distributions well not really you can push maybe not in one hour talk say a mr. boss please update know you have the next day after day and eventually you will win

so why would you adopt like I told before there's more stability better security there's a better engine garbage collection memory performance as a they're really really really really yeah it jumped really it jumped with a difference between five

dot 3 i'm not even going to talk about 50 to but five to three and five is for your memory consumption and cpu consumption it's it's all the charts it's almost half or sometimes even yeah 10 times as fast or 10 times let's consumed in memory

then 523 so there are also new language features and because of the new language constructs we also have more and better ways to write elegant coach so we're going to take a look at that today so in PHP 5 at four we have an array short notation and what

that actually means just the JavaScript syntax we don't have to write array anymore colon and stuff like that we can just make square bracket and write our array now we have already referencing what that actually means is we do not have to store the result

of a function anymore into a variable and then that variable is an array which we can access no we can immediately access the values from which are returned from the function itself so then class excellent instantiation we do not have to store the the class

anymore in a variable the same thing it's just a shortcut we can now say for instance news and date to string in one line we don't have to store this in data the data object so indirect method call by array variable it's a short way of instantiating

no calling a method from a class with a use of an array like I said we have huge CPU and benefits which 584 engine process your object oriented code a lot faster we have language constructs which will just put an echo this will write you don't have to

do open peach p notation and say echo your variable you can immediately do echo and open PHP in one location and we've got Jason serializable interface and a lot lot more but today we're going to talk about trades so what are traits and for why this

is a solution well we all right go on a daily basis most of us do and the problem we face today is that we write nice coat and rewrite the code we put responsibility in each class and we try to separate the responsibilities of our coach in separate classes

[ ... ]

Nota: se han omitido las otras 2.400 palabras de la transcripción completa para cumplir con las normas de «uso razonable» de YouTube.