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

PHP.net:
Release of PHP 5.4.36, 5.5.20 and 5.6.4 (Includes Security Fix)
December 19, 2014 @ 10:39:54

The PHP.net has announced the releases of several new versions in all of the current major series, all correcting several bugs including a CVE-related (security) related to unserialization. This security issue was reported in CVE-2014-8142 and relates to this bug report. It is highly recommended that you upgrade your versions to correct this potential security vulnerability. The latest versions are:

As always, you can download these latest releases directly from the downloads page or http://windows.php.net/download for the Windows users. If you're interested in the other bugs fixed in these releases, check out the full Changelog.

0 comments voice your opinion now!
language release bugfix php55 php56 php54 security cve20148242

Link: http://php.net/archive/2014.php#id2014-12-18-3

Hack Blog:
Async - Cooperative Multitasking for Hack
December 08, 2014 @ 11:56:54

On the Hack blog there's a new post talking about async, a feature in Hack that allows for code to "cooperatively multitask". This gives the language a way to keep moving on in the execution without having to wait for things like database queries or remote file fetches to finish.

This is somewhat similar to threading, in that multiple code paths are executed in parallel, however it avoids the lock contention issues common to multithreaded code by only actually executing one section at any given moment. "What's the use of that?", I hear you ask. You're still bound to one CPU, so it should take the same amount of time to execute your code, right? Well, that's technically true, but script code execution isn't the only thing causing latency in your application. The biggest piece of it probably comes from waiting for backend databases to respond to queries.

She gives the example of pulling in a remote file (HTTPS, where there's a bit more latency) and how to use async, await, WaitHandle, and Awaitable to work around the timing issue. She shows how to make a method asynchronous and how to join the results of the operation back up with the rest of the script. This includes the use of various "handles" including RescheduleWaitHandle, SleepWaitHandle and the AwaitAllWaitHandle. She shows the integration of a custom cURL handler that makes use of this processing, marked async, to multithread the requests to the remote server(s).

0 comments voice your opinion now!
hack async asynchronous multitasking curl example remote fetch language

Link: http://hhvm.com/blog/7091/async-cooperative-multitasking-for-hack

Mathias Verraes:
Higher Order Programming
November 24, 2014 @ 09:16:43

In his latest post Mathias Verraes looks at "higher level programming" in PHP. Higher order programming is a style of programming that uses components (like functions, modules or objects) as values.
Let's have some fun with higher order programming in PHP. I'll start by showing how to program with Lambdalicious (or λlicious for friends) and introduce the real meat along the way. Don't worry too much about the dark magic that may appear to power some of the features of Lambdalicious. It's on GitHub if you're curious. Just follow along and keep track of all the functions.

He breaks his examples up into (lots of) different examples, each with example code:

  • Atoms
  • Lists
  • Functions
  • Conditionals
  • Loops & List Processing
  • Deduplication
  • Filter and Reduce
  • Functions returning functions
  • Partial Function Application
  • Composition
  • Piping

He finishes off the post talking about Lambdalicious and how, in reality, it's just not suitable for anything useful as written in PHP. The language just doesn't have the right functionality to make it work sufficiently...even HHVM.

0 comments voice your opinion now!
higher order programming example language lambdalicious

Link: http://verraes.net/2014/11/higher-order-programming/

Community News:
Do You Know PHP? (Quiz)
November 19, 2014 @ 10:53:23

Think you know a lot about PHP? Well, the folks at PHP Weekly and mogosselin have put together a fun little quiz you can use to see just how much you know your favorite language.

Question topics cover things like:

  • Notable people in PHP's past
  • "Meta" about the language itself
  • The future of the language
  • Projects from around the PHP community
  • PHP security topics
  • Plenty of tricky code questions

...and that's all the hints you're going to get. Go over and test out your knowledge and see how you rank against the other developers taking on the challenge!

0 comments voice your opinion now!
quiz fun language history future project questions results

Link: http://markonphp.com/php-quiz-2014/

PHP.net:
PHP 5.4.35, 5.5.19 and 5.6.3 Released
November 14, 2014 @ 12:08:25

Several new versions of the PHP language have been released, including several bugfixes and security-related issues (including CVE-2014-3710. Updates are available for all current major versions:

Upgrading is recommended, especially if you're making use of the fileinfo functionality. You can get these latest versions from the main downloads page (or the Windows.php.net). You can find out about the other changes in these releases in the Changelog

0 comments voice your opinion now!
language release security update php54 php55 php56 fileinfo

Link: http://php.net/archive/2014.php#id2014-11-13-3

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/

The ChangeLog Podcast:
#129 Facebook's Sara Golemon and the PHP Language Specification
November 11, 2014 @ 10:06:53

On The Changelog podcast today hosts Adam and Jerod talk with Sara Golemon (of Facebook) about the PHP specification that was released a bit back by a group, largely at Facebook, to help define how the PHP language functions.

Some of the topics mentioned in this episode include:

You can listen to this episode either through their in page audio player or by downloading the mp3. If you enjoy it, be sure to subscribe to their feed and get the latest updates as they're released.

0 comments voice your opinion now!
thechangelog podcast saragolemon facebook specification language

Link: http://thechangelog.com/129/

SitePoint PHP Blog:
How to Run Multiple Versions of PHP on One Server
November 07, 2014 @ 10:54:27

The SitePoint PHP blog has a new tutorial by Thien Tran Duy showing you how to run multiple versions of PHP all on the same server. The key is in using a few custom configuration options (you'll be compiling PHP manually for this) to place the different versions in different locations.

In this particular post, we'll demo a solution to install multiple versions of Phalcon and PHP and run them on a single web server. PHP 5.5.x and 5.6.x will be used here, but you can replace them with other versions. Any servers that support PHP-FPM should be enough but we recommend using Nginx. The environment used in this tutorial is Fedora OS - a Linux system, but the instructions are almost identical for any other *nix OS.

The tutorial also includes the installation of a few other PHP extensions including APC caching, memcache and ioncube. He walks you through the installation of Nginx first to get the web server up and running. Then he starts in on the PHP installs and the requirements to ensure you have to be able to compile from the PHP source. He shows how to pull the different versions of PHP down (5.3, 5.4, 5.6 and master) from the GitHub repository and execute the "buildconf" to make the configure script. He includes the example configuration command with options, ensuring it will work with PHP-FPM and the Nginx server. He then reproduces the process, making slight changes, for the other versions of PHP. Finally, he shows the installation of the two different versions of Phalcon and configuring it to all work with the installed web server.

0 comments voice your opinion now!
multiple version one server language tutorial phpfpm nginx

Link: http://www.sitepoint.com/run-multiple-versions-php-one-server/

Liip Blog:
Functional Programming in PHP
November 06, 2014 @ 12:20:35

On the Liip blog today there's a tutorial from Gilles Crettenand giving you an overview of functional programming in PHP. While PHP is not normally used as a functional language, it is possible to simulate the same effect.

Functional programming has gained a lot of traction those 3 to 5 last years. [...] Those [frameworks and languages] are all cool and shiny new toys, but we can benefit from some techniques without having to learn a new tool, just by applying some principles to our everyday PHP! But first of all, what exactly is functional programing?

He starts off with some of the basics of functional programming, some of the difficulties that can come with it and, of course, the advantages it can provide. From here he starts in with code examples. He shows how functions become "first-class citizens" and how they can be applied to various elements. He illustrates this with a few array manipulation examples. Next up are "utility functions" for evaluating the data given (like "any" or "all"). He ends the post looking at the idea of "memoization", or the caching of the results of function calls against data. He shows how to accomplish this with static local variables in PHP and includes a wrapper you can pass any callable function into and have the results cache automatically.

0 comments voice your opinion now!
functional programming introduction language function cache

Link: http://blog.liip.ch/archive/2014/11/05/functional-programing-in-php.html

HHVM Blog:
Hack Recent Updates
October 22, 2014 @ 09:37:26

On the HHVM blog today they've posted some updates about the language that helps power the HHVM (HipHop Virtual Machine), Hack, and the most recent changes and improvements made to the language.

One thing we haven't talked about much is the progress and evolution of the language itself. We've been busy driving the language forward, improving its PHP base as well as adding new features requested inside and outside Facebook to further increase developers' productivity. But unless you're the sort of person that reads every commit going into the HHVM github repository or every change to our docs site, you probably have no idea about any of these changes since we haven't talked much about them yet.

This post is a "kickoff" of a series of posts they'll be doing covering some of the major changes to the language including:

  • Typechecking new static()
  • First-class enums
  • Better understanding the type signatures of the PHP standard library
  • Covariance

Stay tuned to the blog for the full series.

0 comments voice your opinion now!
hack language update series improvement update

Link: http://hhvm.com/blog/6443/hack-recent-updates


Community Events





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


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

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