--SKIPIF--
<?php
include "_skipif.inc";
-if (!pq\Types::DEFINED) {
- die("skip pq\\Types::DEFINED == false\n");
-}
?>
+--INI--
+date.timezone=UTC
--FILE--
<?php
echo "Test\n";
1.1::float4 as float4,
2.2::float8 as float8,
'2013-01-01'::date as date,
-1::abstime as abstime,
'2013-01-01 01:01:01'::timestamp as timestamp,
'2013-01-01 01:01:01 UTC'::timestamptz as timestamptz,
-array[array[1,2,3],array[4,5,6],array[NULL::int,NULL::int,NULL::int]] as intarray
+array[array[1,2,3],array[4,5,6],array[NULL::int,NULL::int,NULL::int]] as intarray,
+array[box(point(1,2),point(2,3)),box(point(4,5),point(5,6))] as boxarray,
+array[]::text[] as emptyarray,
+'foo\n'::bytea as bytea,
+'foo\n'::bytea::text as bytea_text
");
var_dump($r->fetchRow(pq\Result::FETCH_ASSOC));
?>
DONE
--EXPECTF--
Test
-array(12) {
+array(15) {
["null"]=>
NULL
["bool"]=>
["format"]=>
string(5) "Y-m-d"
["date"]=>
- string(19) "2013-01-01 00:00:00"
+ string(%d) "2013-01-01 00:00:00%r(\.000000)?%r"
["timezone_type"]=>
int(3)
["timezone"]=>
string(3) "UTC"
}
- ["abstime"]=>
- object(pq\DateTime)#%d (4) {
- ["format"]=>
- string(11) "Y-m-d H:i:s"
- ["date"]=>
- string(19) "1970-01-01 00:00:01"
- ["timezone_type"]=>
- int(1)
- ["timezone"]=>
- string(6) "+00:00"
- }
["timestamp"]=>
object(pq\DateTime)#%d (4) {
["format"]=>
string(13) "Y-m-d H:i:s.u"
["date"]=>
- string(19) "2013-01-01 01:01:01"
+ string(%d) "2013-01-01 01:01:01%r(\.000000)?%r"
["timezone_type"]=>
int(3)
["timezone"]=>
["format"]=>
string(14) "Y-m-d H:i:s.uO"
["date"]=>
- string(19) "2013-01-01 01:01:01"
+ string(%d) "2013-01-01 01:01:01%r(\.000000)?%r"
["timezone_type"]=>
int(1)
["timezone"]=>
NULL
}
}
+ ["boxarray"]=>
+ array(2) {
+ [0]=>
+ string(11) "(2,3),(1,2)"
+ [1]=>
+ string(11) "(5,6),(4,5)"
+ }
+ ["emptyarray"]=>
+ array(0) {
+ }
+ ["bytea"]=>
+ string(4) "foo
+"
+ ["bytea_text"]=>
+ string(10) "\x666f6f0a"
}
-DONE
\ No newline at end of file
+DONE