PHP Internals News: Episode 48: PHP 8, JIT, and complexity

PHP Internals News: Episode 48: PHP 8, JIT, and complexity

In this episode of "PHP Internals News" I discuss PHP 8's JIT engine with Sara Golemon (GitHub).

The RSS feed for this podcast is https://derickrethans.nl/feed-phpinternalsnews.xml, you can download this episode's MP3 file, and it's available on Spotify and iTunes. There is a dedicated website: https://phpinternals.news

Transcript

Derick Rethans 0:16

Hi, I'm Derick. And this is PHP internals news, a weekly podcast dedicated to demystifying the development of the PHP language. This is Episode 48. Today I'm talking with Sara Golemon about PHP 8 and JIT. Sara, would you please introduce yourself?

Sara Golemon 0:33

Hi there. Hi there, everybody listening to PHP internals podcast. I'm Sara. I've been on this podcast before. But in case you're just getting here to for the first time, welcome to the podcast. You have a nice backlog to go through. I am a lapsed web developer, come database security engineer by day, and an opinionated open source dev slash PHP 7.2 release manager by night and also day. I've been involved with the project for about 20 years now off and on. Somehow I just keep coming back for more punishment.

Derick Rethans 1:03

We're leading up to PHP 8, with lots of new features being added. But one of the biggest thing in PHP 8 that I've spoken about on the podcast on before all the way back last year in Episode 7, is that PHP eight is going to get a JIT engine. Would you care to explain what a JIT engine does again?

Sara Golemon 1:20

Well, I'm going to give you the short, you can look this up on Wikipedia in two seconds definition of JIT, means just in time compilation. That doesn't really tell you much, unless you listen to it on the sort of other half of that of AOT, or ahead of time compilation. AOT is what you expect from applications like GCC, you know, you just make an application that you've got C or C++ kind of source code to that's ahead of time. JIT is saying, well, let's take the source for application. And let's just run with it. Let's just start executing it as fast as I can. And eventually we're going to get down to some compiled code. That's going to run a little bit quicker than the initial stuff did. PHP already has this nice little virtual machine built into it. We call it the Zend engine. That takes your script and immediately just says: All right, well, what does this say in computer terms? Well, a computer readable term is a series of these op codes, they're also called byte codes in other languages that give you instructions for: run this type of instruction at this time and get something done. The PHP runtime interpreter interprets that one instruction at a time basically pretending to be a CPU. This works quite well, it runs quite efficiently. But there's still this sort of bottleneck in the middle there of a program pretending to be a CPU running on top of a CPU in order to run other code. The idea of JIT is that this thing sitting in the middle is going to gradually figure out what your program really is trying to do and how it's intended to run, and It's going to take those PHP instructions and it's going to turn them all the way down into CPU instructions, so that it can get out of the way and let the CPU run your code natively as if it had been written in a compiled AOT kind of language. What that actually means for execution of PHP code in PHP 8 is still sort of a, you know, a question that's, that's left to be answered here. I listened to your interview with Zeev. Episode 7, is a good episode of getting some good information on that. We do definitely agree on what the status of the JIT within PHP is, right now we can. It's subjective facts like this is how much work has been done largely by Dmitri, where we can kind of expect to see the best gains come from. I personally think I might be a little bit more pessimistic than him in terms of the actual

Truncated by Planet PHP, read more at the original (another 22291 bytes)

Trying to Maintain ‘Business as Usual’ During a Quarantine

I’ve been a home-based freelance web designer since 1999. So, when the COVID-19 pandemic started forcing a lot of people to work remotely, I figured not much would change in my routine. I even quipped on social media that isolation was just “old hat” for me.

True, working in a mostly-empty house for 20+ years does prepare you for a home-based lifestyle. During the workweek, I rarely get to venture further than my child’s school a few blocks away. So, staying home is nothing new.

Even so, there have been some unexpected challenges in trying to get things done at work. I’d like to say it’s just “business as usual”, but it’s really not. Here are a few things I’ve noticed during the quarantine.

Focusing Has Been Difficult

I admit that I am bit of a news junkie – even in the best of times. But the Coronavirus coverage has been especially difficult for me to ignore. And the more I read, the more concerned I am.

There’s a lot to digest. People falling ill and losing their lives. Businesses shutting down – including some that may not come back after this all passes. Kids (including my own) with no school to attend.

Speaking of which, I now have a housemate during the workday. That has been quite an adjustment so far. Trying to work and parent simultaneously is difficult – though I feel fortunate to have the opportunity. I realize so many others aren’t in a position to do so.

But all of this does make it harder to concentrate on work. Whether it’s breaking news or parenting duties, there are a lot of other things on my mind.

Certainly, these are issues that a lot of people are facing right now. The whole work/life balance has been thrown into a blender.

Blurred lights.

Handling Emergency Website Updates

Like many locales around the world, daily life in my region of the United States has come to a screeching halt. One day, everything was open for business. The next day, only the “essential” places remained. Everyone else is either working remotely or closed until further notice.

The swift change has kept web designers busy, that’s for sure. A number of clients have had to post messages regarding how their organization has been affected. Some have had to adjust their operating hours, some have closed and others have had to temporarily turn off eCommerce because they can’t fulfill orders.

This has resulted in a bit of a feast-or-famine cycle. Updates come in and need posted immediately – or as close to it as possible. Then, it’s quiet as can be for a period – until the next wave comes in.

Meanwhile, the sporadic chaos has had an effect on ongoing projects as well. It seems like gaining a bit of momentum in this area has been difficult.

A fire extinguisher.

Hanging on to Bits of Normalcy

Between the jaw-dropping news and the rush of emergency work, there’s been a real appreciation for anything that resembles normalcy.

Many of the everyday tasks I do for work have remained. In a strange way, it actually feels comforting to do them – even the grunt work. They are little reminders of how things used to be (even if it was just a few weeks ago).

Beyond that, the web development community has also kept moving forward. There are still plenty of tutorials, essays and news to occupy the mind.

A coffee mug on a table.

WordPress Keeps on Going

One of the more surprising tidbits is that, in the WordPress space, there are still plenty of plugins being updated. I actually wondered if there would be a prolonged slowdown in new features and bug fixes, but that has yet to happen.

However, perhaps I shouldn’t be too surprised by that. A number of releases were probably in the works before the impact of COVID-19. And, a lot of those who work in the WordPress community are doing so remotely. So, it makes sense that they continue to write code as other businesses close up shop.

As to what the future holds – that’s anyone’s guess. At the time of this writing, WordPress hasn’t altered their release schedule. And WooCommerce 4.0, a major release, recently came out. So, there will still be plenty of new features to play with from the comfort of our home offices.

The one part of the community that has been hurt are the in-person gatherings. WordCamps all over the world have been postponed. Some online-only events are popping up, though. That at least provides an avenue for learning and a little bit of virtual socialization.

A person looking at a computer screen.

Coping with the New Normal for Web Designers

Overall, I don’t think my experience has been at all what I expected. Although, it’s not like any of us had a whole lot of time to think about it in advance.

Some things remain very much the same. I boot up the computer at the same time each day. I perform tasks for clients. I’m still working from the same comfy chair I’ve been in for years.

But there is definitely a cloud of uncertainty. The news is still concerning, if not frightening. And, as the days go by, it’s hard to know what will happen to my business or those of my clients.

I guess the bottom line is that we’re all in the same boat. Fortunately, being a web designer allows us to keep on working – even when the world seems to be in chaos. That little bit of normalcy keeps us going and puts food on the table. For that, I am very thankful.

So, how has the quarantine affected you and your design business? Hit me up on Twitter and let me know how you’re doing.

The post Trying to Maintain ‘Business as Usual’ During a Quarantine appeared first on Speckyboy Design Magazine.

CodeIgniter Admin Panel with User Management (New)

Package:
Summary:
CodeIgniter panel to manage application users
Groups:
Author:
Description:
This package provides a CodeIgniter panel to manage application users...

Read more at https://www.phpclasses.org/package/11603-PHP-CodeIgniter-panel-to-manage-application-users.html

CodeIgniter Admin Panel with user Management (New)

Package:
Summary:
CodeIgniter panel to manage application users
Groups:
Author:
Description:
This package provides a CodeIgniter panel to manage application users...

Read more at https://www.phpclasses.org/package/11603-PHP-CodeIgniter-panel-to-manage-application-users.html

People of WordPress: Mario Peshev

You’ve probably heard that WordPress is open source software, and may know that it’s created and run by volunteers. Enthusiasts share many examples of how WordPress has changed people’s lives for the better. In this monthly series, we share some of those lesser-known, amazing stories.

Computer science in the nineties

Mario Peshev

Mario has been hooked on computers ever since he got his first one in 1996. He started with digging into MS-DOS and Windows 3.1 first and learned tons by trial and error. Following that adventure, Mario built his first HTML site in 1999. He found development so exciting that he spent day and night learning QBasic and started working at the local PC game club. Mario got involved with several other things related to website administration (translating security bulletins, setting up simple sites, etc) and soon found the technology field was full of activities he really enjoyed.

The Corporate Lifestyle

Mario started studying programming including an intensive high-level course for C#, Java development, and software engineering, and eventually got a job in a corporate environment. He soon became a team lead there, managing all the planning and paperwork for their projects.

But he continued freelancing on the side. He grew his own network of technical experts through attending, volunteering at, and organizing conferences. He also ran a technical forum and regularly spoke at universities and enterprise companies.

Remote Working and Business Opportunity

The combination of a high workload and a daily three-hour-long commute made Mario’s life difficult. Many of his friends were still studying, traveling or unemployed. The blissful and calm lives they lived seemed like a fairy tale to him. And even while both his managers and his clients were abroad, he was unable to obtain permission to work remotely. 

So Mario decided to leave his job and start freelancing full time. But he found he faced a massive challenge. 

He discovered Java projects were pretty large and required an established team of people working together in an office. All job opportunities were on-site, and some even required relocation abroad. Certified Java programmers weren’t being hired on a remote basis. 

As Mario had some PHP experience from previous jobs, he used this to start his freelance career. For his projects, he used both plain PHP and PHP frameworks like CakePHP and CodeIgniter. 

For a while, Mario accepted work using commonly known platforms including Joomla, Drupal, and WordPress. In addition, he worked on PHP, Java, Python and some C# projects for a couple of years, after which he decided to switch to WordPress completely.

Building products

One of his projects involved a technically challenging charity backed by several international organizations. Unexpected shortages in the team put him in the technical lead position. As a result, Mario found himself planning the next phases, meeting with the client regularly, and renegotiating the terms. The team completed the project successfully, and after the launch, a TV campaign led millions of visitors to the website.

As a result of the successful launch, this client invited Mario to participate in more WordPress projects, including building a custom framework.

“I wasn’t that acquainted with WordPress back then. For me, a conventional person trained in architectural design patterns and best practices, WordPress seemed like an eccentric young hipster somewhere on the line between insane and genius at the same time. I had to spend a couple of months learning WordPress from the inside out.”

Mario Peshev

As his interest in WordPress grew, Mario stopped delivering other custom platforms, and converted clients to WordPress. 

European Community

Mario presenting to an audience
Mario presenting at a WordCamp

For Mario, one of the key selling points of WordPress was the international openness. He had previously been involved with other open source communities, some of which were US-focused. He felt they were more reliant on meeting people in person. With events only taking place in the US, this made building relationships much harder for people living in other countries.

While the WordPress project started out in the US, the WordPress community quickly globalized. Dozens of WordCamps and hundreds of Meetup events take place around the globe every year.  All of these events bring a wide variety of people sharing their enthusiasm for WordPress together.

For Mario, the birth of WordCamp Europe was something magical. The fact that hundreds, and later on thousands, of people from all over the world gathered around the topic of WordPress speaks for itself. Mario has been involved with organizing WordCamp Europe twice (in 2014 and 2015). 

“There’s nothing like meeting WordPress enthusiasts and professionals from more than 50 countries brainstorming and working together at a WordCamp. You simply have to be there to understand how powerful it all is.”

Mario Peshev

Growing businesses and teams

A key WordPress benefit is its popularity – an ever growing project currently powering more than 35% of the Internet [2020]. It’s popular enough to be a de facto standard for websites, platforms, e-commerce and blogs. 

WordPress has a low barrier to entry. You can achieve a lot without being an expert, meaning most people can start gaining experience without having to spend years learning how to code. That also makes it easier to build businesses and teams.

“Being able to use a tool that is user-friendly, not overly complicated and easily extensible makes introducing it to team members faster and easier. It requires less time for adjustment, and as a result makes a team stronger and faster. The fact that this tool is cost-effective also allows more startups to enter the market. It requires  less time and investments to launch an MVP. This boosts the entire ecosystem.”

Mario Peshev

Helping Others

Mario also introduced WordPress to children and young people. He taught them how to use WordPress as a tool for homework and class assignments. By using WordPress, they were able to learn the basics of designing themes, developing plugins, marketing statistics, social media, copywriting, and so much more. This approachable introduction to the software meant technical skills were not needed.

He was also part of a team of volunteers who helped a group of young people living at a foster home struggling to provide for themselves. The team taught the basic digital literacy skills necessary in the modern workplace and potentially pay for their rent and basic needs. This included working with Microsoft Word, Excel and WordPress, as well as some basic design and marketing skills. 

“When you look at that from another perspective, a platform that could save lives – literally – and change the world for better is worth contributing to, in any possible manner.”

Mario Peshev

Contributing to the WordPress community

From the core team to supporting and organizing WordCamps, Mario has long been an active contributor to the global WordPress project. He is passionate about the connections fostered by people who are involved in building both the WordPress software and the community around it.

“The WordPress community consists of people of all race and color, living all around the world, working as teachers, developers, bloggers, designers, business owners. Let’s work together to help each other. Let’s stick together and show  the world WordPress can help make it a better place.”

Mario Peshev

Contributors

Thanks to Alison Rothwell (@wpfiddlybits), Yvette Sonneveld (@yvettesonneveld), Abha Thakor (@webcommsat), Josepha Haden (@chanthaboune) and Topher DeRosia (@topher1kenobe). Thank you to Mario Peshev (@nofearinc) for sharing his #ContributorStory.

HeroPress logo

This post is based on an article originally published on HeroPress.com, a community initiative created by Topher DeRosia. HeroPress highlights people in the WordPress community who have overcome barriers and whose stories would otherwise go unheard.

Meet more WordPress community members over at HeroPress.com!

Community News: Latest PECL Releases (04.07.2020)

Latest PECL Releases:

  • rpminfo 0.5.0
    - add rpmaddtag() function

  • amqp 1.10.2
    - Windows build: avoid variable lengths arrays (Christoph M. Becker) (https://github.com/pdezwart/php-amqp/issues/368)

    For a complete list of changes see: https://github.com/pdezwart/php-amqp/compare/v1.10.1...v1.10.2

  • amqp 1.10.1
    - Fix Windows compatibility: avoid variable lengths arrays (Christoph M. Becker <cmbecker69@gmx.de>) (https://github.com/pdezwart/php-amqp/issues/368)

    For a complete list of changes see: https://github.com/pdezwart/php-amqp/compare/v1.10.0...v1.10.1

  • amqp 1.10.0
    - Adding global prefetch support (#366) (Terence Marks <tezmarks@gmail.com>) (https://github.com/pdezwart/php-amqp/issues/367) - Fix minimal librabbitmq in config.m4 and readme (Remi Collet <remi@remirepo.net>) (https://github.com/pdezwart/php-amqp/issues/347) - Support connection_name parameter for custom connection names in RabbitMQ (Alexandr Zolotukhin <supersmile2009@gmail.com>) (https://github.com/pdezwart/php-amqp/issues/363) - Fixed build on Travis CI (Alexandr Zolotukhin <supersmile2009@gmail.com>) (https://github.com/pdezwart/php-amqp/issues/365) - Make use of rpc_timeout in newer librabbitmq by introducing new constructor hash parameter (modulatix <oleg.pereverzev@gmail.com>) (https://github.com/pdezwart/php-amqp/issues/334) - Fix #355: Compile failure on php 7.4 (Christoph M. Becker <cmbecker69@gmx.de>) (https://github.com/pdezwart/php-amqp/issues/359) - Update amqp_type.c (Pawe? Miko?ajczuk <pawel@mikolajczuk.in>) (https://github.com/pdezwart/php-amqp/issues/360) - Build against PHP 7.4 (Carlos Barrero <carlos.barrero@spotahome.com>) (https://github.com/pdezwart/php-amqp/issues/361) - Pass params by value in AMQPConnection::__construct() (Sergei Karpov) (https://github.com/pdezwart/php-amqp/issues/346) - Fix explicit null-string for $routing_key in Queue::bind() and Exchange::publish() (Sergei Karpov) (https://github.com/pdezwart/php-amqp/issues/341) - No longer limited to PHP 5 (Lars Strojny <lars.strojny@internations.org>) (https://github.com/pdezwart/php-amqp/issues/0) - Fix minimal version to 5.6 (Remi Collet <remi@famillecollet.com>) (https://github.com/pdezwart/php-amqp/issues/338) - Back to dev (Lars Strojny <lars.strojny@internations.org>) (https://github.com/pdezwart/php-amqp/issues/1)

    For a complete list of changes see: https://github.com/pdezwart/php-amqp/compare/v1.9.4...v1.10.0

  • gRPC 1.28.0
    - gRPC Core 1.28.0 update
  • datadog_trace 0.42.0
    ### Added
    • Close open sandboxed spans on exit (PHP 5) #780
    • Prehook feature to run tracing closures before the original call #784

    Changed

    • Enable background sender (BGS) by default #796, #800
    • Improves alpine extensions build/verify process #774
    • Refactor Symfony integration #786
    • Let curl calculate Content-Length header value when sending requests to the agent #804

    Fixed

    • Pass return value as null to tracing closure when value IS_UNDEF #791 (thanks for the report @wajdisawaf!)
    • Set a sane memory limit when running php from inside post-install hook #792
  • yaf 3.1.4
    - Fixed issue #469 (treat autocontroller as Controller mistakenly) - Fixed issue #468 (abort if same key assigned to view) - minor optimization to avoding memory allocations
  • swoole 4.4.17
    Enhancement --- + Improve SSL Server performance (#3077) (85a9a595) (@matyhtf) + Remove SW_HTTP_HEADER_VALUE_SIZE, SW_HTTP_HEADER_BUFFER_SIZE (#3187) limitation (@twose) + Support MIPS (#3196) (@ekongyun) + Support CURLOPT_HTTPAUTH (swoole/library@570318be) (@twose)

    Fixed

    • Fixed behavior of package_length_func and memory leak (#3111) (@twose)
    • Fixed HTTP 304 error (#3118) (#3120) (@twose)
    • Fixed incorrect macro expansion (#3142) (@twose)
    • Fixed OpenSSL function signature (#3154) (#3155) (@twose)
    • Fixed SSL error msg (#3172) (@matyhtf) (@twose)
    • Fixed PHP-7.4 compatibility (@twose) (@matyhtf)
    • Fixed HTTP chunk length parser (19a1c712) (@twose)
    • Fixed chunked multipart parser (3692d9de) (@twose)
    • Fixed ZEND_ASSUME failed (fc0982be) (@twose)
    • Fixed Socket address error (d72c5e3a) (@twose)
    • Fixed Socket get name #3177 (#3179) (@matyhtf)
    • Fixed static handler with empty file (#3182) (@twose)
    • Fixed upload file handler on CoroutineHttpClient (#3189) (#3191) (@twose)
    • Fixed possible memory error on shutdown (44aef60a) (@matyhtf)
    • Fixed Server->heartbeat (#3203) (@matyhtf)
    • Fixed reactor defer task (only tasks of the current round will be called) (#3207) (@twose)
    • Fixed invalid write on immutable array (#3212) (@twose)
    • Fixed double wait, improve error message (swoole/library@537a82e1) (@twose)
    • Fixed empty header (keep same with cURL) (swoole/library@7c92ed5a) (@twose)
    • Fixed non-IO methods error handler (swoole/library@f6997394) (@twose)
    • Fixed wrong proxy header (swoole/library@5e94e5da) (@twose)
Powered by Gewgley