[Phpmyadmin-devel] a PHP 5.1.2 bug?

Marc Delisle Marc.Delisle at cegepsherbrooke.qc.ca
Thu Jan 12 11:33:03 CET 2006


Hi,

while trying Stewart Morgan's patch, I found this situation and would 
like your advice before opening a PHP bug.

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);
?>

On PHP 5.1.0-RC4 I get
Array
(
     [0] => INSERT INTO `aaa`
     [1] => aaa
)

On PHP 5.1.2 I get
Array
(
)

If I change to

preg_match('@INSERT\sINTO\s\`([^\`]+)\`@iu', $the_query, $error_table);

it works.

Is it supposed to be wrong now to use the
$error_table = array()
syntax?

Marc




More information about the Developers mailing list