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

Chris Jones' Blog:
PHP 5.4 is Gathering Momentum
May 12, 2011 @ 14:26:39

In a new post to his blog Chris Jones talks about the "gathering momentum" that's forming around the push to the next PHP release, PHP 5.4, including discussions on mailing lists and IRC.

Discussion on the PHP mail lists and IRC channels in the past few days has been looking positive about an alpha release of PHP 5.4 soon. This will be taken from the "trunk" branch of PHP. The exact feature list is under discussion but the mood seems to be "ship what we currently have" though a couple of features are slated to be deferred until later.

He specifically mentions this mailing list post and the emphasis he puts on testing the code. If you'd like to get involved, you can subscribe to the mailing lists here.

tagged: momentum mailinglist test svn trunk

Link:

Johannes Schluter's Blog:
Upload Progress in PHP trunk
Dec 06, 2010 @ 16:30:58

Johannes Schluter has a new post to his blog looking at the progress that the upload progress meter extension has been making and how a version of it, put together by Arnaud Le Blanc has been introduced to the trunk line of PHP's code.

For implementing this we have one architectural problem: PHP implements, for very good reasons, a shared nothing architecture. So one request from connection has no insight into another request/connection - but this is needed for the upload progress. [...] The obvious solution, of course, would be to use PHP's session handling system for this. [...] Now there were some technical issues why this wasn't done at first ... but then Arnaud Le Blanc sat down and created a proper implementation of an upload progress storage handler which has been commit to PHP trunk. Long story short: In the next version of PHP (5.4?) you will, most likely, have an Upload Progress mechanism built-in.

If you want all of the details on it, you can check out the RFC on it. Johannes shows a sample of the settings and code that, once the next release of PHP comes out, you can use to enable the extension and be able to poll the session for the progress details.

tagged: file upload extension trunk sessions progress

Link:

Johannes Schluter's Blog:
More on scalar type hints in PHP trunk
Nov 23, 2010 @ 15:13:24

Johannes Schluter has posted a bit more information about the scalar type hinting that's been included in the main development line of the PHP language (trunk).

Some time ago I wrote an article about the implementation of type hints for non-object types for PHP. Meanwhile many things happened and that implementation was replaced by a different one. Readers of my previous post might know that I have doubts about type hints in PHP.

He shows some of the example syntax for the hinting and points out how, in one case, there's no error thrown when the type hint is a native one but an error is thrown on a custom type hint.

So why is there a syntax added which is ignored? [...] Well, I let it to you to decide whether it make sense to have two syntaxes which look the same but do very different things (being ignored vs. throwing a terminating error) and whether it makes sense to push a system where the core language behaves differently depending on the system. [...] I seriously hoped PHP was out of the era of introducing new inconsistencies.
tagged: scalar type hints trunk inconsistent

Link:

Johannes Schluter's Blog:
Changes in PHP trunk: No more extension for sqlite version 2
Nov 22, 2010 @ 19:49:05

Johannes Schluter has a quick new post to his blog today talking about parts of the sqllite extension that will be dropped from the core - the current sqlite_* methods and the pdo_sqlite driver.

The issue there is that this depends on the SQLite 2 library which isn't supported by upstream anymore for a few years. It was a logical step therefore to remove this extension from PHP trunk. The support for the sqlite3 extension and the PDO_sqlite driver (same link as above, read it carefully), which use version 3 of the library, are continued.

The change probably won't be happening in any of the PHP 5.3.x releases but should becoming in PHP 5.4 so, as he advises, you might need to rebuild your database file and change your application to correct things for the changes.

tagged: change trunk sqlite remove pdosqlite extension sqlite3

Link:

Johannes Schluter's Blog:
Scalar type hints in PHP trunk
Aug 09, 2010 @ 13:44:23

As Johannes Schluter mentions in his latest blog post, another new feature has been added to the trunk of the PHP project - scalar type hints.

So in my blog series I try to cover all additions to PHP trunk so I have to mention scalar type hints.

He gives examples of both simple hinting (ensuring a value is a float) and a more complex example setting an attribute on a PDO connection (checking for an integer). Sample error messages are included as well. He also gives some advice on mixing strong and weak typing in your apps - it's like "opening a can of worms".

tagged: scalar type hint trunk feature language

Link:

Johannes Schluter's Blog:
Features in PHP trunk: Array dereferencing
Aug 02, 2010 @ 15:41:09

In a recent post to his blog Johannes Schluter talks about a new feature that's just been added to the PHP project's trunk - array dereferencing.

Now you might wonder what this typical short entry means. when doing OO-style PHP you might make use of a syntax feature which one might call "object dereferencing". [...] So one can chain method calls or property access. Now for a long time people requested the same thing for array offset access. This was often rejected due to uncertainties about memory issues, as we don't like memory leaks. But after proper evaluation Felipe committed the patch.

This new feature allows you to return an array from a method and reference it in a new way outside the call - foo()[2] - where the array is like "array(1,2,3)". Johannes includes a few other examples, including how to set the information in an array (using referneces) inside a method.

tagged: array dereference trunk patch snapshot

Link:

Johannes Schluter's Blog:
Now in trunk: Improved interactive shell
May 31, 2010 @ 13:38:21

Johannes Schluter has a new post to his blog today about a recent addition to the latest trunk branch for PHP - a more interactive shell that will be installed right along with the language.

A few years ago I used another blog to write about "More PHP power on the command line" almost 5 years later the PHP interactive shell got a major update which went in PHP's trunk.

You can check out the commit message for more details on this new addition including paging ability and the ability to run PHP directly in the shell.

tagged: trunk ineractive shell improvement commit

Link:

Ilia Alshanetsky's Blog:
Scalar Type Hints are Here!
May 24, 2010 @ 16:48:19

Ilia Alshanetsky has a quick new post with some great news for some PHP developers out there - scalar type hinting has been introduced into the latest trunk of the PHP project.

About an hour ago, something I've been fighting for almost 2 years happened. The Scalar Type Hinting patch for PHP (the one I wrote almost a year ago) has been adjusted for PHP's trunk tree and committed by Derick.

You can see some of the type hinting features already included in PHP in the manual. This patch adds hinting ability for the other (non-object and non-array) variable types.

tagged: scalar type hint trunk patch

Link:


Trending Topics: