News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Facebook Code Blog:
Announcing the Hack Transpiler
November 12, 2014 @ 12:11:47

On the Facebook Hack blog there's an announcement about a new tool they've created to "reverse engineer" Hack code and turn it back into normal PHP - the Hack Transpiler. There's also more information in the Facebook announcement:

Today, we're proud to announce a first, experimental release of h2tp, or the "HH (Hack) Transpiler," a tool which allows projects that have converted from PHP to Hack to still make releases that target the PHP language.

Since the launch of Hack, many community members have asked us how to manage forward compatibility. Hack is backwards-compatible with PHP - if you're running PHP on HHVM, Hack code will seamlessly integrate with it. But the inverse is not true.

The announcement talks about the things that make Hack, well, Hack and how it's not just a simple find and replace to convert it back into PHP. Their "h2tp" tool also converts things like collections and short lambda expressions back into structured PHP. To illustrate, they include some before and after code, showing the addition and substitution of PHP for the Hack shorthand operators. The post also covers some of the hurdles they faced during the implementation of the "h2tp" tool, including error handling.

0 comments voice your opinion now!
facebook hack tool covert language h2tp hhvm language

Link: https://code.facebook.com/posts/398235553660954/announcing-the-hack-transpiler/

HHVM Blog:
The Journey of a Thousand Bytecodes
October 06, 2014 @ 12:49:38

In the latest post to the HHVM (HipHop VM) blog Sara Golemon recounts the journey of a thousand bytecodes and the process that it takes to decompose a PHP file and optimize it for execution in the HHVM environment.

Compilers are fun. They take nice, human readable languages like PHP or Hack and turn them into lean, mean, CPU executin' turing machines. Some of these are simple enough a CS student can write one up in a weekend, some are the products of decades of fine tuning and careful architecting. Somewhere in that proud tradition stands HHVM; In fact it's several compilers stacked in an ever-growing chain of logic manipulation and abstractions. This article will attempt to take the reader through the HHVM compilation process from PHP-script to x86 machine code, one step at a time.

The process is broken down into six different steps, each with a description and some code examples where relevant:

  • Lexing the PHP to get its tokens
  • Parsing the token results into an AST (and optimizing it along the way)
  • Compilation to Bytecode
  • HHBBC Optimization
  • Intermediate Representation
  • Virtual Assembly
  • Emitting machine code
0 comments voice your opinion now!
hhvm bytecode process hiphop compile decode optimize

Link: http://hhvm.com/blog/6323/the-journey-of-a-thousand-bytecodes

Voices of the ElePHPant:
Interview with Sara Golemon
September 18, 2014 @ 10:55:48

The Voices of the ElePHPant podcast has posted its latest episode, another interview with a PHP community member. This time they talk with Sara Golemon, a developer at Facebook that works on HHVM and Hack.

They talk about some of the current work being done with the HHVM and Hack projects, including parity with normal PHP and performance changes. They also talk some about Sara's favorite feature the team has worked on (xhp) and where the idea for it came from. Cal also has Sara define Hack and describe what it can and can't do.

You can listen to this latest episode either through the in-page player or by downloading the mp3 directly. If you enjoy the interview be sure to subscribe to their feed to get the latest episodes as they're released.

0 comments voice your opinion now!
voicesoftheelephpant saragolemon community interview hhvm hack

Link: http://voicesoftheelephpant.com/2014/09/16/interview-with-sara-golemon

HHVM Blog:
HHVM Long Term Support
September 03, 2014 @ 10:50:20

The HHVM (HipHop VM from Facebook) has released an update on their blog today discussing some of the long term support they plan to provide for the project and what kinds of things it will involve.

HHVM is known for its very intense and quick development pace: currently we ship to GitHub the exact same code we use to run the Facebook site within minutes of every commit, and we release a full version every 8 weeks. That is great and at the same time scary if you are trying to build a business or infrastructure around it. The HHVM team at Facebook understands that in order to reach every corner of the PHP landscape our users need to have some sort of commitment, in order to plan their deployments accordingly and to know how upstream will react to security and stability fixes in already released versions, for example.

Starting with HHVM v3.3, they'll be supporting two major versions at all times. They provide a table of versions and dates to give you an idea of when the support coverage period is and when they'll end. There's also some discussions about the packaged released for the various linux distributions and what kinds of updates might be included in the long-term support (LTS) updates.

0 comments voice your opinion now!
hhvm support hiphop virtualmachine schedule longterm version

Link: http://hhvm.com/blog/6083/hhvm-long-term-support

Allan MacGregor:
Exploring Hack Building a MicroFramework
August 11, 2014 @ 09:09:13

Allan MacGregor has started a new series of posts to his site where he creates a microframework in Hack, the language created by Facebook to compliment their HHVM (Hip-Hip Virtual Machine) project. He sees it as a "learn by doing" kind of thing and wanted to share his results.

I honestly believe the best way to learn something is to get your hands dirty and make mistakes; so instead of writing dozens of post on the many new features of Hack and why they are awesome (in theory) let's build something useful. So to get started I've decided to build a micro-framework using HACK and HHVM, building a simple microframework should be a challenging enough task to illustrate some of the more interesting features of the language and at the same time it has an achievable goal so we don't end on a never ending development cycle.

His framework, one he calls "Slash", will mostly be about creating RESTful applications but it could, in theory, be for any kind of web application. He also mentions some of the other great microframeworks out there already that are well-developed and have good communities behind them (including Slim and Silex. This is just the first part of the series and introduces some of the "why" around his goal. In the next part of the series he'll get into the structure and routing with some actual framework code.

0 comments voice your opinion now!
hack microframework facebook hhvm language slash

Link: http://coderoncode.com/2014/08/06/exploring-hack-part1.html

Kinsta.com:
Real-World WordPress Benchmarks with PHP5.5 PHP5.6 PHP-NG and HHVM
July 30, 2014 @ 12:26:51

The Kinsta.com blog has a new post with the results of some benchmarking they've done around WordPress comparing PHP 5.5, PHP 5.6 (PHPNG) and HHVM in response time (well, time taken for the request).

If you remember we wrote an article a good couple of months ago when WordPress 3.9 came out that HHVM was fully supported beginning with that release, and we were all happy about it. The initial benchmark results showed HHVM to be far more superior than the Zend engine that's currently powering all PHP builds.

[...] Obviously you have to compromise based on your (or rather your sites') needs but is it worth it? How much of a performance gain can you expect by switching to HHVM? [...] Today I finally took the time to set up a test environment and do some tests to compare a couple of different builds with a fresh out of the box WordPress install and one that has a bunch of content added plus runs WooCommerce!

The testing was all done locally on virtual machines (using Vagrant setups) and two different kinds of test WordPress installations. They share the results in the post, showing the differences between the HHVM installations and the plain PHP ones. The results also show the differences between having the opcode cache on and off. Curious to see how it would perform outside of a local system, they also pushed the same configurations out to a DigitalOcean instance with some slightly different results.

0 comments voice your opinion now!
wordpress benchmark php55 php56 phpng hhvm compare results

Link: https://kinsta.com/blog/real-world-wordpress-benchmarks-with-php5-5-php5-6-php-ng-and-hhvm/

HHVM Blog:
HHVM 3.1.0
May 30, 2014 @ 11:56:54

On the HHVM blog today they've announce the release of the latest version of the popular project, version 3.1.0. This version fixes a few issues (including a segfault) and crossed into their semi-annual "lockdown" to work directly on the project.

If you remember last time we focused on framework unit tests, performance, and growing beards. This time, our frameworks were in good shape thanks to Fred and our Open Academy students, but our github story was not as pretty. At the start of lockdown we had 60 pull requests and nearly 450 issues. So our focus this time was github health and of course as always, perf.

In the end they closed out 251GitHub issues and made things 16% more efficient in the process. They list out some of the updates in this release including:

You can grab this latest release from the pre-build packages page on the GitHub project account.

0 comments voice your opinion now!
hiphop vm hhvm release version github issues

Link: http://hhvm.com/blog/5195/hhvm-3-1-0

SitePoint PHP Blog:
PHP Fights HHVM and Zephir with PHPNG
May 27, 2014 @ 10:14:23

In a new post to the SitePoint PHP blog Bruno Skvorc talks about a "fight" that has broken out between various technologies vying to come out as the top PHP performance platform...more specifically the recent PHPNG patch to the PHP language itself.

Chaos in the old world! First HipHop, years ago, and no one bats an eye. Then suddenly, HHVM happens, introduces Hack, and all hell breaks loose - Facebook made a new PHP and broke/fixed everything (depending on who you ask). Furthermore, Zephir spawns and threatens with C-level compilation of all your PHP code, with full support for current PHP extensions. It's mushroom growth time for alternative PHP runtimes, and HippyVM appears as well. Amid the sea of changes, another splash was heard: PHPNG.

He covers some of the basics of the PHPNG patch, who has been working on it and some of the main pros and cons about the refactor. While it does provide a speed boost and native extension support, not all extensions are supported and the internal developers are divided on its adoption.

0 comments voice your opinion now!
hhvm zephir performance phpng introduction

Link: http://www.sitepoint.com/php-fights-hhvm-zephir-phpng/

HHVM Blog:
Hack Community Roundup
May 19, 2014 @ 12:45:12

For those interested in what's going on in the world of Hack (the Facebook-created language based on PHP) check out this "community roundup" with information about and links to some of the latest happenings.

In the weeks since the Hack open source launch and the Hack developer day, there has been a lot of information, code, blog posts, etc coming from our nascent community. To us on the team, it's been incredible and encouraging to see the community reception to Hack. Here are some of the highlights of the things we've seen come out of our community. (And we almost certainly haven't seen everything, so please let us know in the comments what we've missed!

They share several related GitHub projects (including the Hack/HHVM support on Heroku), a few presentations about installation and experience with the tools and a few blog posts wrapping up their Hack dev day and an article from FastCompany about Hack and its motivation

0 comments voice your opinion now!
hhvm hack roundup github project blog presentations

Link: http://hhvm.com/blog/4811/hack-community-roundup

PHPClasses.org:
PHPNG Dramatic Speedup Features Coming in PHP 6 Release
May 12, 2014 @ 12:43:14

The PHPClasses.org blog has a new post today looking at a recently introduced proposal for updates to the core PHP functionality that could lead to significant speed and overall performance gains. In this latest article they talk about PHPNG.

Not a very long after Facebook announced the Hack language, Dmitry Stogov of Zend announced a somewhat secret development branch of PHP called PHPNG that brings a JIT engine, significant speed and memory management improvements eventually to PHP 6. [...] This branch was added somewhat secretly by Zend developers to the PHP development repository in April 16 but it was openly described only in May 5 when Sebastian Bergmann of the PHPUnit fame asked in the PHP internals about it. Dmitry Stogov of Zend presented a more or less detailed description of the PHPNG branch. He explained that he has been experimenting using a JIT engine (Just In Time compilation to native machine code) using LLVM.

The post talks about the availability of the branch and some of the changes (like updates to extensions) that would need to be made for it to work correctly. There's also a mention about the "plot to kill mod_php" in the future and how the discussion around it reminds the author of the deprecation of the MySQL extension a few years back. The rest of the post compares the PHPNG branch's features with that of one of the other high-performance PHP tools out there, HHVM.

0 comments voice your opinion now!
phpng speed performance release hhvm branch

Link: http://www.phpclasses.org/blog/post/234-PHPNG-Dramatic-Speedup-Features-Coming-in-PHP-6-Release.html


Community Events





Don't see your event here?
Let us know!


security opinion laravel introduction interview framework voicesoftheelephpant series release podcast community language library list composer symfony version artisanfiles conference tool

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework