[Phpmyadmin-devel] a PHP 5.1.2 bug?

Garvin Hicking phpmyadmin at supergarv.de
Thu Jan 12 12:26:01 CET 2006

Hi Marc!

> Look at this sample code:
> <?php
> $the_query = "INSERT INTO `aaa` (`f1`, `f2`) VALUES ('1', 'aaa')";
> preg_match('@INSERT\sINTO\s\`([^\`]+)\`@iu', $the_query, $error_table = array()
> );
> print_r($error_table); ?>

It surprises me that this has ever worked :)

I guess that PHP 5.1.2 has a different way of evaluating/processing the order of
the array assignment. But the way of specifieing an assignment within a function
call is something I've never seen before, and also looks a bit
misleading-codewise, IMHO.

So you might want to ask how this problem came, but I'm pretty sure the answer
will be "It was never meant to work, so you shouldn't have relied on it. We
fixed this because of memory corruption issues" ;-)

Best regards,

++ Garvin Hicking | Web-Entwickler [PHP]    | www.garv.in | ICQ 21392242
++ Developer of   | www.phpMyAdmin.net      | www.s9y.org

++ Make me happy  | http://wishes.garv.in

More information about the Developers mailing list