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

Davey Shafik:
PHP 7 ext/mysql Shim
Dec 07, 2015 @ 17:10:24

With the release of PHP 7 comes a major shift in how your programs may interact with databases - the removal of the mysql extension (in favor of mysqli or PDO). Depending on how your application is written, this can cause all sorts of headaches. Davey Shafik has offered a temporary solution in a post to his site today, a mysql shim library that can be used to mimic the older mysql functions until you can upgrade your application.

To help ease the transition from 5.6 to 7.0 I have created a simple package that acts as a shim between the newly removed ext/mysql and ext/mysqli. I was a little hesitant to even publish this as I don’t want to encourage the continued use of potentially insecure code, however, I want people to upgrade to 7.0 and don’t want this to be the blocker.

It does require 5.6 (though it would be possible to lower that) — however I suspect that most people who are upgrading to 7.0 are either coming from 5.6 or have the native ext/mysql. The primary reason for support 5.6 is to be able to compare the test suite results against native ext/mysql.

The library can be easily installed via Composer and, while useful in its current form, still has some work yet to be done on it to bring it up to fully compatible. If you'd like to help on the effort and make life a little easier for those upgrading to PHP 7 on older code, head over to the repository and think about contributing.

tagged: mysql extension php7 shim library backport upgrade

Link: https://daveyshafik.com/archives/69726-php-7-extmysql-shim.html

Matthew Weier O'Phinney's Blog:
Backported ZF2 Autoloaders
May 11, 2011 @ 14:33:20

In a new post Matthew Weier O'Phinney talks about autoloaders in the Zend Framework and the changes they've made from ZF1 to ZF2. He also includes a link to a package you can try out if you'd like to backport the ZF2 autoloaders to your ZF1 application.

Interestingly, I've had quite some number of folks ask if they can use the new autoloaders in their Zend Framework 1 development. The short answer is "yes," assuming you're running PHP 5.3 already. If not, however, until today, the answer has been "no." I've recently backported the ZF2 autoloaders to PHP 5.2, and posted them on GitHub [tarball here].

His autoloader backport scripts include a class map generation tool, a PSR-0 compliant autoloader, a class map autoloader and an autoloader factory for loading multple strategies at once. He also includes a sample of how to use it with a bit of the output it might give you for your project.

tagged: zendframework autoloader backport github

Link:

David Soria Parra's Blog:
PHP 5.3.99-dev and DTrace Part I
Apr 29, 2010 @ 17:17:32

As David Soria Parra mentions in a recent post to his blog, the DTrace functionality has been backported to the PHP 5.3 branch and gives developers a bit more information about what's happening inside their applications.

For those not following the PHP development. We backported the DTraces probes from the abandoned PHP 6.0 branch, back to the new trunk PHP 5.3.99-dev. It is called 5.3.99 because the PHP dev community has not decided yet on a version number (5.4 or 6.0).

He gives the configure line to get it working on Solaris and Mac OSX and a sample line of code to ensure everything's working correctly. The results show the full execution of the example. This functionality can replace this extension from the PECL repository.

tagged: dtrace trace backport osx solaris

Link:

Brian Moon's Blog:
MySQL native driver for PHP
Jul 09, 2007 @ 17:04:00

In a recent post Brian Moon points out an advancement in something he's very excited about - the MySQL native driver for PHP.

I have been excited about the MySQL native drive (mysqlnd) since I first heard about it. They are looking for testers now.

Brian also includes comments about the fact that the driver was originally intended for use in PHP6 and how some people have been talking about a back-port to PHP4 for those still hanging on.

Check out this post from Lukas Smith on the same subject with a bit more information on what the driver is and what it could mean for the PHP community as a whole.

tagged: mysql native driver php6 backport php4 mysqlnd mysql native driver php6 backport php4 mysqlnd

Link:

Brian Moon's Blog:
MySQL native driver for PHP
Jul 09, 2007 @ 17:04:00

In a recent post Brian Moon points out an advancement in something he's very excited about - the MySQL native driver for PHP.

I have been excited about the MySQL native drive (mysqlnd) since I first heard about it. They are looking for testers now.

Brian also includes comments about the fact that the driver was originally intended for use in PHP6 and how some people have been talking about a back-port to PHP4 for those still hanging on.

Check out this post from Lukas Smith on the same subject with a bit more information on what the driver is and what it could mean for the PHP community as a whole.

tagged: mysql native driver php6 backport php4 mysqlnd mysql native driver php6 backport php4 mysqlnd

Link:


Trending Topics: