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

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

PHP.net:
PHP 5.4.34 & 5.6.2 Released
October 17, 2014 @ 10:14:07

On the main PHP.net site an announcement has been posted about the release of the two latest versions in the PHP 5.4.x and 5.6.x series - PHP 5.4.34 and 5.6.2

These releases fix several bugs in both versions including several security-related issues including CVE-2014-3668, CVE-2014-3669 and CVE-2014-3670. In the 5.4.34 release there was also a fix put in to correct a regression issue in the OpenSSL functionality.

As both of these contain security-related fixes, it's strongly recommended that you upgrade as soon as possible. As always, you can find the latest downloads on the main downloads page or windows.php.net for the Windows users. The full list of changes in each of the versions can be found in the Changelog.

0 comments voice your opinion now!
language release bugfix security update openssl

Link: http://php.net/archive/2014.php#id2014-10-16-3

Frank Karlitschek:
A possible future for PHP
October 03, 2014 @ 11:57:06

In a recent post from Frank Karlitschek he speculates about the future of PHP and what when into their (ownCloud) decision to go with it as a primary language. The post also proposes several changes he'd also like to see in the language to help improve it in the future.

PHP is not the most hip programming language in the world. Actually the opposite. It has a relatively bad reputation. I personally was never a big fan of choosing the technologies based on what is cool or "modern" or in vogue. I think there are different technology for different jobs and they should be evaluated objectively and choose without to much emotion involved. So I don't understand the religious discussions why tool x is always better than technology. I think it is all about the right technology for the job after a fair assessment of course. So I'm still very happy with this decision to use PHP. So far we have not seen any bigger architectural technical problems [for ownCloud] that we can't solve with PHP.

Among his suggestions for change are things like enhanced security features (and better teaching around best practices on the topic), a simplified compile and runtime configuration, function/class naming inconsistencies and the introduction of static typing. It's his opinion that this list can help PHP "move to the next level". There's plenty of comments on the post, both supporting and refuting the opinions Frank has included in his list...be sure to give them a read.

0 comments voice your opinion now!
future language opinion features update owncloud

Link: http://karlitschek.de/2014/10/a-possible-future-for-php


Community Events





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


release version community voicesoftheelephpant interview security symfony language tool mvc package laravel framework composer library opinion introduction podcast series update

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