PHP Classes
PHP Classes
elePHPant
Icontem

PHP 7 to Be Even Faster Than Expected - Lately in PHP podcast episode 60

Recommend this page to a friend!
  Blog PHP Classes blog   RSS 1.0 feed RSS 2.0 feed   Blog PHP 7 to Be Even Fast...   Post a comment Post a comment   See comments See comments (0)   Trackbacks (0)  

Author:

Posted on:

Categories: Lately in PHP Podcast

With the latest experiments with the Feedback Directed Optimization patch, it is possible that PHP 7 will be event 10% faster than the implementation with other optimizations already implemented for PHP 7.0.

That was one the topics commented by Manuel Lemos and Arturs Sosins in the episode 60 of the Lately in PHP podcast.

They also commented on proposals for future PHP versions like having a numeric type hint, options for preloaded scripts, making Libsodium a core extension for applications that need cryptography, the updated roadmap for PHP 7.0.0 and creating a new branch for PHP 7.1 development.

They also talked about the latest PHP tutorial articles and book reviews published lately on the site.

Listen to the podcast, or watch the hangout video, or read the transcript to learn more about these interesting PHP topics.




Hotjar logo 120x75

This Podcast is Sponsored by Hotjar - All-in-one Analytics and Feedback - at a fraction of the cost.

Hotjar is a new powerful tool that reveals the online behavior ​and voice​ of your users.

By combining both A) Analysis ​and B) ​Feedback​ tools Hotjar gives you the ‘big picture’ of how to improve your site's user experience and performance (conversion rates).

The Analysis tools allow you to measure and observe user behavior (what users do) while the Feedback tools allows you to hear what our users say (Voice of User / Customer). 

For the above reasons the Hotjar tag line is: All-in-one analytics and feedback - at a fraction of the cost.

For more information hoa you can improve your site with this tool go to https://www.hotjar.com/.


This post is sponsored via Syndicate Ads. If your company wants to sponsor a blog article or podcast on the PHP Classes site, please go to Syndicate Ads site to learn more about the sponsorship opportunities

Contents

Introduction (0:20)

Hotjar - All-in-one Analytics and Feedback at a fraction of the cost (1:13)

New Sponsor for PHP Innovation Award: SourceGuardian - PHP Encoder Tool (3:14)

PHP 5.4.41 and 5.5.25, PHP 5.6.9 released (4:12)

PHP 7 to Be Even Faster Than Expected with Feedback Directed Optimization (6:01)

Online PHP & HHVM shell: run code in 150+ different versions! (11:08)

Shall PHP have numeric type hints? (14:44)

Preload scripts and preloaded scripts only options (17:38)

Branching PHP to split PHP 7.0 from PHP 7.1 (19:04)

Make Libsodium a Core Extension (21:09)

Updated Roadmap for PHP 7.0.0 (25:33)

3 Ways to Access Application Common Data in PHP (27:19)

Extending PHP Classes and the Object Model (30:22)

PHP Multi-Factor Authentication for Web Development (32:33)

Create a Google Maps alternative with PHP and MySQL using the Leaflet library (33:17)

Class Abstraction in PHP (35:06)

Latest PHP book reviews (36:00)

JavaScript Innovation Award Winners of March 2015 (44:39)

JavaScript Innovation Award Rankings of 2015 (51:40)

PHP Innovation Award Winners of March 2015 (53:30)

PHP Innovation Award Rankings of 2015 (58:22)

Conclusion (1:02:26)



Contents

Listen or download the podcast, RSS feed and subscribe in iTunes

Watch the podcast video, subscribe to the podcast YouTube channel

Read the podcast transcript


Click on the Play button to listen now.


Download Size: 53MB Listeners: 1607

Introduction music Harbour used with explicit permission from the author Danilo Ercole, from Curitiba, Brazil

View Podcast in iTunes

In iTunes, use the Subscribe to Podcast... item of the Advanced menu, and then enter the URL above to subscribe to this podcast.

Watch the podcast video

Note that the timestamps below in the transcript may not match the same positions in the video because they were based on the audio timestamps and the audio was compacted to truncate silence periods.

See the Lately in PHP podcast play list on YouTube and Subscribe to this channel there.

Show notes

Introduction (0:20)

[Music]

Manuel Lemos: Hello. Welcome to the Lately in PHP podcast. This is episode number 60. This month, we are recording early because Arturs seems to go to somewhere far in the planet, and he will not be available later.

Hello, Arturs. How are you doing?

Arturs Sosins: Great. I wouldn't say it's early. I say it's on time. It would be released like in the middle of the month, right?

Manuel Lemos: Yeah, I think you're right. The idea is to talk about what is happening lately in the PHP world in the previous month. So, I agree because this time we're recording on June 2nd so, it's about time to record.

Hotjar - All-in-one Analytics and Feedback at a fraction of the cost (1:13)

Manuel Lemos: And this month, we have many, many interesting topics to talk about. But first, let me comment about a sponsor that is actually sponsoring this show.

This company is named Hotjar. I don't know if you have heard of it. I think it's a brand new company that specializes on analytics and user feedback. I looked at their product, and it looked interesting because it's a new powerful tool that reveals the online behavior and voice of your users.

So it's not just tracking where your users have been going in your site pages, but also what they have to say, if they're doing the expected behaviors to things that you want.

So by combining analysis and feedback tools, Hotjar gives a big picture of how to improve the user experience and performance and eventual conversion rates. The analysis tool allows you to measure and observe behavior, what the users do. While, the feedback tools allows you to hear what the users are saying, so it's a combination of tools.

Their motto for the above reasons that I mentioned, Hotjar's tagline is "all-in-one analytics and feedback at the fraction of the cost". So it's a motto that fits them well because I think the plans start at only $29 a month.

So thank you, Hotjar for sponsoring this show, and those who are interested can follow a link that I'll post in Show Notes to Hotjar.com.

New Sponsor for PHP Innovation Award: SourceGuardian - PHP Encoder Tool (3:14)

Manuel Lemos: Well, talking about sponsors, we have also a new sponsor for the Innovation Award, which came in a good time because the Innovation Award is getting many, many nominees.

I think in April, there were 16 nominees. We had a record number of nominees, and if they all want to pick a prize, there will not be enough sponsors. So a new sponsor is always welcome.

In this case, this sponsor is SourceGuardian. SourceGuardian develops tools for including your PHP source codes in case you want to protect them before selling to customers. So, welcome SourceGuardian to be our new sponsor.

PHP 5.4.41 and 5.5.25, PHP 5.6.9 released (4:12)

Manuel Lemos: Given this, let's start with usual set of topics that we have to talk about the PHP world. We have many, many topics so we are going to try to be brief, not talk too much about each of the topics.

And we are going to start precisely by the latest releases of PHP starting precisely by PHP 5.4.41. As we always mention, it's always good to remember that this 5.4 branch is in security fixes mode. Mostly, you'll only see security for now. And when PHP 7 will be released, there will be no more versions of PHP 5.4.

Given that, moving on to PHP 5.5 and 5.6. There's 5.5.25 and 5.6...

Arturs Sosins: 9.9.

Manuel Lemos: 9.9, exactly. If we compare, it seems that it's mostly bug fixes and some are security fixes also included in PHP 5.4, and the rest are just bug fixes that are some are common to 5.5 and 5.6.

So given that, I don't think there is nothing specific to talk about this new version. It's just the usual recommendation. If you are using this versions, take a look and see if there are bugs that were fixed affected your code and consider upgrading.

PHP 7 to Be Even Faster Than Expected with Feedback Directed Optimization (6:01)

Manuel Lemos: Now, we are going to start talking about very interesting topics related with PHP 7 specifically. Well, it's not exactly new but Zend published a new infographic about PHP 7, and they talked about the improvements of PHP in raw benchmarks, but also in real world applications. They mention here Magento, Drupal...

I'm not sure if this is large enough. Let me try to increase the screen here. It's already better.

Magento, Drupal, you can see great improvements. It is interesting that they not only compared PHP 5.6 with PHP 7, but also HHVM 3.7, which is the so-called Facebook PHP. Actually, not just PHP, HHVM also powers the Hack language which has certain features that not even PHP 7 really have, as of now.

Arturs Sosins: That actually raises a question. Does it compare doing PHP version of HipHop compiler or does it compare Hack of HipHop compiler?

Manuel Lemos: I think they are comparing just PHP code. Because Hack can run PHP code as is. And so, to make it fair, it only makes sense to compare PHP code... actually the same code.

Then, there's WordPress. Then, they show some benchmarks of frameworks, the Zend Framework 2 and Laravel, and SugarCRM. They also show some benchmarks comparing with other languages, doing some Mandelbrot fractals. I think it is execution time, right? Or else PHP wouldn't look good.

Arturs Sosins: Yes, always better.

Manuel Lemos: Yeah. Well, anyway, this is always great, not only to promote PHP but also promote Zend. So that's why they published and produced this nice chart. But the reason I comment about this, it's because I notice there was a tweet by Adi Gutmans which is the founder and CEO of Zend, where he mentioned something like "our previous share of PHP benchmarks are already out of date. PHP 7 will be even faster."

Arturs Sosins: So that's the one we just viewed, right?

Manuel Lemos: Well, actually, I think there is more to that because there is a comment her, a related comment by Christopher Jones. I think he's from Oracle. There's a link to some page on git.php.net that shows something that I'm not sure what this means, but I'm trying to guess. So if I guess wrong, please excuse me, because this is very recent. I only noticed this last days and did not have time to analyze.

And it seems there is a new improvement on PHP 7 that they are calling feedback-directed optimization, which is something that Christopher Jones was mentioning here... steps to compile PHP 7 with feedback-directed optimization.

Dmitry says it may give up to 10% in real performance. So I guess those benchmarks, you can add like 10% over that. So the expectation is that PHP 7 will be even faster than it was estimated initially.

Arturs Sosins: It should be trained exactly with that script that it will be running. If the script will change drastically, it would work slower probably.

Manuel Lemos: Well, to tell you the truth I didn't have the time to analyze what is this feedback-directed optimization. So maybe we should get back with this on a future show, maybe try to understand what this is because probably it's not as we all think.

Well, anyway, this is great news. It's always great to see that PHP 7 will not only be fast, but it will be even faster than everybody was already celebrating.

Online PHP & HHVM shell: run code in 150+ different versions! (11:08)

Manuel Lemos: So let's move on. First, I would like to comment. Because I was looking at the topics, all of a sudden, I see lots of people showing links to a site where they show some code running from different versions. This site is called 3V4L.org. It says online PHP in HHVM shell run code in 150+ different versions. So if I put here...

I'm not sharing. I stopped sharing. So silly me. OK. Can you see it now?

Arturs Sosins: Yup.

Manuel Lemos: I don't know if you can. A bit further.

It shows the output, and it shows it in many different versions. It's not like it just compares a few versions. I think it goes down further to PHP 4.3. So it won't compare if you can compare the performance is small code snippets, this actually seems to be great. Then, here, you can have performance report . It shows HHVM, PHP 7, PHP 6, 5, 4, all down to...

Arturs Sosins: ...is better or what is it?

Manuel Lemos: Sorry?

Arturs Sosins: What is the metric? It's time, right? So bigger is worse.

Manuel Lemos: Yeah, here, it says system time. System time, I suppose, if I'm not mistaken it's the time that your program is waiting for some activity to finish. But yeah, this is the usage of time of your CPU. I don't know, this is all I can see now.

And they also showed the disassembly of the codes using Vulcan Logic Dumper, some references. No, no references. I should have mentioned it. Was there any segmentation fault? No. HHVM analyze output, no message. HHVM Bytecode, which is sort of disassembly of the bytecodes. RFC branches...

Well, this is interesting because it can show you the performance of the code. I found this because I was looking at the topics that people are discussing in the PHP Internals. I found this interesting because now, it seems that lots of people, when they want to show certain codes, they just point to this site to show how that code is doing, I think that is the performance.

Shall PHP have numeric type hints? (14:44)

Manuel Lemos: So moving on, let's talk about for instance, a new proposal to add a numeric typehint. I'm sharing the screen here. Oh, it's here. OK, there it is.

Well, this is a proposal by Yasuo Ohgaki because we know we have typehints for scalar values, can be integers and floats, but sometimes, you take a value that for some, for instance, for the user input that can be a float. But the float can be also an integer. So, the proposal here is to have a typehint named numeric, which would accept values regardless if they are perfect integers or float.

I think this addresses some concerns that were remaining regarding the current implementation of the typehints. I think this is useful because it addresses real case. What do you think, Arturs? Do you see this happening a lot in your programs?

Arturs Sosins: Well, I think the problem basically that he describes here, first is that you can't really specify what type of hint you're using... is it signed or unsigned? Or is it 32 bit or 64 bit? And that's a bit confusing to different systems. So if basically we're having some kind of type hinting, it should be more explicit to say what exactly numeric value we have. If you're having that so yeah, why not have it more, provide them with more explicit way to define it?

Manuel Lemos: Right. There are also the case that the number is an integer but it doesn't fit in the range of 32 or 64 bits. So it has to be promoted to float. If you put there that it is an integer, it can't. It won't. It would fail the test of the typehint.

So I guess this is a good idea. There is some discussions going on. I think this is going to be probably a proposal even if it is for PHP 7.1. Well, I think, I'm not sure. I don't know yet because people are already discussing proposals for PHP 7.1.

Preload scripts and preloaded scripts only options (17:38)

Manuel Lemos: So moving on with the next topic, there is a proposal here, also by Yasuo Ohgaki. This is not very clear. I think I probably need to read it again to understand. Well, the idea... Well, the title is "Preload scripts and preloaded scripts only options". I'm not sure if this is like those prepend options that we have in PHP. But the concern here seems to eliminate possibilities of inclusion attack.

I think it's, if I got this right, I'm not sure yet, is to have sort of a list of the script that it could load and reject others. So it would be a sort of whitelist. So if you have some mailing script, it would be rejected. I guess this would improve the security of PHP. So if I got this right, that's it, and it could be a good idea. And, of course, this would be for PHP 7.1.

Branching PHP to split PHP 7.0 from PHP 7.1 (19:04)

Manuel Lemos: So moving on with the next topic, let me share the screen or else nobody will see it. Now that PHP 7 is practically defined, people starting on PHP 7.1 will have to start working on a separate branch.

So Julien Pauli which is the release manager of PHP 7, he is concerned about a couple of things. One is create separate branches for 7.0 and 7.1. And another is to elect the release managers for 7.1.

So that's more politics that actual development, but it's an important step that the PHP core developers need to do, which is to elect somebody that wants to take the burden to be the release manager.

Arturs Sosins: Burden?

Manuel Lemos: Well, it's like that. I think that's a...

Arturs Sosins: The honor of being a release manager or something like that.

Manuel Lemos: Well, first, because I think it's not a pay job. It's not an easy job. It's not paid. It seems my mike disconnected me for awhile. Well, as I was saying, being a release manger is not an easy task. Also, it's a volunteer task and the person that takes the task must like it a lot and manage all the discussions, like to be involved.

That's what I mean it would be a burden. For me, I wouldn't take it.

[Laughter]

Make Libsodium a Core Extension (21:09)

Manuel Lemos: Anyway, this is just something that we mentioned. We need to move on to the next topic, which is I think quite important one which is related with the security libraries that PHP is using, I mean regarding cryptography.

So far, we have been using a lot of mcrypt and also OpenSSL. But Mcrypt, as we mentioned before, it has been touched this eight years. After this, it was 2007. OpenSSL, well, it could be used but it's not aimed for all the purposes that Mcrypt is.

So there is this new extension called libsodium. OK.

Arturs Sosins: It's loading, right?

Manuel Lemos: It's my mouse that is jumping again. Libsodium has been in PECL for awhile now, so the proposal is to include it in PHP 7.1.

Arturs Sosins: Well, there is one extension here.

Manuel Lemos: I think it is meant to be a replacement for Mcrypt. I don't think it would provide the same list of functions. Let's take a look if there is some documentation. Because until now, I haven't seen this library, and looking at the source code, I probably am not going to figure much about this.

Arturs Sosins: No reference right?

Manuel Lemos: Yeah. I was trying to find any documentation other than the Read Me, but I guess the Read Me, that's what we have.

So basically it's a set of new functions. Maybe, maybe, just maybe. Or at least it's my wish that somebody provides wrapper functions that emulate the Mcrypt on top of libsodium.

What do you think, Arturs?

Arturs Sosins: Yeah, most probably. I know I read that all new constant contained within libsodium class in global note, they say basically the API will be the same with libsodium class. So someone would need to re-write, submit the PHP class, grab the functions of Mcrypt if that's possible and that would throw in different compatibility to a lot of other scripts.

Manuel Lemos: Yes, now that you mentioned that, there are several classes that sort of try to do that. There is one that is even in the queue. It will approved soon, probably before this podcast is released. I mean, that's MySQL extension on top of MySQLi, just because we mentioned about it in previous podcast, as you remember.

Well, I don't know, but cryptography is not as easy to deal as MySQL wrappers, I think. And so, well, let's see. I know there is a class submitted recently called something like Random Bytes that provides you several options to generate seed of random numbers that are used often in cryptography applications.

Well, anyway, there is this proposal for PHP 7.1 that using libsodium. Let's see what happens. We actually reached to a point of having anything usable regarding PHP 7.1.

Updated Roadmap for PHP 7.0.0 (25:33)

Manuel Lemos: So moving on to the next topic, let's try to do this relatively fast. It seems the release schedule of PHP 7.0 was sort of updated.

Arturs Sosins: You're not sharing screen just yet.

Manuel Lemos: Yeah, I was trying to figure which part of screen is the one that should be shared.

Arturs Sosins: Yes.

Manuel Lemos: OK, so here we go. There's the time table. We have some dates here. They don't say much except that the Alpha 1 is for June 11, Alpha 2, June 25. And then, they expect the final version to be in November 12, which is a reasonable expectation.

Previously, they mentioned middle of October but OK.

Arturs Sosins: It's completed okay here.

Manuel Lemos: Yeah, it's not a big delay and I think nobody will die to wait one month. Although, I imagine lots of people are very eager to get PHP 7 out. Usually, what happens when you release a major PHP version, lots of people will try it but they realize their code is broken in many places. So they have to move on to...

Arturs Sosins: Move back.

Manuel Lemos: Well, move back temporarily, but they have to fix the code, right?

3 Ways to Access Application Common Data in PHP (27:19)

Manuel Lemos: So now, we are going to move on about talking about the latest articles posted on PHP Classes blog, I mean tutorials. Some are very interesting. Now that PHP Classes is sponsoring the publication of nice articles, good quality articles that teach something to everybody, we are going to start mentioning some. We have to do this very quickly because we still have a lot to talk about.

We are going to start about with this article that is entitled "3 Ways to Access Application Common Data in PHP". Basically, what the author, Vallo Reima, means about common data is data that is sort of accessed from many parts of your application. It could be configuration. It could be localization text, so you can adapt your application to different languages.

So he mentioned three approaches. The two first ones are very common. The third one that he describes is not so trivial.

Let's comment first about these two. Global data is the most obvious. It's probably the one that most people had been using since early days of PHP on the Web, global variables to share data that can be easily accessed from many parts.

The problem with global data is that there can be name collision. Sometimes you can think that you are accessing global variable that is meant for some purpose, but because it has the same name of other global variable declared somewhere, you can have problems that you need to fix by renaming at least part of your variables.

So a better approach is to use the static approach which is to use the static variables or functions to access, to store common information that you may want. So the author gave some examples.

And finally, he talks about The Gateway Pattern Approach. which is not evident but he describes in the article. We're not going to talk about it in great detail because we need to move on. We still have several other interesting articles to comment. But OK, the article is very interesting. You can go later and read it in more detail.

Extending PHP Classes and the Object Model (30:22)

Manuel Lemos: So, moving on to the next article which is another article, written by Dave Smith which has been a very active author with many articles. Not only articles but great book reviews that has been published. It's good to see skilled authors that are very enthusiastic and produce good quality content. In this case, he talks about how to create object models.

This is a simple article. The topics are very basic. These are more targeted to users that do not yet understand why you should be using object-oriented programming and what you can do with it, how to extend classes and so forth.

Arturs Sosins: It' like a crash course into what is good in PHP OOP approach.

Manuel Lemos: Yeah, because I have noticed again and again, some people "Oh, I'm using object-oriented programming. But they do not quite understand why. They're just copying the trend.

Arturs Sosins: Because you expect them to submit classes, not scripts.

Manuel Lemos: Well, not just here in PHP Classes but actually, this is... Sometimes people, even that are bit lost, they will submit global code, and they, "Oh, global code is not the purpose of this site. Would you like to convert it to a class?" Then, I point them to some tutorial about classes. And they, "Oh, I can convert it," and then they submit a class but still it's not in great shape, probably not following good design patterns.

So it's always great to have articles like this from David. He explains things very clearly, and for that he had lots of nice comments and people thanking him for explaining it in a way that is easy to understand. So congratulations to David.

PHP Multi-Factor Authentication for Web Development (32:33)

Manuel Lemos: Now, again, another interesting article. This one is not as trivial because about security. He talks about multi-factor authentication. He talks about what are authentication factors and when he can have one or more authentication factors, and why it is good.

And so, he talks about this topic. He talks again in the good and simple language that everybody can understand, and this has been a great article, so people can understand better the topics related with security.

Create a Google Maps alternative with PHP and MySQL using the Leaflet library (33:17)

Manuel Lemos: So the next article this time is by Ashraf Gheith, and he is from Bosnia, I think. He talks about Leaflet library. I guess you know Leaflet library, right, Arturs?

Arturs Sosins: No. Although I would want to see a screenshot how it looks like in it.

Manuel Lemos: Yeah, well basically it's a library. It's a sort of an open-source version of Google Maps. It's an open-source library that can interface with mapping services like OpenStreetMap. There's another one that I forgot the name, but OpenStreetMap is a...

Arturs Sosins: MapBox.

Manuel Lemos: Yeah, exactly, Mapbox. All those mapping services, they serve tiles which are those part of the map that can use to render bigger maps. In this article, he published almost a complete application of how to create a maps-based application on top of Leaflet library, which is JavaScript, but the code here integrated with your application is in PHP, of course.

So it is an interesting article and for that he got a lot of nice comments. I already know that there will be a follow-up article. This time, a simple one, but we'll get back on that next month.

Class Abstraction in PHP (35:06)

Manuel Lemos: Another article, this one is about class abstractions, is yet another one by Dave Smith. He talks about how to create the abstract classes. He explains what are abstract classes and why they are useful. This was just published today and it is very interesting again. It is something that... I wouldn't say it was target to beginners because I know people that are not exactly beginners, and they do not fully understand the concept of abstract classes.

So, OK, this is an interesting article and I guess this is the last one.

Latest PHP book reviews (36:00)

We have many, many articles, and the next topic that I would like to comment is a different type of article, which are the book reviews.

Manuel Lemos: So starting this month, the PHP Classes started publishing book reviews. Actually, restarted publishing book reviews because they were published already in the past of either authors that would like to have their books reviewed or some reviewers asked to review certain books.

So we have here recently four book reviews, and we have a lots of others in the queue already. So the first one is actually me that reviewed it. It's about PhoneGap mobile application development because, well, I have a parallel project unrelated with PHP Classes that has a part that is a mobile application.

I'm not going to comment here, obviously, because it's a different business, but I wanted to evaluate how it could be implemented with PhoneGap and reuse the knowledge that you have of dealing with HTML, JavaScript and CSS to implement the so-called hybrid mobile applications.

So I reviewed the book and presented it here. I still hope it's very interesting, and I recommend it to people that can develop mobile applications that do not need to take extensive use of the native resources of different types of mobile devices. For that, I recommended the book.

Arturs, you have been developing mobile applications, but are you familiar with PhoneGap?

Arturs Sosins: I tried many frameworks, including PhoneGap, but I did not use it for production or stuff like that. But I have a question, the book seems to be more related to JavaScript than PHP, so there is no book reviews in the JavaScript site or they are shared? How is that going to go?

Manuel Lemos: Well, in reality, these review is a portion of PHP Classes because it has much more exposure. It provides much more exposure to the books than JS Classes site because it's much smaller. So we are reviewing books that are not just about PHP as we're going to see here.

For instance, let's see them. There's this one about WordPress. Well, WordPress is PHP, not a good example. This one was reviewed by Lopo Lencastre de Almeida. He also talked about what is this book and talk about how far it covers the development of sites using WordPress.

Despite of being WordPress, the book itself is not so much about PHP, but rather using WordPress and taking advantage of the many existing plug-ins which are PHP but you don't need to know PHP to use them.

Another book, this one called "Build APIs You Won't Hate", by Phil Sturgeon. This one was reviewed by Dave Smith again. He's very enthusiastic, and it's great because he produces very good quality content and it's useful for the whole PHP Classes community in general. He talks about what us this book. And this book is still not specific about PHP. It's about building APIs which can be written in many languages.

This is also an interesting book. My mouse is jumping again. This is another interesting book. If you are developing applications that need an API... for instance, you are developing a mobile application that you need to access resources provided via server-side part of your application, you implement an API. So in this book, the author is sharing his knowledge, what he learned about how to create APIs that once you are done with it, you won't hate them, nor your boss.

So I think it is great book as they mentioned in this review. It's interesting that it is already translated into Portuguese, Turkish, Italian and French, besides the original one that is in English. So I think this book is popular and the review is a good overview of what the book is about and why it is good to have in your shelf.

The last review that we present here is "PHP Beyond the Web" by Rob Aley. This one is very specific to PHP, but not the traditional PHP that you use for Web-based development. You can use it for many other purposes that are not Web-based.

It's reviewed by Luis Martinez Ulloa. He presents the topics that the book covers like command line interface and other sources that you may want to deal when you are developing non-Web based applications.

The book itself is recommended, for instance, if you need to implement parts of your applications that are not based on the Web. This is not a for mobile applications. Is just for using the PHP CLI version and all types of applications that can rely on that environment.

And with this, we reached the end of the book reviews. What I can say is that there are many more reviews of books coming. They take some time to produce. For instance, if you have written a book and it is already available, you can contact the site. You just send a message to info at phpclasses.org, and we'll try to find a reviewer because there are many authors willing to have their book reviewed, and there are also reviewers willing to review interesting books.

If it's possible, it's not always possible because sometimes the books are not so interesting for the potential reviewers, and I'm sorry we can't do much about it. We try the best to find a reviewer, but I think, so far, we have found reviewers for all books, but some books are not so interesting. You don't have all the reviewers interested, but OK.

Besides books, also nice articles, if you are willing to write nice articles. Not only you can publish them in a site like PHP Classes that gives you great exposure but you can also be paid for that. So could be an interesting option for you to make some money out of your work rather than just publishing in your blog and probably very few people will see it, and you don't make much from it.

JavaScript Innovation Award Winners of March 2015 (44:39)

Manuel Lemos: So with this, we are going to move on with the next section on which we comment about the Innovation Award, first of JS Classes. OK, let me share the screen here. So we are going to start talking about the winners of the Innovation Award edition of March which were voted in April and in May, the results come out.

So since we have already posted the results, we can talk about these packages. Arturs, which packages would you like to comment first now?

Arturs Sosins: OK, let me comment on first one is Adblock Detection for Google AdSense, developed by Suresh Kumar from India. What this package does, it tries to check if there any JavaScript elements in your webpage that are trying to load AdSense, because if they are not there, then probably there were stripped out by an Adblock.

This package also reports it to Google Analytics. So inside, Google Analytics, you can see how many visitors of your Web site have enabled Adblocking and disabled AdSense. So you can see how many of your visitors can see your ads, and then you may try to think of other ways to monetize this.

So that's why I really like this package from Suresh.

Manuel Lemos: Yeah, it can be useful for knowing which users are presenting Adblock. There are some users, not many, probably like 10% of the users use Adblock. They don't like ads. It's OK, it's their option. They are not supporting those that produce content and needs the money generated by the ads. But OK, that's a different discussion.

Anyway, in the case of this class, it is useful, as you described, to at least know if Adblock is being used to detect blocking of AdSense ads.

Arturs Sosins: Yeah, at least you can try thinking about other... with it.

Suresh Kumar got one book of choice by Packt for this package.

Second package I want to comment on is JavaScript HTML5 FileReader, which basically uses not like a standard HTML file input but try to use HTML5 FileReader API to retrieve contents of the file.

So it would provide even more than if you use file input, you usually simply upload it, but with it, you can use the same file input to read the file in the same Web page without even yet uploading it, so you could provide display of thumbnail of the image you are going to upload or display contents of it.

I recently also used a similar app I was developing, so I tried create addition and this package was simple kind of work that you would need to check availability and works with files.

So it was developed by Andras Toth from Hungary, and he got downloadable e-book of choice by O'Reilly for this package.

Manuel Lemos: I also would like to comment on a couple of other classes. Let me share screen here. Classes objects, and this one again is from Suresh Kumar from India and he has this class, Browser Specific CSS, which uses a clever trick in the same page. You can use different CSS sets of definitions depending on the type of device that they use.

So he defines certain styles. It's probably better to look at the code very quickly. We don't have much time. Oh, I forgot to log in because I was in another machine.

So OK, here we go. So this is class. Oh, it's minified. You're not going to see much. I have to unminify it. Let's see. I don't know if there's a non... Yeah, he did not provide a regular class, but it defines some sets of styles, and depending on the platform, it will match the names of the styles with the type of browser.

If you are in Windows, if you are in... As you may see here, so depending on the browser, you can have styles that match the different browser and use JavaScript to achieve this effect and it was quite interesting.

Now, moving on, the other class that I wanted to mention is one called Encyclopedia. This is not very trivial to understand. It's from Ryan Silalahi from Indonesia. He provides an interface to access I would say a large set of value pair objects but it implies a trick to minimize the loading of everything into a large object. So it can load small objects that provide access to parts of the bigger object which could be an encyclopedia with names and their respective meanings.

JavaScript Innovation Award Rankings of 2015 (51:40)

Manuel Lemos: About the JavaScript, let's see how it is going the Innovation Award ranking for 2015. Share the screen here again. Well, so far, this includes already the winners of April because the results come out.

So far, Andras Toth is leading with three packages and ten points, tied with Suresh Kumar that raised also to the first place again with three packages and ten points. Then, Gianluca Zanferrari with one package and seven points, Jackson Knowlton (one package and six points), Stephen Chapman (one package and four points); then several other authors with one package and three points.

By country, the rankings are still pretty much the same, except that instead of name of authors, we have countries because there is only one author per country. Unlike PHP Classes, JS Classes is not as popular, but we still quite have a nice collection of packages.

The first one is Hungary with three packages and ten points. The second one... well, actually, tied... is India with also three packages and ten points; then Netherlands with seven points; United States, also seven points but two packages. Then follows Australia with one package and four points and several other countries with one package and three points.

PHP Innovation Award Winners of March 2015 (53:30)

Manuel Lemos: Well, now, let's move on to Innovation Award of PHP. We are going also to talk about the Innovation Award winners of March. We have ten nominees that were nominated in March. They were voted in April, and the results came out in May.

Let's comment about a few. Arturs, which ones would you like to start to comment?

Arturs Sosins: OK, the first one I would want to comment is PHP CACERT Self-Signed Certificate developed by Vladimir Zurita from Chile. Basically, usually, there is an organization that we use in sites to verify CACERT certificates.

But in this case, this PHP package can create their own certificate and sign it themselves and verify. And as I understand, even do it for other domains. So it's probably would not be verisign or verified in the browser but it would work for testing purposes definitely. So that one is great.

Vladimir got PhpStorm IDE personal permanent license for this package.

Next package I wanted to comment on is XBenchmark, which is really useful for benchmarking or trying out your scripts in different performances. It was developed Xavier Perez from Spain, and it could create logs with access to the script and up to different kind of metrics there like time it took for scripts to execute, amount of RAM it use, URL, all the parameters request. So there are blocks, fortunately great for trying out, experimenting with optimizations and making several iterations.

Manuel Lemos: Actually, this class was nominated more because it can measure the performance of the whole script, not just parts of the code.

Arturs Sosins: Or request. Request, basically, yeah.

Manuel Lemos: So it uses a script that uses that setting auto_prepend_file, so once the script...

Arturs Sosins: ...include any additional code, basically.

Manuel Lemos: Yeah, exactly. So it can start to measure the benchmark from beginning to end. So it uses a register_shutdown_function to determine when the script has finished. So it is a bit different than the usual benchmark classes.

Arturs Sosins: Yeah, and Xavier got one downloadable copy of CodeLobster Professional for this package.

Manuel Lemos: Well, on my behalf, I would like to comment on a few classes as well. Let's move on.

The first one that I'd like to comment is one that is not trivial and not the type of use that you want to have in your everyday application, but is still is innovative because what does you can parse the configuration of DNS as implemented by the Bind program. Bind is a popular DNS server program, very old, and it can parse the values, extract the values from Bind 9 DNS configuration.

And what, he jumped here, and for this Jan picked one copy of Komodo IDE, which is a nice choice.

The next package I want to comment is again, Dave Smith is appearing everywhere, which is a great thing because he always sends great contributions. In this case, he sent a package for emulating a slot machine. It can emulate the pulling of the handles and discounting credits and so on. So it could be used if you like to present a virtual slot machine in your Web browser.

For this, Dave picked one downloadable copy of PhpED Professional, which is also nice prize.

PHP Innovation Award Rankings of 2015 (58:22)

Manuel Lemos: Now, for the Innovation Award rankings, let me go back here. So far, the ranking for 2015 already include the nominees of the winners of April, right?

So far, Dave Smith is already ranking number one, with 2 packages and 19 points. The last month, he earned many points because there were so many nominees that the winner gets much more points than if they were less.

So he is now number 1 with 2 packages and 19 points, followed by Mohammed Al Ashaal... I guess he's from Egypt... with 1 package and 16 points; then followed by AndrŽé Liechti with 2 packages and 16 points, so he's tied in second place; then, Matthew Knowlton with 1 package and 14 points; then, wapmorgan 2 packages and 14 points.

There goes my jumping mouse. And then, Samuel Adeshina from I think it's Nigeria with 1 package and 13 points, Dmitry Mamontov with 1 package and 12 points, Muhammad Arfeen (1 package, 11 points), then Jasenko Rakovic from Bosnia, right?

Arturs Sosins: Yup.

Manuel Lemos: With 1 package and 11 points, and then Abius X from Iran with 1 package and 11 points.

So the Innovation Award winners ranking for 2015 is getting very interesting. Let's see how is the ranking by countries. And this is getting even more interesting because now we have many authors from different countries.

But so far, Russia is leading with 5 packages and 41 points, followed by the United States with 3 packages and 33 points. Then, Egypt (3 packages and 28 points), Nigeria (2 packages and 20 points), Pakistan (2 packages and 19 points), Switzerland (2 packages and 16 points), Germany (4 packages and 15 points), Brazil (2 packages and 15 points) and Venezuela with 2 packages and 11 points, and finally, Iran with 1 package and 11 points.

As I mentioned, this is getting very, very interesting. Given that the following months, we have lots of nominees to rank, to score for the Innovation Award, this competition will get even more interesting.

Arturs Sosins: So these results already include the latest winners, right?

Manuel Lemos: This ranking includes the April winners. But then, in May, there were also like 15 nominees. Well, in reality, there was a sort of campaign in PHP Classes that has been increasing over time to encourage authors to send innovative packages. Not just send regular packages, send packages that are innovative. Fortunately, they are enjoying a lot. They are participating a lot and you can see that many, many good packages had been published.

I know next month, we have even more work to comment about all the 16 nominees that were presented. You can see them here. But let's deal with one month at a time.

Conclusion (1:02:26)

Manuel Lemos: OK, with this, we practically ended the already long podcast. I'd like to thank Arturs again for coming and helping to comment on these interesting PHP topics.

I also would like to thank Hotjar for their sponsorship, and I would like to recommend everybody to try their product. If you have a site and want to improve the opportunities and the usability if your site to go on and try their products at Hotjar.com.

With this, we reached the end. On my behalf, that is all for now. Bye.

Arturs Sosins: Bye.

[Music]




You need to be a registered user or login to post a comment

Login Immediately with your account on:

FacebookGmail
HotmailStackOverflow
GitHubYahoo


Comments:

No comments were submitted yet.



  Blog PHP Classes blog   RSS 1.0 feed RSS 2.0 feed   Blog PHP 7 to Be Even Fast...   Post a comment Post a comment   See comments See comments (0)   Trackbacks (0)