Tag Archives: php

Facebook’s HHVM completely switches to Hack instead of PHP

The next long-term support release of HHVM which will be released in early 2018 is going to be the last version that commits to PHP 5.

Facebook’s Hip-Hop Virtual Machine (HHVM) is a speedy engine for PHP, will not target the most recent major release of PHP (PHP7) and instead will focus on Hack language which is a PHP spinoff.

As trying to support both PHP 7 and Hack would lead the HHVM team to undesirable compromises on both fronts they decided to separate themselves from PHP so they can evolve Hack without having to face all of the oldest and darkest concerns of the PHP’s design.

PHP 7 is representing a substantive departure from PHP 5, it has changed many behaviors which some of them is not backward-compatible, Consequently, HHVM will not aim to target PHP 7 the HHVM development team believes that they have a clear path toward making Hack a fantastic language for web development, untethered from its PHP origins.
Facebook has used HHVM for many years to almost exclusively to run Hack. They said: The Hack language had addressed many of PHP 5’s shortcomings which some of them are fixed by PHP 7 as well and by cutting loose from PHP we are hoping to provide a higher performance experience with HHVM and Hack which can be achieved by creating many features, libraries, and performance opportunities.

Some of the planned improvements of Hack are below:

  • Completing Hack arrays, with array-like data structures that are easier to type-check
  • Eliminating destructors and references
  • Using garbage collection to produce measurable performance improvement.

Hack was born in the PHP ecosystem so Facebook has plans to make HHVM compatible with major PHP tools such as Composer and PHPUnit, but the main goal for Hack is to have its own ecosystem and can act as a core of frameworks.

How to Install Apache 2.2, PHP 5.6, MySQL 5.7 on CentOS 6

Today I am going to teach you the easiest way of installing a Webserver with Apache, PHP, and MySQL.

We are going to use Epel and Remi repositories on CentOS and configure our server. First of all, we should find the latest version of Epel and Remi packages from their sites :


After it, we will download the packages on our system and install them on the server.

wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -Uvh remi-release-6.rpm epel-release-6-8.noarch.rpm

After these packages are installed completely, we should activate these repositories on Yum configuration file.

nano /etc/yum.repos.d/remi.repo

Make sure that “[remi]” and “[remi-php56]” are enabled. It should look like as following.

name=Remi’s RPM repository for Enterprise Linux 6 – $basearch

name=Remi’s PHP 5.6 RPM repository for Enterprise Linux 6 – $basearch
# NOTICE: common dependencies are in “remi-safe”

We have to save the file and then edit the Epel repository to make sure it is enabled too.

nano /etc/yum.repos.d/epel.repo

It should be enabled as following :

name=Extra Packages for Enterprise Linux 6 – $basearch

Now we can start to install PHP, apache on our system.

yum clean all
yum update
yum install php php-mysql

After all these steps are done, we will install MySQL on our system.

wget http://dev.mysql.com/get/mysql57-community-release-el6-7.noarch.rpm
yum localinstall mysql57-community-release-el6-7.noarch.rpm
yum repolist enabled | grep “mysql.*-community.*”
yum install mysql-community-server

It is now fully installed, we will start all services and will confirm the installed versions.

service mysqld restart
mysql –version
service httpd restart
php -v
httpd -v

If you have any question, please add a comment and I will get you back.