]> granicus.if.org Git - php/commitdiff
MFH - Changing tests to run with both PHP 6 and PHP 5.3 to make future MFH easier...
authorUlf Wendel <uw@php.net>
Wed, 1 Jul 2009 15:33:31 +0000 (15:33 +0000)
committerUlf Wendel <uw@php.net>
Wed, 1 Jul 2009 15:33:31 +0000 (15:33 +0000)
25 files changed:
ext/mysql/tests/001.phpt
ext/mysql/tests/002.phpt
ext/mysql/tests/003.phpt
ext/mysql/tests/mysql_connect.phpt
ext/mysql/tests/mysql_escape_string.phpt
ext/mysql/tests/mysql_fetch_array.phpt
ext/mysql/tests/mysql_fetch_assoc.phpt
ext/mysql/tests/mysql_fetch_field.phpt
ext/mysql/tests/mysql_fetch_object.phpt
ext/mysql/tests/mysql_fetch_row.phpt
ext/mysql/tests/mysql_field_name.phpt
ext/mysql/tests/mysql_field_seek.phpt
ext/mysql/tests/mysql_field_table.phpt
ext/mysql/tests/mysql_field_type.phpt
ext/mysql/tests/mysql_pconn_max_links.phpt
ext/mysql/tests/mysql_phpinfo.phpt
ext/mysql/tests/mysql_query.phpt
ext/mysql/tests/mysql_query_load_data_openbasedir.phpt
ext/mysql/tests/mysql_real_escape_string.phpt
ext/mysql/tests/mysql_result.phpt
ext/mysql/tests/mysql_select_db.phpt
ext/mysql/tests/mysql_set_charset.phpt
ext/mysql/tests/mysql_tablename.phpt
ext/mysql/tests/mysql_trace_mode.phpt
ext/mysql/tests/mysql_unbuffered_query.phpt

index de3957190437d7186d021f380bee09b2a72f0d00..6f2e284debeff7404473ee0d25f52c6a7bc108a7 100755 (executable)
@@ -25,9 +25,6 @@ mysql_close($db);
 var_dump($test);
 print "done!";
 ?>
---EXPECT--
-string(2) "11"
+--EXPECTF--
+%unicode|string%(2) "11"
 done!
---UEXPECTF--
-unicode(2) "11"
-done!
\ No newline at end of file
index 9c1250104d19f50aed839afea52079d1b4b6bcec..18f6c7037c169f958c9a799bf125d9762b12c5c7 100755 (executable)
@@ -39,42 +39,19 @@ bool(true)
 bool(true)
 resource(%d) of type (mysql result)
 array(3) {
-  ["col1"]=>
-  string(1) "1"
-  ["col2"]=>
-  string(3) "foo"
-  ["col3"]=>
-  string(3) "bar"
+  [%u|b%"col1"]=>
+  %unicode|string%(1) "1"
+  [%u|b%"col2"]=>
+  %unicode|string%(3) "foo"
+  [%u|b%"col3"]=>
+  %unicode|string%(3) "bar"
 }
 array(3) {
-  ["col1"]=>
-  string(1) "2"
-  ["col2"]=>
-  string(3) "foo"
-  ["col3"]=>
-  string(3) "bar"
+  [%u|b%"col1"]=>
+  %unicode|string%(1) "2"
+  [%u|b%"col2"]=>
+  %unicode|string%(3) "foo"
+  [%u|b%"col3"]=>
+  %unicode|string%(3) "bar"
 }
 done!
---UEXPECTF--
-resource(%d) of type (mysql link)
-bool(true)
-bool(true)
-bool(true)
-resource(%d) of type (mysql result)
-array(3) {
-  [u"col1"]=>
-  unicode(1) "1"
-  [u"col2"]=>
-  unicode(3) "foo"
-  [u"col3"]=>
-  unicode(3) "bar"
-}
-array(3) {
-  [u"col1"]=>
-  unicode(1) "2"
-  [u"col2"]=>
-  unicode(3) "foo"
-  [u"col3"]=>
-  unicode(3) "bar"
-}
-done!
\ No newline at end of file
index 0c3717b29445f6c57917bea9329fa60173620790..dd3c37058c6430f5c5ebdbd16aa1605c157bc0cb 100755 (executable)
@@ -55,62 +55,31 @@ print "done!";
 --EXPECTF--
 ==stdClass==
 object(stdClass)#%d (1) {
-  ["a"]=>
-  string(3) "one"
+  [%u|b%"a"]=>
+  %unicode|string%(3) "one"
 }
 object(stdClass)#%d (1) {
-  ["a"]=>
-  string(3) "two"
+  [%u|b%"a"]=>
+  %unicode|string%(3) "two"
 }
 object(stdClass)#%d (1) {
-  ["a"]=>
-  string(5) "three"
+  [%u|b%"a"]=>
+  %unicode|string%(5) "three"
 }
 ==class24==
 class24::__construct
 object(class24)#%d (1) {
-  ["a"]=>
-  string(3) "one"
+  [%u|b%"a"]=>
+  %unicode|string%(3) "one"
 }
 class24::__construct
 object(class24)#%d (1) {
-  ["a"]=>
-  string(3) "two"
+  [%u|b%"a"]=>
+  %unicode|string%(3) "two"
 }
 class24::__construct
 object(class24)#%d (1) {
-  ["a"]=>
-  string(5) "three"
+  [%u|b%"a"]=>
+  %unicode|string%(5) "three"
 }
 done!
---UEXPECTF--
-==stdClass==
-object(stdClass)#%d (1) {
-  [u"a"]=>
-  unicode(3) "one"
-}
-object(stdClass)#%d (1) {
-  [u"a"]=>
-  unicode(3) "two"
-}
-object(stdClass)#%d (1) {
-  [u"a"]=>
-  unicode(5) "three"
-}
-==class24==
-class24::__construct
-object(class24)#%d (1) {
-  [u"a"]=>
-  unicode(3) "one"
-}
-class24::__construct
-object(class24)#%d (1) {
-  [u"a"]=>
-  unicode(3) "two"
-}
-class24::__construct
-object(class24)#%d (1) {
-  [u"a"]=>
-  unicode(5) "three"
-}
-done!
\ No newline at end of file
index ad10ea7f760664dc018e4420745ed84fca08613c..acb632e009aabd5ca87aaa2776490b33e64d366d 100644 (file)
@@ -81,16 +81,6 @@ if (!ini_get('sql.safe_mode')) {
        }
 }
 
-/* we don't care if we can connect or not, this is just to test the different connect syntax variants */
-$myhost = sprintf('%s:%d', $host, $port );
-if ($link = mysql_connect($myhost, $user, $passwd, true))
-       mysql_close($link);
-
-/* interesting, isn't it? */
-$myhost = sprintf('%s:%d', $host, $port , $socket);
-if ($link = mysql_connect($myhost, $user, $passwd, true))
-       mysql_close($link);
-
 print "done!";
 ?>
 --EXPECTF--
index 1badea8903a09ccf785f600c14710f2666feb0c7..45bf26978cb8f1abe4d8fc927ef8ad510322b675 100644 (file)
@@ -23,20 +23,11 @@ var_dump(mysql_escape_string("foo" . chr(0) . "bar"));
 print "done!";
 ?>
 --EXPECTF--
-string(31) "Am I a unicode string in PHP 6?"
-string(2) "\\"
-string(2) "\""
-string(2) "\'"
-string(2) "\n"
-string(2) "\r"
-string(8) "foo\0bar"
+%unicode|string%(31) "Am I a unicode string in PHP 6?"
+%unicode|string%(2) "\\"
+%unicode|string%(2) "\""
+%unicode|string%(2) "\'"
+%unicode|string%(2) "\n"
+%unicode|string%(2) "\r"
+%unicode|string%(8) "foo\0bar"
 done!
---UEXPECTF--
-unicode(31) "Am I a unicode string in PHP 6?"
-unicode(2) "\\"
-unicode(2) "\""
-unicode(2) "\'"
-unicode(2) "\n"
-unicode(2) "\r"
-unicode(8) "foo\0bar"
-done!
\ No newline at end of file
index 729523514abd9f97858df3348878042caf80e664..469cc2f6f4a9884b86847e193a31a29d9e560052 100644 (file)
@@ -1,8 +1,8 @@
 --TEST--
 mysql_fetch_array()
 --SKIPIF--
-<?php 
-require_once('skipif.inc'); 
+<?php
+require_once('skipif.inc');
 require_once('skipifconnectfailure.inc');
 ?>
 --FILE--
@@ -281,150 +281,74 @@ print "done!";
 [005]
 array(4) {
   [0]=>
-  string(1) "1"
-  ["id"]=>
-  string(1) "1"
-  [1]=>
-  string(1) "a"
-  ["label"]=>
-  string(1) "a"
-}
-[006]
-array(2) {
-  [0]=>
-  string(1) "2"
-  [1]=>
-  string(1) "b"
-}
-[007]
-array(4) {
-  [0]=>
-  string(1) "3"
-  ["id"]=>
-  string(1) "3"
-  [1]=>
-  string(1) "c"
-  ["label"]=>
-  string(1) "c"
-}
-[008]
-array(2) {
-  ["id"]=>
-  string(1) "4"
-  ["label"]=>
-  string(1) "d"
-}
-[009]
-array(4) {
-  [0]=>
-  string(1) "5"
-  ["id"]=>
-  string(1) "5"
-  [1]=>
-  string(1) "e"
-  ["label"]=>
-  string(1) "e"
-}
-[011]
-array(11) {
-  [0]=>
-  string(1) "1"
-  ["a"]=>
-  string(1) "2"
-  [1]=>
-  string(1) "2"
-  [2]=>
-  string(1) "3"
-  ["c"]=>
-  string(1) "3"
-  [3]=>
-  string(1) "4"
-  ["C"]=>
-  string(1) "4"
-  [4]=>
-  NULL
-  ["d"]=>
-  NULL
-  [5]=>
-  string(1) "1"
-  ["e"]=>
-  string(1) "1"
-}
-
-Warning: mysql_fetch_array(): %d is not a valid MySQL result resource in %s on line %d
-done!
---UEXPECTF--
-[005]
-array(4) {
-  [0]=>
-  unicode(1) "1"
-  [u"id"]=>
-  unicode(1) "1"
+  %unicode|string%(1) "1"
+  [%u|b%"id"]=>
+  %unicode|string%(1) "1"
   [1]=>
-  unicode(1) "a"
-  [u"label"]=>
-  unicode(1) "a"
+  %unicode|string%(1) "a"
+  [%u|b%"label"]=>
+  %unicode|string%(1) "a"
 }
 [006]
 array(2) {
   [0]=>
-  unicode(1) "2"
+  %unicode|string%(1) "2"
   [1]=>
-  unicode(1) "b"
+  %unicode|string%(1) "b"
 }
 [007]
 array(4) {
   [0]=>
-  unicode(1) "3"
-  [u"id"]=>
-  unicode(1) "3"
+  %unicode|string%(1) "3"
+  [%u|b%"id"]=>
+  %unicode|string%(1) "3"
   [1]=>
-  unicode(1) "c"
-  [u"label"]=>
-  unicode(1) "c"
+  %unicode|string%(1) "c"
+  [%u|b%"label"]=>
+  %unicode|string%(1) "c"
 }
 [008]
 array(2) {
-  [u"id"]=>
-  unicode(1) "4"
-  [u"label"]=>
-  unicode(1) "d"
+  [%u|b%"id"]=>
+  %unicode|string%(1) "4"
+  [%u|b%"label"]=>
+  %unicode|string%(1) "d"
 }
 [009]
 array(4) {
   [0]=>
-  unicode(1) "5"
-  [u"id"]=>
-  unicode(1) "5"
+  %unicode|string%(1) "5"
+  [%u|b%"id"]=>
+  %unicode|string%(1) "5"
   [1]=>
-  unicode(1) "e"
-  [u"label"]=>
-  unicode(1) "e"
+  %unicode|string%(1) "e"
+  [%u|b%"label"]=>
+  %unicode|string%(1) "e"
 }
 [011]
 array(11) {
   [0]=>
-  unicode(1) "1"
-  [u"a"]=>
-  unicode(1) "2"
+  %unicode|string%(1) "1"
+  [%u|b%"a"]=>
+  %unicode|string%(1) "2"
   [1]=>
-  unicode(1) "2"
+  %unicode|string%(1) "2"
   [2]=>
-  unicode(1) "3"
-  [u"c"]=>
-  unicode(1) "3"
+  %unicode|string%(1) "3"
+  [%u|b%"c"]=>
+  %unicode|string%(1) "3"
   [3]=>
-  unicode(1) "4"
-  [u"C"]=>
-  unicode(1) "4"
+  %unicode|string%(1) "4"
+  [%u|b%"C"]=>
+  %unicode|string%(1) "4"
   [4]=>
   NULL
-  [u"d"]=>
+  [%u|b%"d"]=>
   NULL
   [5]=>
-  unicode(1) "1"
-  [u"e"]=>
-  unicode(1) "1"
+  %unicode|string%(1) "1"
+  [%u|b%"e"]=>
+  %unicode|string%(1) "1"
 }
 
 Warning: mysql_fetch_array(): %d is not a valid MySQL result resource in %s on line %d
index 4479a2ab3e8e07c73631add6a23ca8d6bde185c6..a54e5fd0ec83ff380705480e770f3cbaa9a1fda8 100644 (file)
@@ -61,78 +61,39 @@ print "done!";
 --EXPECTF--
 [005]
 array(2) {
-  ["id"]=>
-  string(1) "1"
-  ["label"]=>
-  string(1) "a"
+  [%u|b%"id"]=>
+  %unicode|string%(1) "1"
+  [%u|b%"label"]=>
+  %unicode|string%(1) "a"
 }
 [006]
 bool(false)
 [008]
 array(5) {
-  ["a"]=>
-  string(1) "2"
-  ["c"]=>
-  string(1) "3"
-  ["C"]=>
-  string(1) "4"
-  ["d"]=>
+  [%u|b%"a"]=>
+  %unicode|string%(1) "2"
+  [%u|b%"c"]=>
+  %unicode|string%(1) "3"
+  [%u|b%"C"]=>
+  %unicode|string%(1) "4"
+  [%u|b%"d"]=>
   NULL
-  ["e"]=>
-  string(1) "1"
+  [%u|b%"e"]=>
+  %unicode|string%(1) "1"
 }
 
 Warning: mysql_fetch_assoc(): %d is not a valid MySQL result resource in %s on line %d
 [010]
 array(5) {
-  ["id"]=>
-  string(1) "1"
-  ["label"]=>
-  string(1) "a"
-  ["_id"]=>
-  string(1) "1"
-  ["_label"]=>
-  string(2) "aa"
-  ["_foo"]=>
-  NULL
-}
-done!
---UEXPECTF--
-[005]
-array(2) {
-  [u"id"]=>
-  unicode(1) "1"
-  [u"label"]=>
-  unicode(1) "a"
-}
-[006]
-bool(false)
-[008]
-array(5) {
-  [u"a"]=>
-  unicode(1) "2"
-  [u"c"]=>
-  unicode(1) "3"
-  [u"C"]=>
-  unicode(1) "4"
-  [u"d"]=>
-  NULL
-  [u"e"]=>
-  unicode(1) "1"
-}
-
-Warning: mysql_fetch_assoc(): %d is not a valid MySQL result resource in %s on line %d
-[010]
-array(5) {
-  [u"id"]=>
-  unicode(1) "1"
-  [u"label"]=>
-  unicode(1) "a"
-  [u"_id"]=>
-  unicode(1) "1"
-  [u"_label"]=>
-  unicode(2) "aa"
-  [u"_foo"]=>
+  [%u|b%"id"]=>
+  %unicode|string%(1) "1"
+  [%u|b%"label"]=>
+  %unicode|string%(1) "a"
+  [%u|b%"_id"]=>
+  %unicode|string%(1) "1"
+  [%u|b%"_label"]=>
+  %unicode|string%(2) "aa"
+  [%u|b%"_foo"]=>
   NULL
 }
 done!
index c46335f9d6d143e9f2e0de4f9775e1648bec5dfc..0f337b80cbbfd6deaa3118f1209bc4eb33c36de2 100644 (file)
@@ -39,13 +39,13 @@ require_once('skipifconnectfailure.inc');
        if (!$res = mysql_query("SELECT id AS ID, label FROM test AS TEST ORDER BY id LIMIT 1", $link)) {
                printf("[005] [%d] %s\n", mysql_errno($link), mysql_error($link));
        }
-       if (false !== ($tmp = mysql_fetch_field($res, PHP_INT_MAX * 2)))
-               printf("[006] Expecting boolean/false got %s/%s\n", gettype($tmp), $tmp);
+       if (false !== ($tmp = mysql_fetch_field($res, PHP_INT_MAX - 1)))
+               printf("[006] Expecting boolean/false got %s/%s\n", gettype($tmp), var_export($tmp, true));
 
        mysql_free_result($res);
 
        if (false !== ($tmp = mysql_fetch_field($res)))
-               printf("[007] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
+               printf("[007] Expecting boolean/false, got %s/%s\n", gettype($tmp), var_export($tmp, true));
 
        $types = array(
                'BIT'               => array(1, 'int'),
@@ -135,59 +135,59 @@ require_once('skipifconnectfailure.inc');
 ?>
 --EXPECTF--
 object(stdClass)#%d (13) {
-  ["name"]=>
-  string(2) "ID"
-  ["table"]=>
-  string(4) "TEST"
-  ["def"]=>
-  string(0) ""
-  ["max_length"]=>
+  [%u|b%"name"]=>
+  %unicode|string%(2) "ID"
+  [%u|b%"table"]=>
+  %unicode|string%(4) "TEST"
+  [%u|b%"def"]=>
+  %unicode|string%(0) ""
+  [%u|b%"max_length"]=>
   int(1)
-  ["not_null"]=>
+  [%u|b%"not_null"]=>
   int(1)
-  ["primary_key"]=>
+  [%u|b%"primary_key"]=>
   int(1)
-  ["multiple_key"]=>
+  [%u|b%"multiple_key"]=>
   int(0)
-  ["unique_key"]=>
+  [%u|b%"unique_key"]=>
   int(0)
-  ["numeric"]=>
+  [%u|b%"numeric"]=>
   int(1)
-  ["blob"]=>
+  [%u|b%"blob"]=>
   int(0)
-  ["type"]=>
-  string(3) "int"
-  ["unsigned"]=>
+  [%u|b%"type"]=>
+  %unicode|string%(3) "int"
+  [%u|b%"unsigned"]=>
   int(0)
-  ["zerofill"]=>
+  [%u|b%"zerofill"]=>
   int(0)
 }
 object(stdClass)#%d (13) {
-  ["name"]=>
-  string(5) "label"
-  ["table"]=>
-  string(4) "TEST"
-  ["def"]=>
-  string(0) ""
-  ["max_length"]=>
+  [%u|b%"name"]=>
+  %unicode|string%(5) "label"
+  [%u|b%"table"]=>
+  %unicode|string%(4) "TEST"
+  [%u|b%"def"]=>
+  %unicode|string%(0) ""
+  [%u|b%"max_length"]=>
   int(1)
-  ["not_null"]=>
+  [%u|b%"not_null"]=>
   int(0)
-  ["primary_key"]=>
+  [%u|b%"primary_key"]=>
   int(0)
-  ["multiple_key"]=>
+  [%u|b%"multiple_key"]=>
   int(0)
-  ["unique_key"]=>
+  [%u|b%"unique_key"]=>
   int(0)
-  ["numeric"]=>
+  [%u|b%"numeric"]=>
   int(0)
-  ["blob"]=>
+  [%u|b%"blob"]=>
   int(0)
-  ["type"]=>
-  string(6) "string"
-  ["unsigned"]=>
+  [%u|b%"type"]=>
+  %unicode|string%(6) "string"
+  [%u|b%"unsigned"]=>
   int(0)
-  ["zerofill"]=>
+  [%u|b%"zerofill"]=>
   int(0)
 }
 bool(false)
@@ -196,178 +196,59 @@ Warning: mysql_fetch_field(): Bad field offset in %s on line %d
 
 Warning: mysql_fetch_field(): %d is not a valid MySQL result resource in %s on line %d
 object(stdClass)#%d (13) {
-  ["name"]=>
-  string(2) "id"
-  ["table"]=>
-  string(4) "test"
-  ["def"]=>
-  string(0) ""
-  ["max_length"]=>
+  [%u|b%"name"]=>
+  %unicode|string%(2) "id"
+  [%u|b%"table"]=>
+  %unicode|string%(4) "test"
+  [%u|b%"def"]=>
+  %unicode|string%(0) ""
+  [%u|b%"max_length"]=>
   int(1)
-  ["not_null"]=>
+  [%u|b%"not_null"]=>
   int(0)
-  ["primary_key"]=>
+  [%u|b%"primary_key"]=>
   int(0)
-  ["multiple_key"]=>
+  [%u|b%"multiple_key"]=>
   int(0)
-  ["unique_key"]=>
+  [%u|b%"unique_key"]=>
   int(0)
-  ["numeric"]=>
+  [%u|b%"numeric"]=>
   int(1)
-  ["blob"]=>
+  [%u|b%"blob"]=>
   int(0)
-  ["type"]=>
-  string(3) "int"
-  ["unsigned"]=>
+  [%u|b%"type"]=>
+  %unicode|string%(3) "int"
+  [%u|b%"unsigned"]=>
   int(0)
-  ["zerofill"]=>
+  [%u|b%"zerofill"]=>
   int(0)
 }
 object(stdClass)#%d (13) {
-  ["name"]=>
-  string(2) "id"
-  ["table"]=>
-  string(4) "test"
-  ["def"]=>
-  string(1) "1"
-  ["max_length"]=>
+  [%u|b%"name"]=>
+  %unicode|string%(2) "id"
+  [%u|b%"table"]=>
+  %unicode|string%(4) "test"
+  [%u|b%"def"]=>
+  %unicode|string%(1) "1"
+  [%u|b%"max_length"]=>
   int(0)
-  ["not_null"]=>
+  [%u|b%"not_null"]=>
   int(0)
-  ["primary_key"]=>
+  [%u|b%"primary_key"]=>
   int(0)
-  ["multiple_key"]=>
+  [%u|b%"multiple_key"]=>
   int(0)
-  ["unique_key"]=>
+  [%u|b%"unique_key"]=>
   int(0)
-  ["numeric"]=>
+  [%u|b%"numeric"]=>
   int(1)
-  ["blob"]=>
+  [%u|b%"blob"]=>
   int(0)
-  ["type"]=>
-  string(3) "int"
-  ["unsigned"]=>
+  [%u|b%"type"]=>
+  %unicode|string%(3) "int"
+  [%u|b%"unsigned"]=>
   int(0)
-  ["zerofill"]=>
-  int(0)
-}
-done!
---UEXPECTF--
-object(stdClass)#%d (13) {
-  [u"name"]=>
-  unicode(2) "ID"
-  [u"table"]=>
-  unicode(4) "TEST"
-  [u"def"]=>
-  unicode(0) ""
-  [u"max_length"]=>
-  int(1)
-  [u"not_null"]=>
-  int(1)
-  [u"primary_key"]=>
-  int(1)
-  [u"multiple_key"]=>
-  int(0)
-  [u"unique_key"]=>
-  int(0)
-  [u"numeric"]=>
-  int(1)
-  [u"blob"]=>
-  int(0)
-  [u"type"]=>
-  unicode(3) "int"
-  [u"unsigned"]=>
-  int(0)
-  [u"zerofill"]=>
-  int(0)
-}
-object(stdClass)#%d (13) {
-  [u"name"]=>
-  unicode(5) "label"
-  [u"table"]=>
-  unicode(4) "TEST"
-  [u"def"]=>
-  unicode(0) ""
-  [u"max_length"]=>
-  int(1)
-  [u"not_null"]=>
-  int(0)
-  [u"primary_key"]=>
-  int(0)
-  [u"multiple_key"]=>
-  int(0)
-  [u"unique_key"]=>
-  int(0)
-  [u"numeric"]=>
-  int(0)
-  [u"blob"]=>
-  int(0)
-  [u"type"]=>
-  unicode(6) "string"
-  [u"unsigned"]=>
-  int(0)
-  [u"zerofill"]=>
-  int(0)
-}
-bool(false)
-
-Warning: mysql_fetch_field(): Bad field offset in %s on line %d
-
-Warning: mysql_fetch_field(): %d is not a valid MySQL result resource in %s on line %d
-object(stdClass)#%d (13) {
-  [u"name"]=>
-  unicode(2) "id"
-  [u"table"]=>
-  unicode(4) "test"
-  [u"def"]=>
-  unicode(0) ""
-  [u"max_length"]=>
-  int(1)
-  [u"not_null"]=>
-  int(0)
-  [u"primary_key"]=>
-  int(0)
-  [u"multiple_key"]=>
-  int(0)
-  [u"unique_key"]=>
-  int(0)
-  [u"numeric"]=>
-  int(1)
-  [u"blob"]=>
-  int(0)
-  [u"type"]=>
-  unicode(3) "int"
-  [u"unsigned"]=>
-  int(0)
-  [u"zerofill"]=>
-  int(0)
-}
-object(stdClass)#%d (13) {
-  [u"name"]=>
-  unicode(2) "id"
-  [u"table"]=>
-  unicode(4) "test"
-  [u"def"]=>
-  unicode(1) "1"
-  [u"max_length"]=>
-  int(0)
-  [u"not_null"]=>
-  int(0)
-  [u"primary_key"]=>
-  int(0)
-  [u"multiple_key"]=>
-  int(0)
-  [u"unique_key"]=>
-  int(0)
-  [u"numeric"]=>
-  int(1)
-  [u"blob"]=>
-  int(0)
-  [u"type"]=>
-  unicode(3) "int"
-  [u"unsigned"]=>
-  int(0)
-  [u"zerofill"]=>
+  [%u|b%"zerofill"]=>
   int(0)
 }
 done!
index cc20f738b0ec91d4078a5367062e2e7c3a172c05..ab31ae742b3fa8e48b2ad2ec8b79992b2dfddc82 100644 (file)
@@ -79,20 +79,20 @@ print "done!";
 ?>
 --EXPECTF--
 object(stdClass)#%d (2) {
-  ["ID"]=>
-  string(1) "1"
-  ["label"]=>
-  string(1) "a"
+  [%u|b%"ID"]=>
+  %unicode|string%(1) "1"
+  [%u|b%"label"]=>
+  %unicode|string%(1) "a"
 }
 object(mysql_fetch_object_test)#%d (4) {
-  ["a"]=>
+  [%u|b%"a"]=>
   NULL
-  ["b"]=>
+  [%u|b%"b"]=>
   NULL
-  ["ID"]=>
-  string(1) "2"
-  ["label"]=>
-  string(1) "b"
+  [%u|b%"ID"]=>
+  %unicode|string%(1) "2"
+  [%u|b%"label"]=>
+  %unicode|string%(1) "b"
 }
 
 Warning: Missing argument 1 for mysql_fetch_object_construct::__construct() in %s on line %d
@@ -103,107 +103,38 @@ Notice: Undefined variable: a in %s on line %d
 
 Notice: Undefined variable: b in %s on line %d
 object(mysql_fetch_object_construct)#%d (4) {
-  ["a"]=>
+  [%u|b%"a"]=>
   NULL
-  ["b"]=>
+  [%u|b%"b"]=>
   NULL
-  ["ID"]=>
-  string(1) "3"
-  ["label"]=>
-  string(1) "c"
+  [%u|b%"ID"]=>
+  %unicode|string%(1) "3"
+  [%u|b%"label"]=>
+  %unicode|string%(1) "c"
 }
 
 Warning: Missing argument 2 for mysql_fetch_object_construct::__construct() in %s on line %d
 
 Notice: Undefined variable: b in %s on line %d
 object(mysql_fetch_object_construct)#%d (4) {
-  ["a"]=>
-  string(1) "a"
-  ["b"]=>
+  [%u|b%"a"]=>
+  %unicode|string%(1) "a"
+  [%u|b%"b"]=>
   NULL
-  ["ID"]=>
-  string(1) "4"
-  ["label"]=>
-  string(1) "d"
+  [%u|b%"ID"]=>
+  %unicode|string%(1) "4"
+  [%u|b%"label"]=>
+  %unicode|string%(1) "d"
 }
 object(mysql_fetch_object_construct)#%d (4) {
-  ["a"]=>
-  string(1) "a"
-  ["b"]=>
-  string(1) "b"
-  ["ID"]=>
-  string(1) "5"
-  ["label"]=>
-  string(1) "e"
-}
-bool(false)
-bool(false)
-bool(false)
-bool(false)
-bool(false)
-
-Warning: mysql_fetch_object(): %d is not a valid MySQL result resource in %s on line %d
-bool(false)
-
-Fatal error: Class 'this_class_does_not_exist' not found in %s on line %d
---UEXPECTF--
-object(stdClass)#%d (2) {
-  [u"ID"]=>
-  unicode(1) "1"
-  [u"label"]=>
-  unicode(1) "a"
-}
-object(mysql_fetch_object_test)#%d (4) {
-  [u"a"]=>
-  NULL
-  [u"b"]=>
-  NULL
-  [u"ID"]=>
-  unicode(1) "2"
-  [u"label"]=>
-  unicode(1) "b"
-}
-
-Warning: Missing argument 1 for mysql_fetch_object_construct::__construct() in %s on line %d
-
-Warning: Missing argument 2 for mysql_fetch_object_construct::__construct() in %s on line %d
-
-Notice: Undefined variable: a in %s on line %d
-
-Notice: Undefined variable: b in %s on line %d
-object(mysql_fetch_object_construct)#%d (4) {
-  [u"a"]=>
-  NULL
-  [u"b"]=>
-  NULL
-  [u"ID"]=>
-  unicode(1) "3"
-  [u"label"]=>
-  unicode(1) "c"
-}
-
-Warning: Missing argument 2 for mysql_fetch_object_construct::__construct() in %s on line %d
-
-Notice: Undefined variable: b in %s on line %d
-object(mysql_fetch_object_construct)#%d (4) {
-  [u"a"]=>
-  unicode(1) "a"
-  [u"b"]=>
-  NULL
-  [u"ID"]=>
-  unicode(1) "4"
-  [u"label"]=>
-  unicode(1) "d"
-}
-object(mysql_fetch_object_construct)#%d (4) {
-  [u"a"]=>
-  unicode(1) "a"
-  [u"b"]=>
-  unicode(1) "b"
-  [u"ID"]=>
-  unicode(1) "5"
-  [u"label"]=>
-  unicode(1) "e"
+  [%u|b%"a"]=>
+  %unicode|string%(1) "a"
+  [%u|b%"b"]=>
+  %unicode|string%(1) "b"
+  [%u|b%"ID"]=>
+  %unicode|string%(1) "5"
+  [%u|b%"label"]=>
+  %unicode|string%(1) "e"
 }
 bool(false)
 bool(false)
index d9fff217add3c448dedf8acca10d7753c7b62ef7..7de2d252662259438113df1b7f3eb6aaf1ca6472 100644 (file)
@@ -1,8 +1,8 @@
 --TEST--
 mysql_fetch_row()
 --SKIPIF--
-<?php 
-require_once('skipif.inc'); 
+<?php
+require_once('skipif.inc');
 require_once('skipifconnectfailure.inc');
 ?>
 --FILE--
@@ -40,27 +40,13 @@ print "done!";
 [004]
 array(2) {
   [0]=>
-  string(1) "1"
-  [1]=>
-  string(1) "a"
-}
-[005]
-bool(false)
-
-Warning: mysql_fetch_row(): %d is not a valid MySQL result resource in %s on line %d
-bool(false)
-done!
---UEXPECTF--
-[004]
-array(2) {
-  [0]=>
-  unicode(1) "1"
+  %unicode|string%(1) "1"
   [1]=>
-  unicode(1) "a"
+  %unicode|string%(1) "a"
 }
 [005]
 bool(false)
 
 Warning: mysql_fetch_row(): %d is not a valid MySQL result resource in %s on line %d
 bool(false)
-done!
+done!
\ No newline at end of file
index aeb516c8bbd70fd9e741f73ad62c0aeeb6617df4..f2ced72f7da7cb792a8c1864e2c8ac7b557d78c4 100644 (file)
@@ -1,8 +1,8 @@
 --TEST--
 mysql_field_name()
 --SKIPIF--
-<?php 
-require_once('skipif.inc'); 
+<?php
+require_once('skipif.inc');
 require_once('skipifconnectfailure.inc');
 ?>
 --FILE--
@@ -45,18 +45,7 @@ print "done!";
 Warning: mysql_field_name() expects exactly 2 parameters, 1 given in %s on line %d
 
 Warning: mysql_field_name(): Field -1 is invalid for MySQL result index %d in %s on line %d
-string(2) "id"
-
-Warning: mysql_field_name(): Field 2 is invalid for MySQL result index %d in %s on line %d
-
-Warning: mysql_field_name(): %d is not a valid MySQL result resource in %s on line %d
-bool(false)
-done!
---UEXPECTF--
-Warning: Wrong parameter count for mysql_field_name() in %s on line %d
-
-Warning: mysql_field_name(): Field -1 is invalid for MySQL result index %d in %s on line %d
-unicode(2) "id"
+%unicode|string%(2) "id"
 
 Warning: mysql_field_name(): Field 2 is invalid for MySQL result index %d in %s on line %d
 
index e5105d984d5caebe8bc564bf6cb291e3f6d7ed48..8424fafc90315065beb9456f6ea08c9556cc4522 100644 (file)
@@ -1,8 +1,8 @@
 --TEST--
 mysql_field_seek()
 --SKIPIF--
-<?php 
-require_once('skipif.inc'); 
+<?php
+require_once('skipif.inc');
 require_once('skipifconnectfailure.inc');
 ?>
 --FILE--
@@ -43,186 +43,89 @@ print "done!";
 Warning: mysql_field_seek(): Field -1 is invalid for MySQL result index %d in %s on line %d
 bool(false)
 object(stdClass)#%d (13) {
-  ["name"]=>
-  string(2) "id"
-  ["table"]=>
-  string(4) "test"
-  ["def"]=>
-  string(0) ""
-  ["max_length"]=>
-  int(1)
-  ["not_null"]=>
-  int(1)
-  ["primary_key"]=>
-  int(1)
-  ["multiple_key"]=>
-  int(0)
-  ["unique_key"]=>
-  int(0)
-  ["numeric"]=>
-  int(1)
-  ["blob"]=>
-  int(0)
-  ["type"]=>
-  string(3) "int"
-  ["unsigned"]=>
-  int(0)
-  ["zerofill"]=>
-  int(0)
-}
-bool(true)
-object(stdClass)#%d (13) {
-  ["name"]=>
-  string(2) "id"
-  ["table"]=>
-  string(4) "test"
-  ["def"]=>
-  string(0) ""
-  ["max_length"]=>
-  int(1)
-  ["not_null"]=>
-  int(1)
-  ["primary_key"]=>
-  int(1)
-  ["multiple_key"]=>
-  int(0)
-  ["unique_key"]=>
-  int(0)
-  ["numeric"]=>
-  int(1)
-  ["blob"]=>
-  int(0)
-  ["type"]=>
-  string(3) "int"
-  ["unsigned"]=>
-  int(0)
-  ["zerofill"]=>
-  int(0)
-}
-bool(true)
-object(stdClass)#%d (13) {
-  ["name"]=>
-  string(5) "label"
-  ["table"]=>
-  string(4) "test"
-  ["def"]=>
-  string(0) ""
-  ["max_length"]=>
-  int(1)
-  ["not_null"]=>
-  int(0)
-  ["primary_key"]=>
-  int(0)
-  ["multiple_key"]=>
-  int(0)
-  ["unique_key"]=>
-  int(0)
-  ["numeric"]=>
-  int(0)
-  ["blob"]=>
-  int(0)
-  ["type"]=>
-  string(6) "string"
-  ["unsigned"]=>
-  int(0)
-  ["zerofill"]=>
-  int(0)
-}
-
-Warning: mysql_field_seek(): Field %d is invalid for MySQL result index %d in %s on line %d
-bool(false)
-bool(false)
-
-Warning: mysql_field_seek(): %d is not a valid MySQL result resource in %s on line %d
-bool(false)
-done!
---UEXPECTF--
-Warning: mysql_field_seek(): Field -1 is invalid for MySQL result index %d in %s on line %d
-bool(false)
-object(stdClass)#%d (13) {
-  [u"name"]=>
-  unicode(2) "id"
-  [u"table"]=>
-  unicode(4) "test"
-  [u"def"]=>
-  unicode(0) ""
-  [u"max_length"]=>
+  [%u|b%"name"]=>
+  %unicode|string%(2) "id"
+  [%u|b%"table"]=>
+  %unicode|string%(4) "test"
+  [%u|b%"def"]=>
+  %unicode|string%(0) ""
+  [%u|b%"max_length"]=>
   int(1)
-  [u"not_null"]=>
+  [%u|b%"not_null"]=>
   int(1)
-  [u"primary_key"]=>
+  [%u|b%"primary_key"]=>
   int(1)
-  [u"multiple_key"]=>
+  [%u|b%"multiple_key"]=>
   int(0)
-  [u"unique_key"]=>
+  [%u|b%"unique_key"]=>
   int(0)
-  [u"numeric"]=>
+  [%u|b%"numeric"]=>
   int(1)
-  [u"blob"]=>
+  [%u|b%"blob"]=>
   int(0)
-  [u"type"]=>
-  unicode(3) "int"
-  [u"unsigned"]=>
+  [%u|b%"type"]=>
+  %unicode|string%(3) "int"
+  [%u|b%"unsigned"]=>
   int(0)
-  [u"zerofill"]=>
+  [%u|b%"zerofill"]=>
   int(0)
 }
 bool(true)
 object(stdClass)#%d (13) {
-  [u"name"]=>
-  unicode(2) "id"
-  [u"table"]=>
-  unicode(4) "test"
-  [u"def"]=>
-  unicode(0) ""
-  [u"max_length"]=>
+  [%u|b%"name"]=>
+  %unicode|string%(2) "id"
+  [%u|b%"table"]=>
+  %unicode|string%(4) "test"
+  [%u|b%"def"]=>
+  %unicode|string%(0) ""
+  [%u|b%"max_length"]=>
   int(1)
-  [u"not_null"]=>
+  [%u|b%"not_null"]=>
   int(1)
-  [u"primary_key"]=>
+  [%u|b%"primary_key"]=>
   int(1)
-  [u"multiple_key"]=>
+  [%u|b%"multiple_key"]=>
   int(0)
-  [u"unique_key"]=>
+  [%u|b%"unique_key"]=>
   int(0)
-  [u"numeric"]=>
+  [%u|b%"numeric"]=>
   int(1)
-  [u"blob"]=>
+  [%u|b%"blob"]=>
   int(0)
-  [u"type"]=>
-  unicode(3) "int"
-  [u"unsigned"]=>
+  [%u|b%"type"]=>
+  %unicode|string%(3) "int"
+  [%u|b%"unsigned"]=>
   int(0)
-  [u"zerofill"]=>
+  [%u|b%"zerofill"]=>
   int(0)
 }
 bool(true)
 object(stdClass)#%d (13) {
-  [u"name"]=>
-  unicode(5) "label"
-  [u"table"]=>
-  unicode(4) "test"
-  [u"def"]=>
-  unicode(0) ""
-  [u"max_length"]=>
+  [%u|b%"name"]=>
+  %unicode|string%(5) "label"
+  [%u|b%"table"]=>
+  %unicode|string%(4) "test"
+  [%u|b%"def"]=>
+  %unicode|string%(0) ""
+  [%u|b%"max_length"]=>
   int(1)
-  [u"not_null"]=>
+  [%u|b%"not_null"]=>
   int(0)
-  [u"primary_key"]=>
+  [%u|b%"primary_key"]=>
   int(0)
-  [u"multiple_key"]=>
+  [%u|b%"multiple_key"]=>
   int(0)
-  [u"unique_key"]=>
+  [%u|b%"unique_key"]=>
   int(0)
-  [u"numeric"]=>
+  [%u|b%"numeric"]=>
   int(0)
-  [u"blob"]=>
+  [%u|b%"blob"]=>
   int(0)
-  [u"type"]=>
-  unicode(6) "string"
-  [u"unsigned"]=>
+  [%u|b%"type"]=>
+  %unicode|string%(6) "string"
+  [%u|b%"unsigned"]=>
   int(0)
-  [u"zerofill"]=>
+  [%u|b%"zerofill"]=>
   int(0)
 }
 
index 5e552f8ee5ec450815bdc8848d1091371bb6a45b..a74b4da5acb3fdaf5e8046462f3d02cb3633e838 100644 (file)
@@ -1,8 +1,8 @@
 --TEST--
 mysql_field_table()
 --SKIPIF--
-<?php 
-require_once('skipif.inc'); 
+<?php
+require_once('skipif.inc');
 require_once('skipifconnectfailure.inc');
 ?>
 --FILE--
@@ -45,18 +45,7 @@ print "done!";
 Warning: mysql_field_table() expects exactly 2 parameters, 1 given in %s on line %d
 
 Warning: mysql_field_table(): Field -1 is invalid for MySQL result index %d in %s on line %d
-string(4) "test"
-
-Warning: mysql_field_table(): Field 2 is invalid for MySQL result index %d in %s on line %d
-
-Warning: mysql_field_table(): %d is not a valid MySQL result resource in %s on line %d
-bool(false)
-done!
---UEXPECTF--
-Warning: Wrong parameter count for mysql_field_table() in %s on line %d
-
-Warning: mysql_field_table(): Field -1 is invalid for MySQL result index %d in %s on line %d
-unicode(4) "test"
+%unicode|string%(4) "test"
 
 Warning: mysql_field_table(): Field 2 is invalid for MySQL result index %d in %s on line %d
 
index 2a72e2de88234c9124aeb9e2a16e55dbbb23b57f..575dad1fa100aa0931ad6f4a7f2173159a9f1569 100644 (file)
@@ -1,8 +1,8 @@
 --TEST--
 mysql_field_type()
 --SKIPIF--
-<?php 
-require_once('skipif.inc'); 
+<?php
+require_once('skipif.inc');
 require_once('skipifconnectfailure.inc');
 ?>
 --FILE--
@@ -45,18 +45,7 @@ print "done!";
 Warning: mysql_field_type() expects exactly 2 parameters, 1 given in %s on line %d
 
 Warning: mysql_field_type(): Field -1 is invalid for MySQL result index %d in %s on line %d
-string(3) "int"
-
-Warning: mysql_field_type(): Field 2 is invalid for MySQL result index %d in %s on line %d
-
-Warning: mysql_field_type(): %d is not a valid MySQL result resource in %s on line %d
-bool(false)
-done!
---UEXPECTF--
-Warning: Wrong parameter count for mysql_field_type() in %s on line %d
-
-Warning: mysql_field_type(): Field -1 is invalid for MySQL result index %d in %s on line %d
-unicode(3) "int"
+%unicode|string%(3) "int"
 
 Warning: mysql_field_type(): Field 2 is invalid for MySQL result index %d in %s on line %d
 
index b5b0a3a56c62d2422abbbd1c41931952c2ba4e89..ef7073fe271415e7468ce1508e789e620dcbfbf4 100644 (file)
@@ -49,7 +49,7 @@ mysql.allow_persistent=1
        else if ($port)
                $host = sprintf("%s:%s", $host, $port);
 
-       if (!$plink = mysql_pconnect($host, 'pcontest', 'pcontest'))
+       if (!$plink = mysql_pconnect($host, $user, $passwd))
                printf("[001] Cannot connect using the second DB user created during SKIPIF, [%d] %s\n",
                        mysql_errno(), mysql_error());
 
@@ -141,29 +141,15 @@ mysql.allow_persistent=1
 ?>
 --EXPECTF--
 array(2) {
-  ["id"]=>
-  string(1) "1"
-  ["label"]=>
-  string(1) "a"
+  [%u|b%"id"]=>
+  %unicode|string%(1) "1"
+  [%u|b%"label"]=>
+  %unicode|string%(1) "a"
 }
 array(2) {
-  ["id"]=>
-  string(1) "1"
-  ["label"]=>
-  string(1) "a"
-}
-done!
---UEXPECTF--
-array(2) {
-  [u"id"]=>
-  unicode(1) "1"
-  [u"label"]=>
-  unicode(1) "a"
-}
-array(2) {
-  [u"id"]=>
-  unicode(1) "1"
-  [u"label"]=>
-  unicode(1) "a"
+  [%u|b%"id"]=>
+  %unicode|string%(1) "1"
+  [%u|b%"label"]=>
+  %unicode|string%(1) "a"
 }
 done!
index 1778e48d2455287b96a801435615a57e13c7feb1..a57e42e6bdb83012097cc87fa0bfea5bb4d11658 100644 (file)
@@ -73,4 +73,4 @@ if ($IS_MYSQLND) {
 print "done!";
 ?>
 --EXPECTF--
-done!
\ No newline at end of file
+done!
index d1d4dfb8e9e490597e350071c5cf276c648e4dd3..6c8697c7c7deb942987f79d6df3a464bfd96f801 100644 (file)
@@ -1,8 +1,8 @@
 --TEST--
 mysql_query()
 --SKIPIF--
-<?php 
-require_once('skipif.inc'); 
+<?php
+require_once('skipif.inc');
 require_once('skipifconnectfailure.inc');
 ?>
 --FILE--
@@ -58,7 +58,7 @@ if (mysql_query('DROP PROCEDURE IF EXISTS p', $link)) {
                        printf("[009] Result seems wrong, dumping\n");
                        var_dump($tmp);
                }
-               if (ini_get('unicode.semantics') && !is_unicode($tmp['p_version'])) {
+               if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && !is_unicode($tmp['p_version'])) {
                        printf("[010] Expecting unicode string, dumping\n");
                        var_dump($tmp);
                }
@@ -75,7 +75,7 @@ if (mysql_query('DROP PROCEDURE IF EXISTS p', $link)) {
                        printf("[012] Result seems wrong, dumping\n");
                        var_dump($tmp);
                }
-               if (ini_get('unicode.semantics') && !is_unicode($tmp['f_version'])) {
+               if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && !is_unicode($tmp['f_version'])) {
                        printf("[013] Expecting unicode string, dumping\n");
                        var_dump($tmp);
                }
@@ -94,27 +94,14 @@ print "done!";
 ?>
 --EXPECTF--
 array(1) {
-  ["valid"]=>
-  string(30) "this is sql but with semicolon"
-}
-array(1) {
-  [""]=>
-  string(1) "a"
-}
-string(1) "a"
-
-Warning: mysql_query(): %d is not a valid MySQL-Link resource in %s on line %d
-done!
---UEXPECTF--
-array(1) {
-  [u"valid"]=>
-  unicode(30) "this is sql but with semicolon"
+  [%u|b%"valid"]=>
+  %unicode|string%(30) "this is sql but with semicolon"
 }
 array(1) {
-  [u""]=>
-  unicode(1) "a"
+  [%u|b%""]=>
+  %unicode|string%(1) "a"
 }
-unicode(1) "a"
+%unicode|string%(1) "a"
 
 Warning: mysql_query(): %d is not a valid MySQL-Link resource in %s on line %d
 done!
index 9561ece70c7dd1f14c2b14605968098fac540a0c..577ede3752136a0d7b356e7afe8e5fb0aee79841 100644 (file)
@@ -52,7 +52,7 @@ if (file_exists('./simple.csv'))
 if (!$fp = fopen('./simple.csv', 'w'))
        printf("[003] Cannot open CSV file\n");
 
-if (ini_get('unicode.semantics')) {
+if (version_compare(PHP_VERSION, '5.9.9', '>') >= 0) {
        if (!fwrite($fp, (binary)"'97';'x';\n") ||
                !fwrite($fp, (binary)"'98';'y';\n") ||
                !fwrite($fp, (binary)"99;'z';\n")) {
index 511da068bd5ab71ad65f6c75f051592d91e1b913..2789ad276c71c6ef0052ca42958568d4c3914823 100644 (file)
@@ -1,8 +1,8 @@
 --TEST--
 mysql_real_escape_string()
 --SKIPIF--
-<?php 
-require_once('skipif.inc'); 
+<?php
+require_once('skipif.inc');
 require_once('skipifconnectfailure.inc');
 ?>
 --FILE--
@@ -33,20 +33,11 @@ assert($tmp === mysql_real_escape_string("foo" . chr(0) . "bar"));
 print "done!";
 ?>
 --EXPECTF--
-string(31) "Am I a unicode string in PHP 6?"
-string(2) "\\"
-string(2) "\""
-string(2) "\'"
-string(2) "\n"
-string(2) "\r"
-string(8) "foo\0bar"
+%unicode|string%(31) "Am I a unicode string in PHP 6?"
+%unicode|string%(2) "\\"
+%unicode|string%(2) "\""
+%unicode|string%(2) "\'"
+%unicode|string%(2) "\n"
+%unicode|string%(2) "\r"
+%unicode|string%(8) "foo\0bar"
 done!
---UEXPECTF--
-unicode(31) "Am I a unicode string in PHP 6?"
-unicode(2) "\\"
-unicode(2) "\""
-unicode(2) "\'"
-unicode(2) "\n"
-unicode(2) "\r"
-unicode(8) "foo\0bar"
-done!
\ No newline at end of file
index 4217b2e3900f873a34bb69338bec9977f8e722ed..218cfc319d36d65f9321543338067b0eec431901 100644 (file)
@@ -73,12 +73,12 @@ bool(false)
 Warning: mysql_result(): Bad column offset specified in %s on line %d
 bool(false)
 valid fields
-string(1) "1"
-string(1) "a"
-string(1) "1"
-string(1) "1"
-string(1) "a"
-string(1) "a"
+%unicode|string%(1) "1"
+%unicode|string%(1) "a"
+%unicode|string%(1) "1"
+%unicode|string%(1) "1"
+%unicode|string%(1) "a"
+%unicode|string%(1) "a"
 some invalid fields
 
 Warning: mysql_result(): unknown not found in MySQL result index %d in %s on line %d
@@ -93,7 +93,7 @@ bool(false)
 Warning: mysql_result(): _test. not found in MySQL result index %d in %s on line %d
 bool(false)
 _id
-string(1) "1"
+%unicode|string%(1) "1"
 _label
 string(2) "aa"
 _foo
@@ -108,51 +108,3 @@ bool(false)
 Warning: mysql_result(): %d is not a valid MySQL result resource in %s on line %d
 bool(false)
 done!
---UEXPECTF--
-Warning: mysql_result(): Unable to jump to row -1 on MySQL result index %d in %s on line %d
-bool(false)
-
-Warning: mysql_result(): Unable to jump to row 2 on MySQL result index %d in %s on line %d
-bool(false)
-
-Warning: mysql_result(): Bad column offset specified in %s on line %d
-bool(false)
-
-Warning: mysql_result(): Bad column offset specified in %s on line %d
-bool(false)
-valid fields
-unicode(1) "1"
-unicode(1) "a"
-unicode(1) "1"
-unicode(1) "1"
-unicode(1) "a"
-unicode(1) "a"
-some invalid fields
-
-Warning: mysql_result(): unknown not found in MySQL result index %d in %s on line %d
-bool(false)
-
-Warning: mysql_result(): _test. not found in MySQL result index %d in %s on line %d
-bool(false)
-
-Warning: mysql_result():  not found in MySQL result index %d in %s on line %d
-bool(false)
-
-Warning: mysql_result(): _test. not found in MySQL result index %d in %s on line %d
-bool(false)
-_id
-unicode(1) "1"
-_label
-string(2) "aa"
-_foo
-NULL
-
-Warning: mysql_result(): test.id not found in MySQL result index %d in %s on line %d
-bool(false)
-
-Warning: mysql_result(): test.label not found in MySQL result index %d in %s on line %d
-bool(false)
-
-Warning: mysql_result(): %d is not a valid MySQL result resource in %s on line %d
-bool(false)
-done!
\ No newline at end of file
index 3391fa6e957cd4686c63b28e4f0c1f5fb82838b7..211e34222ea166610ff0b4d27068c555cf9b0bb6 100644 (file)
@@ -1,8 +1,8 @@
 --TEST--
 mysql_select_db()
 --SKIPIF--
-<?php 
-require_once('skipif.inc'); 
+<?php
+require_once('skipif.inc');
 require_once('skipifconnectfailure.inc');
 ?>
 --FILE--
@@ -66,13 +66,7 @@ if (false !== ($tmp = mysql_select_db($db, $link)))
 print "done!\n";
 ?>
 --EXPECTF--
-string(%d) "%s"
-bool(false)
-
-Warning: mysql_select_db(): %d is not a valid MySQL-Link resource in %s on line %d
-done!
---UEXPECTF--
-unicode(%d) "%s"
+%unicode|string%(%d) "%s"
 bool(false)
 
 Warning: mysql_select_db(): %d is not a valid MySQL-Link resource in %s on line %d
index 0fbff44e88e240ad2d86e50c2afe6ff2470d941a..946e8e05fd1d0397fce9b0eaa8713c1cdc72a2ea 100644 (file)
@@ -4,6 +4,11 @@ mysql_set_charset() - STUB, function usage not recommended
 <?php
 require_once('skipif.inc');
 require_once('skipifconnectfailure.inc');
+
+if (version_compare(PHP_VERSION, '5.9.9', '>') == 1) {
+       die('skip set character set not functional with PHP 6 (fomerly PHP 6 && unicode.semantics=On)');
+}
+
 if (!function_exists('mysql_set_charset'))
        die("skip Function not available");
 ?>
@@ -54,6 +59,3 @@ print "done!";
 ?>
 --EXPECTF--
 done!
---UEXPECTF--
-Warning: mysql_set_charset(): Character set %s is not supported when running PHP with unicode.semantics=On. in %s on line %d
-done!
\ No newline at end of file
index 684734a7d07ca4f6cbb3a266c987ad3e809976ce..2415e4fda0f0072d48818c53e89f602a52b70a24 100644 (file)
@@ -1,8 +1,8 @@
 --TEST--
 mysql_tablename()
 --SKIPIF--
-<?php 
-require_once('skipif.inc'); 
+<?php
+require_once('skipif.inc');
 require_once('skipifconnectfailure.inc');
 ?>
 --FILE--
@@ -45,18 +45,7 @@ print "done!";
 Warning: mysql_tablename() expects at least 2 parameters, 1 given in %s on line %d
 
 Warning: mysql_tablename(): Unable to jump to row -1 on MySQL result index %d in %s on line %d
-string(1) "1"
-
-Warning: mysql_tablename(): Unable to jump to row 2 on MySQL result index %d in %s on line %d
-
-Warning: mysql_tablename(): %d is not a valid MySQL result resource in %s on line %d
-bool(false)
-done!
---UEXPECTF--
-Warning: Wrong parameter count for mysql_tablename() in %s on line %d
-
-Warning: mysql_tablename(): Unable to jump to row -1 on MySQL result index %d in %s on line %d
-unicode(1) "1"
+%unicode|string%(1) "1"
 
 Warning: mysql_tablename(): Unable to jump to row 2 on MySQL result index %d in %s on line %d
 
index af08e68b31cc3c2f468db69539025d5781c15c9e..201129eff686597af64ead7b5cfd12126c3ca2ac 100644 (file)
@@ -26,9 +26,9 @@ mysql_close($link);
 print "done!\n";
 ?>
 --EXPECTF--
-Deprecated: mysql_db_query(): This function is deprecated; use mysql_query() instead%sin %s on line %d
+Deprecated: mysql_db_query(): %s
 
-Deprecated: mysql_escape_string(): This function is deprecated; use mysql_real_escape_string() instead. in %s on line %d
+Deprecated: mysql_escape_string(): %s
 I don\'t mind character sets, do I?\n
 Warning: mysql_query(): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BOGUS_SQL' at line 1 in %s on line %d
 done!
index 6701ce52a062884817cb20cdd61d8ca93caedf66..bc73c588851b61ea945dc21eaa3a5217ebc06ed2 100644 (file)
@@ -1,8 +1,8 @@
 --TEST--
 mysql_unbuffered_query()
 --SKIPIF--
-<?php 
-require_once('skipif.inc'); 
+<?php
+require_once('skipif.inc');
 require_once('skipifconnectfailure.inc');
 ?>
 --FILE--
@@ -48,7 +48,7 @@ if (mysql_unbuffered_query('DROP PROCEDURE IF EXISTS p', $link)) {
                        printf("[008] Result seems wrong, dumping\n");
                        var_dump($tmp);
                }
-               if (ini_get('unicode.semantics') && !is_unicode($tmp['p_version'])) {
+               if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && !is_unicode($tmp['p_version'])) {
                        printf("[009] Expecting unicode string, dumping\n");
                        var_dump($tmp);
                }
@@ -65,7 +65,7 @@ if (mysql_unbuffered_query('DROP PROCEDURE IF EXISTS p', $link)) {
                        printf("[011] Result seems wrong, dumping\n");
                        var_dump($tmp);
                }
-               if (ini_get('unicode.semantics') && !is_unicode($tmp['f_version'])) {
+               if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && !is_unicode($tmp['f_version'])) {
                        printf("[012] Expecting unicode string, dumping\n");
                        var_dump($tmp);
                }
@@ -88,21 +88,8 @@ print "done!";
 ?>
 --EXPECTF--
 array(1) {
-  ["valid"]=>
-  string(30) "this is sql but with semicolon"
-}
-bool(true)
-resource(%d) of type (mysql result)
-int(0)
-
-Notice: mysql_close(): Function called without first fetching all rows from a previous unbuffered query in %s on line %d
-
-Warning: mysql_unbuffered_query(): %d is not a valid MySQL-Link resource in %s on line %d
-done!
---UEXPECTF--
-array(1) {
-  [u"valid"]=>
-  unicode(30) "this is sql but with semicolon"
+  [%u|b%"valid"]=>
+  %unicode|string%(30) "this is sql but with semicolon"
 }
 bool(true)
 resource(%d) of type (mysql result)