mirror of
https://github.com/php/php-src.git
synced 2026-03-27 01:32:22 +01:00
The $Id$ keywords were used in Subversion where they can be substituted with filename, last revision number change, last changed date, and last user who changed it. In Git this functionality is different and can be done with Git attribute ident. These need to be defined manually for each file in the .gitattributes file and are afterwards replaced with 40-character hexadecimal blob object name which is based only on the particular file contents. This patch simplifies handling of $Id$ keywords by removing them since they are not used anymore.
36 lines
692 B
PHP
36 lines
692 B
PHP
--TEST--
|
|
XMLReader: libxml2 XML Reader, moveToElement
|
|
--SKIPIF--
|
|
<?php if (!extension_loaded("xmlreader")) print "skip"; ?>
|
|
--FILE--
|
|
<?php
|
|
|
|
$xmlstring = '<?xml version="1.0" encoding="UTF-8"?>
|
|
<books><book num="1"></book><test /></books>';
|
|
|
|
$reader = new XMLReader();
|
|
|
|
$reader->XML($xmlstring);
|
|
|
|
// 2 read to get on the 2nd node
|
|
$reader->read();
|
|
$reader->read();
|
|
|
|
if ($reader->nodeType != XMLREADER::END_ELEMENT) {
|
|
if ($reader->nodeType == XMLREADER::ELEMENT && $reader->hasAttributes) {
|
|
$attr = $reader->moveToFirstAttribute();
|
|
if ($reader->moveToElement()) {
|
|
if ($reader->name == 'book') {
|
|
echo "ok\n";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
$reader->close();
|
|
?>
|
|
===DONE===
|
|
--EXPECT--
|
|
ok
|
|
===DONE===
|