Suyati Technologies
  • Services
    • Salesforce Services
      • Sales Cloud
      • Service Cloud
      • Marketing Cloud
      • Einstein
      • Experience Cloud
      • Mulesoft
      • Commerce cloud
      • Finance cloud
      • CPQ
      • Consultation
      • Implementation
      • Integration
      • Custom Development
      • Salesforce DevOps
      • Support & Maintenance
      • App Development
      • Managed Services
    • IT Services
      • Content Management Services
      • Analytics
      • RPA
      • Front end Technologies
      • Microsoft Applications
      • Cloud
      • DevOps
      • Snowflake
  • Approach
    • Development Methodology
    • Engagement Model
    • Consulting
  • Intel
    • Blog
    • eBooks
    • Webinars
    • Case Studies
  • About Us
    • Management Team
    • Advisory Board
    • Our Story
    • Testimonials
  • Careers
  • Contact Us
Suyati Technologies
  • Services
    • Salesforce Services
      • Sales Cloud
      • Service Cloud
      • Marketing Cloud
      • Einstein
      • Experience Cloud
      • Mulesoft
      • Commerce cloud
      • Finance cloud
      • CPQ
      • Consultation
      • Implementation
      • Integration
      • Custom Development
      • Salesforce DevOps
      • Support & Maintenance
      • App Development
      • Managed Services
    • IT Services
      • Content Management Services
      • Analytics
      • RPA
      • Front end Technologies
      • Microsoft Applications
      • Cloud
      • DevOps
      • Snowflake
  • Approach
    • Development Methodology
    • Engagement Model
    • Consulting
  • Intel
    • Blog
    • eBooks
    • Webinars
    • Case Studies
  • About Us
    • Management Team
    • Advisory Board
    • Our Story
    • Testimonials
  • Careers
  • Contact Us
Suyati Technologies > Blog > What you should look forward to in PHP 7

What you should look forward to in PHP 7

by Nayab Naseer December 23, 2014
by Nayab Naseer December 23, 2014 0 comment

PHP, like all software, keeps on evolving, with every new release bringing in new features. In between the major releases are minor releases that mainly fix bugs and make a few minor tweaks.
In August 2014, after a lot of discussion and voting, the PHP community decided on PHP 7 as the next major version of PHP. While this is normal, what is of interest is that PHP 7 would replace PHP 5.x, and a major point of discussion was on whether to name the new update as PHP 6, the logical progression, or as PHP 7.
In the end PHP 7 prevailed.
What happened to PHP 6?
Those in favor of PHP 7 claim that PHP 6 was the name of a PHP branch that was killed in 2010 and assigning the same name would cause confusion.
PHP 6 was a very ambitious development initiated in February 2005 by a small band of developers from Yahoo, Zend and the core PHP development community. Lack of Unicode support is a big drawback of PHP, and this development aimed at addressing this shortcoming, by introducing Unicode support as standard in all PHP text handling, in PHP engine, extensions, and API. Unicode is a composite industry standard for consistent encoding, representation and handling of text expressed in most writing systems of the world. It provides a unique number for each character regardless of the platform, program or language, thereby simplifying development considerably.
Initially intended as a PHP 5.x version, extensive changes mandated a major version bump and thus the work on PHP 6 was initiated. The project had a good beginning, with a successful proof of concept developed. However, a gross shortage of developers who actually understood the necessary changes and performance issues that arose when conversion was done to and from UTF-16, created big stumbling blocks; to the extent that the project had to be aborted in 2010. Implementation was deemed technically too difficult and a majority of those in the PHP community were wary of converting large chunks of already working code. Some clean-ups and improvements such as traits and closure re-binding, which the Unicode project achieved, were back-ported to PHP 5.4 and life moved on without Unicode support.
The case of PHPNG
In the meantime, Unicode notwithstanding, Facebook wanted certain features in PHP, and tired of waiting for it, decided to go ahead and do it themselves. For instance, the PHP core developers always considered the effort to make the Zend Engine-based PHP fully thread safe as too complicated. But it was not too complicated for the developers at Facebook, who went ahead and made its HHVM-based implementation as thread safe as it should be.
In no time, Facebook’s Hack, an open-source programming language for the HipHop Virtual Machine (HHVM) posed a stiff challenge to conventional PHP. The Hack language provides many features that PHP users want but are not available. Some of these features are:

  1. Type Hinting: Hack offers support for type hinting on function arguments, function return values, and variables. Type hinting is useful for enforcing type checks, detecting bugs in code and help the HHVM engine generate optimized native machine code. With type hinting, the machine code becomes smaller and faster.
  2. Asynchronous Programming: Asynchronous programming facilitates execution of multiple tasks in parallel, when waiting for asynchronous tasks that depend on I/O operations such as accessing files, network, and databases. Hack’s await keyword facilitates this.
  3. Production Ready Standalone Web server: Hack code runs inside HHVM as a single command line script, as a Web server, or as a FastCGI server. This means that HHVM can run PHP Web applications without the need for a separate Web server.
  4. Multithread server: HHVM runs as a multithreaded Web server, capable of accepting simultaneous connections in separate threads. When PHP tries to do that, it crashes owing to memory corruption caused by multiple threads attempting to access the same data in the same memory space.

PHP developers always put off developing such features, claiming that it would take a lot of time and effort. With Hack in the fray, they no longer had the luxury of such excuses.
To counter the challenge posed by Hack, Dmitry Stogov of Zend launched a quasi-secret development branch of PHP, named PHPNG (PHP Next Generation). PHPNG aimed to infuse PHP with a whole new level of performance and memory usage efficiency.
Apart from the above mentioned Hack features that PHP lacks, PHPNG offered a JIT engine. The JIT engine is capable of compiling Zend opcodes into native machine code dynamically, and would make the code run faster.
PHPNG remains a work in progress, and as such, the full list of proposed features is not yet known, or even defined. However, whatever work done until now seems promising. Server tests clock 20% more requests per second when testing PHPNG with a WordPress installation. However, all PHP applications do not yet benefit from similar performance improvements, and this will not result in speed improvements anyhow.
From PHPNG to PHP 7 
The original intention was to merge the PHPNG branch into PHP 6 when complete. However, with PHP 6 being abandoned, it is expected that the PHPNG branch will be merged into PHP 7.
In parallel to the discussion on the naming of the next PHP major version as PHP 6 or PHP 7, a proposal was presented to turn the PHPNG branch as the base of PHP 7. This is most likely to happen, and the new PHP 7 will, in all probability, be a merger of PHPNG to mainstream PHP 5.x version.
Apart from the improvements proposed and intended in PHPNG, such as Asynchronous Programming, JIT engine and more, the new PHP 7 would most likely include the following additional features.

  • AST: Abstract Syntax Tree: Nikita Popov, a key person in the PHP community, proposed the implementation of Abstract Syntax Tree (AST), as an intermediary step for the PHP compilation process. An AST offers potential for more optimizations, making PHP run even faster. It also provides scope for launching tools such as static code analyzers to detect bugs or make source level optimizations to the source code.
  • Standalone Multi-threading Web Server: It is possible to run PHP from multi-threaded Web servers such as ngynx, lighttpd and Apache in worker mode. However, with its own multi-threading Web server, PHP would be able to handle multiple requests simultaneously, using a single memory pool, and thereby avoid the memory waste that happens when PHP is run in the present FastCGI or in Apache pre-fork mode.

While it is too early to say when PHP 7 would eventually roll out, what is certain is that it is interesting times ahead as PHP is shaken from its lethargy and is trying to catch up with Hack.

0 comment
0
FacebookTwitterLinkedinTumblr
previous post
8 questions to ask before you buy a CRM tool
next post
10 Tips to Connect with Your Customers Better During the ‘Sale’ Season

You may also like

What you need to know before kick-starting cloud...

January 13, 2022

An Eye-opener into the Future Trends in Salesforce...

January 13, 2022

Seven Key IT Outsourcing Trends to Expect in...

January 13, 2022

How to Select the Right Partner for a...

January 13, 2022

On Premises vs Cloud CRM: Which is Better?

September 28, 2021

Choosing between Cloud and On-Premise Servers for your...

September 28, 2021

Broken Customer Experience? What’s the Fix?

August 19, 2020

Are Remote Proctored Exams a New Reality?

August 18, 2020

10 Exciting Features in Salesforce’s new Summer ’20...

August 17, 2020

Importance of Data Analytics in Developing Smart Cities

August 11, 2020

Leave a Comment Cancel Reply

Save my name, email, and website in this browser for the next time I comment.

Keep in touch

Twitter Linkedin Facebook Pinterest

Recent Posts

  • What you need to know before kick-starting cloud implementation

    January 13, 2022
  • An Eye-opener into the Future Trends in Salesforce Commerce Cloud

    January 13, 2022
  • Seven Key IT Outsourcing Trends to Expect in 2022

    January 13, 2022

Categories

  • Twitter
  • Linkedin
  • Facebook
  • Instagram
  • Services
    • Salesforce Services
      • Sales Cloud
      • Service Cloud
      • Marketing Cloud
      • Einstein
      • Experience Cloud
      • Mulesoft
      • Commerce cloud
      • Finance cloud
      • CPQ
      • Consultation
      • Implementation
      • Integration
      • Custom Development
      • Salesforce DevOps
      • Support & Maintenance
      • App Development
      • Managed Services
    • IT Services
      • Content Management Services
      • Analytics
      • RPA
      • Front end Technologies
      • Microsoft Applications
      • Cloud
      • DevOps
      • Snowflake
  • Approach
    • Development Methodology
    • Engagement Model
    • Consulting
  • Intel
    • Blog
    • eBooks
    • Webinars
    • Case Studies
  • About Us
    • Management Team
    • Advisory Board
    • Our Story
    • Testimonials
  • Careers
  • Contact Us

© 2021 Suyati Technologies


Back To Top
Suyati Technologies

Popular Posts

  • 1

    What are the Top 3 risks for implementing a CX Program?

    August 30, 2019
  • 2

    Do you need a separate CX Team at your company?

    September 2, 2019
  • 3

    How to build Employee Advocacy for your Business?

    September 3, 2019
  • 4

    What is Salesforce CRM and What Does it Do?

    February 19, 2014
  • 5

    Tips to Reduce Salesforce Pricing

    February 17, 2015
© 2021 Suyati Technologies

Read alsox

4 Big Data Insights from NoSQL World

March 28, 2016

Growth of ecommerce for Retail ver 1.0

September 22, 2012

Key Takeaways for CRMUG Summit 2017

October 9, 2017

By continuing to use this website you agree with our use of cookies. Read More Agree