News Feed
Sections




News Archive
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/

Community News:
PHP Specification in Development
July 30, 2014 @ 11:54:25

In a recent message to the PHP internals mailing list Sara Golemon has announced the development of a PHP specification, a document formally defining the interfaces and structure of the functionality of the language. The effort is being spearheaded by a group at Facebook.

We (As in PHP) have been talking about making a spec for the PHP language for a LONG time. With PHPNG around the corner, the need for a formal spec is even more important so that we can reliably ensure that PHP.Next matches PHP 5.6's behavior as much as possible. Meanwhile, other implementations of PHP (like HHVM) should be as spec compliant as possible so that we don't see the language bifurcate. To that end, we (as in Facebook), have been putting together a formal language spec for PHP (using PHP 5.6 as the source of truth) along with an additional conformance test suite (which compliments Zend/tests).

An initial version (a "sneak peek") has already been posted providing a great start to the effort. There's already been a lot of support for the project in the community and some of the concerns around workflow and maintenance are already starting to be addressed.

0 comments voice your opinion now!
language specification facebook earlyrelease

Link: http://grokbase.com/t/php/php-internals/147p423vvz/php-language-specification

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/

Voices of the ElePHPant:
Interview with Joel Clermont
July 30, 2014 @ 09:37:56

The Voices of the ElePHPant podcast has posted their latest episode in their series of community interviews. This time it's with Joel Clermont, an organizer of the Milwaukee PHP User Group.

They talk some about a newsletter Joelputs out "learning how to learn" based around a conference talk he's proposed/given. Joel also mentions the book he's working on following the same topic. They also talk some about his involvement in the Milwaukee user group.

You can listen to this latest episode either through the in-page audio player or by downloading the mp3 directly. If you like what you hear, consider subscribing to their feed too.

0 comments voice your opinion now!
voicesoftheelephpant joelclermont community interview learning milwaukee

Link: http://voicesoftheelephpant.com/2014/07/29/interview-with-joel-clermont

Community News:
Packagist Latest Releases for 07.30.2014
July 30, 2014 @ 08:03:01

Recent releases from the Packagist:
0 comments voice your opinion now!



PHPBuilder.com:
Creating Real Time Applications with PHP and WebSockets
July 29, 2014 @ 12:13:07

On PHPBuilder.com today there's a new tutorial introducing you to the combination of PHP and WebSockets to make real-time requests to fetch data in your application.

This article will explore the main PHP libraries used to create real time, bi-directional applications between clients and servers over WebSockets. WebSocket is full-duplex client/server communication over TCP. It is also a new feature available in browsers as a part of the HTML5 specs that allows JavaScript clients to open bi-directional socket connections to a server. [...] WebSocket connections are basically TCP socket connections that following the WebSocket rules to communicate. The WebSocket Protocol is an independent TCP-based protocol.

They introduce some of the basic concepts behind WebSockets (including an example URL) and show how to use the PHPWebSockets library to handle some sample requests. They also include some basic JavaScript to make the request to the backend PHP script and send or fetch content on the server. They also show you how to implement a simple chat server using a few other libraries like Ratchet, Elephpant.io and Socket.io.

0 comments voice your opinion now!
realtime application websockets tutorial introudction

Link: http://www.phpbuilder.com/articles/application-architecture/optimization/creating-real-time-applications-with-php-and-websockets.html

NetTuts.com:
Understanding and Working with Data in WordPress
July 29, 2014 @ 11:28:05

On NetTuts.com there's a new post for those new to WordPress (or just wanting to figure out more about the internals of the tool) showing how some of the data is structured and how to work with it.

Most WordPress users never come into direct contact with the database and may not even be aware that it's constantly working to populate their site. When WordPress serves up any kind of page, be that the home page, a single post or page or an archive, it's accessing the database to bring up content that editors and administrators have added to the site. In this series of tutorials I'll look in detail at different aspects of the WordPress database.

This post is the first in the series and provides an overview of the database and what kinds of information each one contains. They talk about content types and provide the table structure and relations in a handy graphical form (an ERD). They then go through each of the tables and describe what the data is including link tables, joining the content in different places.

0 comments voice your opinion now!
data wordpress introduction database table erd overview

Link: http://code.tutsplus.com/tutorials/understanding-and-working-with-data-in-wordpress--cms-20567

Expert Developer:
Install PHP CodeSniffer on Windows Machine
July 29, 2014 @ 10:33:45

On the Expert Developer site there's a new tutorial showing you how to get the PHP CodeSniffer tool up and working on a Windows installation. PHP CodeSniffer provides functionality to enforce standards and best practices in your application's development (providing code quality).

In this article we will focus on improving Code Quality. Very first step towards improving code quality is to maintain coding standards across developers. [...] Here we will talk about PHP CodeSniffer, which help us to maintain coding standard across multiple developer. Dealing with CodeSniffer is much easier: create rule set, validate your file against your rule set and get the result immediately. It will immediately show how many mistakes you have made in terms of following coding standards and eventually all developer will start coding as per coding standards you have defined.

There's two main parts to the article: first is getting PEAR installed (a package manager for PHP) and then using it to install CodeSniffer. Complete instructions and commands are included as well as a few screenshots along the way.

0 comments voice your opinion now!
install tutorial codesniffer windows code quality

Link: http://www.xpertdeveloper.com/2014/07/install-php-codesniffer-on-windows-machine/

Sameer Borate:
Downloading Gmail attachments in PHP - an update
July 29, 2014 @ 09:37:40

Sameer Borate has posted an update to a previous post of his about downloading attachments in PHP. In this new post he updates the script to remove any other dependencies other than the IMAP PHP extension.

As mentioned in the earlier post, automatically extracting attachments from Gmail can be important for reasons where you need to process the attached files periodically with a CRON job or need to process the files programmatically. Also it can be useful for automatically archiving important attachments. [The code in this post] is a simple proof-of-concept plain PHP code, devoid of any object-oriented features that extracts attachments from your Gmail account.

The example code makes a request to the Gmail IMAP servers with the given username and password, grabs the first set of emails, parses their attachments to pull them down to the local host. He also includes some searching capability to locate ones only matching certain criteria. A list of the allowed search keywords is also included. He finishes the post with a look at using READONLY mode and fetching the email headers.

0 comments voice your opinion now!
attachment download gmail tutorial search

Link: http://www.codediesel.com/php/downloading-gmail-attachments-in-php-an-update/

Community News:
Packagist Latest Releases for 07.29.2014
July 29, 2014 @ 08:01:39

Recent releases from the Packagist:
0 comments voice your opinion now!




Community Events





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


developer framework community threedevsandamaybe release laravel configure podcast testing unittest wordpress opinion series code introduction interview language refactor list install

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