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

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/

SitePoint PHP Blog:
Understanding OpCache
July 30, 2014 @ 10:39:27

On the SitePoint PHP blog there's a new tutorial posted helping you understand OpCache, the caching engine built into PHP versions 5.5 and above. This cache isn't designed to cache data or other content, though. An OpCache caches "opcodes" when a script is executed.

PHP in version 5.5 comes with a caching engine built-in - OpCache - which stores precompiled script bytecode in the memory. If you're familiar with APC or Xcache, you will already know how such engines work. As each PHP script is being compiled at runtime, a part of the execution time gets used for transforming the human readable code into code that can be understood by the machine. A bytecode cache engine like OpCache, APC or Xcache does it only once - during the first execution of a specific PHP file. Then the precompiled script is being stored in memory, which should lead to performance boosts in your PHP applications.

The remainder of the article is a series of answers to some common questions about using the cache, what it will do for your applications and some tools to use for tuning and status updates:

  • Is OpCache worth installing at all? What speed boost can I expect?
  • I already use APC cache. Should I migrate to OpCache?
  • How to check if OpCache is actually caching my files?
  • Is there any framework-specific config that I should set?
  • I keep my app config in a PHP file. Can I prevent it from being cached?
  • How can I run both a development and a production environment on a single server where OpCache is enabled?
0 comments voice your opinion now!
opcache opcode cache tutorial introduction php55 bytecode

Link: http://www.sitepoint.com/understanding-opcache/

Hasin Hayder:
Upgrading PHP to 5.5 in a CentOS 6 server with Vesta CP
June 04, 2014 @ 09:22:31

In his latest post Hasin Hayder shares some instructions for upgrading CentOS to PHP 5.5 (a server with Vesta CP) via the Remi repository.

Vesta CP comes with PHP 5.4 by default. If you want to upgrade it to 5.5, follow these steps.

He's broken it up into five simple steps:

  • Stop Apache and Remove current PHP
  • Add remi repository
  • Enable Remi Repository (for yum)
  • Install PHP 5.5
  • Cleanup, linking and finishing

These instructions aren't really just for the CentOS install either. They could be used for any platform that makes use of "yum" to work with installed packages (with a few tweaks here and there).

0 comments voice your opinion now!
upgrade php55 centos vestacp yum remi

Link: http://hasin.me/2014/06/03/upgrading-php-to-5-5-in-a-centos-6-server-with-vesta-cp/

Derick Rethans:
DateTimeImmutable
February 26, 2014 @ 10:26:45

In his latest post Derick Rethans (knower of all things date and time) talks about the DateTimeImmutable functionality. It has been added into the PHP 5.5 releases and provides the same DateTime functionality but removes the ability for modification (mutability).

The first time that my improved DateTime support made its way into PHP was officially in PHP 5.1, although the more advanced features such as the DateTime class only made it appearance in PHP 5.2. Since its introduction the DateTime class implementation suffered from one design mistake - arguably not something that even an RFC would have highlighted. [...] This mutability property that all modifying methods of the DateTime class have is highly annoying, and something that I would now rather remove. But of course we cannot as that would break backwards compatibility. So in PHP 5.5, after a few stumbles, I finally managed to rectify this.

He includes some code examples showing the current DateTime object's mutability (via the "modify" function) and the new immutable handling. This new handling doesn't update the current object but instead returns the modified object, leaving the initial one intact. You can find out more about this new object in the PHP manual.

0 comments voice your opinion now!
datetime datetimeimmutable mutability return object php55

Link: http://derickrethans.nl/immutable-datetime.html

PHPBuilder.com:
Implementing Secure Passwords in PHP 5.5
January 29, 2014 @ 11:17:40

On PHPBuilder.com today there's a new post introducing you to a relatively recent advancement in PHP (in version 5.5), the password hashing API. In this article they cover the basics including hashing and verifying the result.

PHP has always had a few simple ways to implement password hashing to an extent. MD5 and SHA1 are examples of this, but the security of these methods is not what it should be. [...] What we need is a secure password encryption mechanism that uses SALT and perhaps even something else to help us safely encrypt our passwords for later use. [...] Lucky for us, the folks at PHP have thought about this long and hard, and the result is a very simple PHP password hashing API that is not only easy to use, but fast and secure.

They briefly look at the two major functions in the updated feature - password_hash and password_verify and some basic code examples of their use.

0 comments voice your opinion now!
secure password hash php55 passwordhash passwordverify introduction

Link: http://www.phpbuilder.com/articles/application-architecture/security/implementing-secure-passwords-in-php-5.5.html

Community News:
GoPHP5 Initiative Reborn?
November 08, 2013 @ 11:46:06

There's a movement stirring in a part of the PHP community (the PHP-FIG group) that wants to bring back the idea behind the "GoPHP5" movement years back. This time, though, their focus is a bit different - it's not switching to PHP5 they want, it's pushing towards PHP 5.5.

We all know that PHP 5.3 is about to lose even security support in the first half of next year. PHP 5.3 is still the most widely used PHP version, with the completely unsupported 5.2 a strong second [and] 5.4 hasn't even reached 10% yet, and 5.5, which is current stable, barely registers. [...] The last time this big of a chicken-and-egg issue existed was around moving to PHP 5.x at all, which took *for frickin' ever* to supplant PHP 4. [...] I believe it is time to discuss round 2 of that effort. I also believe that it would be good for FIG to play a leading role in such an effort if possible.

There's been some varied feedback on the thread both for and against. Overall, there's a lot of support for the idea, but there are a few "hitches" in the plans - mainly the lack of support from the linux OS vendors to bump up their versions. The projects themselves are receptive, many noting that they've been planning the first steps to this already - a move to PHP 5.4 only.

0 comments voice your opinion now!
gophp5 php55 initiative community phpfig project

Link: https://groups.google.com/forum/#!topic/php-fig/ogp03OHbVJ0

PHP.net:
PHP 5.5.5 Released
October 17, 2013 @ 09:06:46

As mentioned on the official PHP.net site today, the latest version of the PHP 5.5.x series has been released - PHP 5.5.5:

The PHP development team announces the immediate availability of PHP 5.5.5. This release fixes about twenty bugs against PHP 5.5.4, some of them regarding the build system. All PHP users are encouraged to upgrade to this new version.

You can download it from all of the usual sources - the source from the main downloads page or the Windows binaries from windows.php.net. If you're interested in what changed in this release, check out the full Changelog. The release includes fixes in the CLI server, Datetime functionality, filtering, sockets and the XMLReader (among several others).

0 comments voice your opinion now!
language release php55 bugfix windows download update

Link: http://php.net/archive/2013.php#id2013-10-16-1

ServerGrove.com:
New features of PHP 5.5
August 27, 2013 @ 09:17:21

For those that might not had a chance to try out the latest major release in PHP (PHP 5.5), there's a new post to the ServerGrove blog talking about the new features and includes some sample code of each in action.

PHP 5.5 was released on June, 20th and soon after we made it available on ServerGrove VPS images. Since then, many users have upgraded their virtual servers to PHP 5.5 taking advantage of its performance improvements, bug fixes, and several of its new features. Here are some of the new features that stand out...

In his list of new features are things like:

  • generators
  • finally handling in exceptions
  • empty accepting expressions
  • array and string dereferencing
  • Class name resolution via "::class"
  • foreach support for list() and non-scalar keys
  • OPcache extension added
  • Password hashing API
  • GD

Some of the items in the list were added pre-5.5, but they're all in there now, so give it a spin in your application and try out some of these new features!

0 comments voice your opinion now!
language features php55 performance bugfix

Link: http://blog.servergrove.com/2013/08/26/new-features-of-php-5-5

The PHP.cc:
PHP 5.5 New CLASS Constant
June 26, 2013 @ 09:02:08

The PHP.cc have posted another article in their series looking at the new features that come with the latest release of PHP (5.5). In this new post they cover the "CLASS" constant.

Last week, the first stable version of PHP 5.5 was released. It introduced a class-level constant, aptly named CLASS, that is automatically available on all classes and holds the fully-qualified name of that class. [...] So why would you need such a constant? [...] When you need the fully qualified name of a namespaced class that is referenced by a namespace alias ... then it gets interesting.

He illustrates with an example of a unit test using stubs and mocks. The normal method requires the definition of the class namespace in the "getMock" call. With the CLASS constant, PHP can extract that information from the namespace referenced in the "use" and drop it in as a replacement.

0 comments voice your opinion now!
class constant php55 new feature namespace unittest

Link: http://thephp.cc/viewpoints/blog/2013/06/php-5-5-new-class-constant

PHP.net:
PHP 5.5.0RC2 is available
May 24, 2013 @ 09:55:27

On PHP.net today they've announced the release of the latest Release Candidate in the PHP 5.5.x series - PHP 5.5.0RC2.

The PHP development team announces the availability of the second release candidate of PHP 5.5. This release fixes some bugs against RC1 and improves overall stability. [...] Please help us to identify bugs in order to ensure that the release is solid and all things behave as expected. Please test this release candidate against your code base and report any problems that you encounter to the QA mailing list and/or the PHP bug tracker.

Issues corrected include a segfault when memory was used up, an issue with mbstring in PHPT tests in Windows x64 and a problem with custom exceptions. You can find the full list of changes in the NEWS file. Please download this latest release candidate (Windows here) and test it out on your systems.

0 comments voice your opinion now!
release candidate php55 download test bugfix

Link: http://php.net/index.php#id2013-05-23-1


Community Events





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


wordpress community release code bugfix laravel series framework developer threedevsandamaybe api language list configure project application interview library introduction podcast

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