⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 schema064.phpt

📁 PHP v6.0 For Linux 运行环境:Win9X/ WinME/ WinNT/ Win2K/ WinXP
💻 PHPT
字号:
--TEST--SOAP XML Schema 64: standard date/time types--SKIPIF--<?php require_once('skipif.inc'); ?>--FILE--<?phpinclude "test_schema.inc";$schema = <<<EOF	<complexType name="testType">		<sequence>			<element name="dateTime" type="dateTime"/>			<element name="time" type="time"/>			<element name="date" type="date"/>			<element name="gYearMonth" type="gYearMonth"/>			<element name="gYear" type="gYear"/>			<element name="gMonthDay" type="gMonthDay"/>			<element name="gDay" type="gDay"/>			<element name="gMonth" type="gMonth"/>		</sequence>	</complexType>EOF;$date = gmmktime(1,2,3,4,5,1976);putenv('TZ=GMT');test_schema($schema,'type="tns:testType"',array(	'dateTime' => $date,	'time' => $date,	'date' => $date,	'gYearMonth' => $date,	'gYear' => $date,	'gMonthDay' => $date,	'gDay' => $date,	'gMonth' => $date));echo "ok";?>--EXPECTF--<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType"><dateTime xsi:type="xsd:dateTime">1976-04-05T01:02:03Z</dateTime><time xsi:type="xsd:time">01:02:03Z</time><date xsi:type="xsd:date">1976-04-05Z</date><gYearMonth xsi:type="xsd:gYearMonth">1976-04Z</gYearMonth><gYear xsi:type="xsd:gYear">1976Z</gYear><gMonthDay xsi:type="xsd:gMonthDay">--04-05Z</gMonthDay><gDay xsi:type="xsd:gDay">---05Z</gDay><gMonth xsi:type="xsd:gMonth">--04--Z</gMonth></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>object(stdClass)#%d (8) {  ["dateTime"]=>  string(20) "1976-04-05T01:02:03Z"  ["time"]=>  string(9) "01:02:03Z"  ["date"]=>  string(11) "1976-04-05Z"  ["gYearMonth"]=>  string(8) "1976-04Z"  ["gYear"]=>  string(5) "1976Z"  ["gMonthDay"]=>  string(8) "--04-05Z"  ["gDay"]=>  string(6) "---05Z"  ["gMonth"]=>  string(7) "--04--Z"}ok--UEXPECTF--<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType"><dateTime xsi:type="xsd:dateTime">1976-04-05T01:02:03Z</dateTime><time xsi:type="xsd:time">01:02:03Z</time><date xsi:type="xsd:date">1976-04-05Z</date><gYearMonth xsi:type="xsd:gYearMonth">1976-04Z</gYearMonth><gYear xsi:type="xsd:gYear">1976Z</gYear><gMonthDay xsi:type="xsd:gMonthDay">--04-05Z</gMonthDay><gDay xsi:type="xsd:gDay">---05Z</gDay><gMonth xsi:type="xsd:gMonth">--04--Z</gMonth></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>object(stdClass)#%d (8) {  [u"dateTime"]=>  unicode(20) "1976-04-05T01:02:03Z"  [u"time"]=>  unicode(9) "01:02:03Z"  [u"date"]=>  unicode(11) "1976-04-05Z"  [u"gYearMonth"]=>  unicode(8) "1976-04Z"  [u"gYear"]=>  unicode(5) "1976Z"  [u"gMonthDay"]=>  unicode(8) "--04-05Z"  [u"gDay"]=>  unicode(6) "---05Z"  [u"gMonth"]=>  unicode(7) "--04--Z"}ok

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -