profile10.phpt

来自「PHP v6.0 For Linux 运行环境:Win9X/ WinME/ Wi」· PHPT 代码 · 共 26 行

PHPT
26
字号
--TEST--SimpleXML [profile]: Accessing two attributes with the same name, but different namespaces--SKIPIF--<?php if (!extension_loaded("simplexml")) print "skip"; ?>--FILE--<?phperror_reporting(E_ALL & ~E_NOTICE);$root = simplexml_load_string(b'<?xml version="1.0"?><root xmlns:reserved="reserved-ns" xmlns:special="special-ns"> <child reserved:attribute="Sample" special:attribute="Test" /></root>');$rsattr = $root->child->attributes('reserved-ns');$spattr = $root->child->attributes('special-ns');echo $rsattr['attribute'];echo "\n";echo $spattr['attribute'];echo "\n---Done---\n";?>--EXPECT--SampleTest---Done--- 

⌨️ 快捷键说明

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