/php-src/ext/dom/tests/compareDocumentPosition/ |
H A D | equal.phpt | 2 compareDocumentPosition: equal nodes 18 $nodes = $xpath->query('//p'); 19 var_dump($nodes->item(0)->compareDocumentPosition($nodes->item(0)) === 0); 20 var_dump($nodes->item(1)->compareDocumentPosition($nodes->item(1)) === 0); 21 var_dump($nodes->item(0)->compareDocumentPosition($nodes->item(1)) === 0); 22 var_dump($nodes->item(1)->compareDocumentPosition($nodes->item(0)) === 0);
|
/php-src/ext/simplexml/tests/ |
H A D | bug55098.phpt | 10 $nodes = $xml->a->b; 12 function test($nodes, $name, $callable) { 14 foreach ($nodes as $nodeData) { 16 $callable($nodes); 20 test($nodes, "asXml", fn ($n) => $n->asXml()); 21 test($nodes, "attributes", fn ($n) => $n->attributes()); 22 test($nodes, "children", fn ($n) => $n->children()); 23 test($nodes, "getNamespaces", fn ($n) => $n->getNamespaces()); 24 test($nodes, "xpath", fn ($n) => $n->xpath("/root/a/b")); 25 test($nodes, "var_dump", fn ($n) => var_dump($n)); [all …]
|
H A D | bug48601.phpt | 10 $nodes = $sxe->xpath("/root/node2/@test"); 12 if (! is_array($nodes)) { 15 echo "Result Count: " . count($nodes) . "\n";
|
/php-src/ext/dom/tests/ |
H A D | DOMNode_normalize_basic.phpt | 14 * Calculate the number of title text nodes (1). 16 * Normalize author. Calculate the number of title text nodes (2). 17 * Normalize title. Calculate the number of title text nodes (1). 34 echo "Number of child nodes of title = "; 47 echo "Number of child nodes of title after normalizing author = "; 51 // should concatenate first and second title text nodes 54 echo "Number of child nodes of title after normalizing title = "; 59 Number of child nodes of title = int(1) 60 Number of child nodes of title after adding second title = int(2) 61 Number of child nodes of title after normalizing author = int(2) [all …]
|
H A D | DOMNode_hasChildNodes_basic.phpt | 2 Test whether a node has child nodes: hasChildNodes() 13 * Check for child nodes of the <book>, <title> and This is the title 28 echo "Root has child nodes: "; 31 echo "Title has child nodes: "; 34 echo "Text has child nodes: "; 39 Root has child nodes: bool(true) 40 Title has child nodes: bool(true) 41 Text has child nodes: bool(false)
|
H A D | DOMDocumentFragment_appendXML_hasChildNodes_basic.phpt | 11 echo "has child nodes\n"; 13 echo "has no child nodes\n"; 17 echo "has child nodes\n"; 19 echo "has no child nodes\n"; 23 has no child nodes 24 has child nodes
|
H A D | DOMNode_hasChildNodes.phpt | 17 echo "Document has child nodes\n"; 20 echo "Document has child nodes\n"; 28 echo "Document has child nodes\n"; 31 echo "Document with 2 child nodes\n"; 39 Document has child nodes 41 Document has child nodes 46 Document has child nodes 48 Document with 2 child nodes
|
H A D | bug67949.phpt | 17 $nodes = $doc->getElementsByTagName('div'); 20 var_dump(isset($nodes[0])); 21 var_dump(isset($nodes[1])); 22 var_dump(isset($nodes[-1])); 25 var_dump($nodes[0]->textContent); 26 var_dump($nodes[1]->textContent); 31 var_dump(isset($nodes[$offset]), $nodes[$offset]->textContent); 38 var_dump(isset($nodes[$offset]), $nodes[$offset]->textContent); 43 var_dump(isset($nodes[$offset]), $nodes[$offset]->textContent); 47 var_dump($nodes[][] = 1);
|
H A D | DOMXPath_evaluate_namespace_node_set.phpt | 18 function node_test($nodes) { 19 echo "nodes count: ", count($nodes), "\n"; 20 return array_sum(array_map(fn ($node) => strlen($node->nodeName), $nodes)); 30 nodes count: 2 32 nodes count: 2
|
H A D | bug42082.phpt | 9 $nodes = $xpath->query('*'); 10 echo get_class($nodes), "\n"; 11 var_dump($nodes->length); 12 $length = $nodes->length; 13 var_dump(empty($nodes->length), empty($length));
|
H A D | uaf_doctype_iterator.phpt | 2 UAF when removing doctype and iterating over the child nodes 17 $nodes = $ref->childNodes; 19 foreach($nodes as $str) {} 20 var_dump($nodes);
|
H A D | DOMNode_getLineNo_basic.phpt | 10 $nodes = $doc->getElementsByTagName('title'); 11 foreach($nodes as $node) {
|
H A D | bug43364.phpt | 2 Bug #43364 (recursive xincludes don't remove internal xml nodes properly) 7 function loopElements($nodes) 10 foreach($nodes as $node) {
|
H A D | gh15551.phpt | 8 $nodes = $fragment->childNodes; 9 $iter = $nodes->getIterator();
|
H A D | DOMNode_getNodePath_basic.phpt | 10 $nodes = $doc->getElementsByTagName('title'); 11 foreach($nodes as $node) {
|
H A D | childNodes_current_crash.phpt | 11 $nodes = $dom->documentElement->childNodes; 12 $iter = $nodes->getIterator();
|
H A D | DOMNode_removeChild_basic.phpt | 40 echo "original has $len nodes\n"; 51 echo "after text removed it now has $len nodes\n"; 59 original has 5 nodes 88 after text removed it now has 2 nodes
|
H A D | entity_reference_stale_02.phpt | 21 $nodes = $ref->childNodes; 22 $iter = $nodes->getIterator();
|
H A D | entity_reference_stale_01.phpt | 19 $nodes = $ref->childNodes; 23 var_dump($nodes);
|
/php-src/ext/dom/tests/modern/spec/ |
H A D | Node_normalize.phpt | 16 * Calculate the number of title text nodes (1). 18 * Normalize author. Calculate the number of title text nodes (2). 19 * Normalize title. Calculate the number of title text nodes (1). 36 echo "Number of child nodes of title = "; 49 echo "Number of child nodes of title after normalizing author = "; 53 // should concatenate first and second title text nodes 56 echo "Number of child nodes of title after normalizing title = "; 61 Number of child nodes of title = int(1) 62 Number of child nodes of title after adding second title = int(2) 63 Number of child nodes of title after normalizing author = int(2) [all …]
|
/php-src/ext/dom/parentnode/ |
H A D | tree.c | 99 if (Z_TYPE(nodes[i]) == IS_OBJECT) { in dom_is_node_in_list() 360 if (Z_TYPE_P(nodes) == IS_OBJECT) { in dom_zvals_to_single_node() 361 return dom_object_get_node(Z_DOMOBJ_P(nodes)); in dom_zvals_to_single_node() 363 ZEND_ASSERT(Z_TYPE_P(nodes) == IS_STRING); in dom_zvals_to_single_node() 364 node = xmlNewDocTextLen(documentNode, BAD_CAST Z_STRVAL_P(nodes), Z_STRLEN_P(nodes)); in dom_zvals_to_single_node() 381 if (Z_TYPE(nodes[i]) == IS_OBJECT) { in dom_zvals_to_single_node() 382 newNodeObj = Z_DOMOBJ_P(&nodes[i]); in dom_zvals_to_single_node() 414 ZEND_ASSERT(Z_TYPE(nodes[i]) == IS_STRING); in dom_zvals_to_single_node() 417 newNode = xmlNewDocTextLen(documentNode, BAD_CAST Z_STRVAL(nodes[i]), Z_STRLEN(nodes[i])); in dom_zvals_to_single_node() 440 zend_uchar type = Z_TYPE(nodes[i]); in dom_sanity_check_node_list_types() [all …]
|
/php-src/ext/dom/ |
H A D | php_dom.stub.php | 286 /** @param DOMNode|string $nodes */ 289 /** @param DOMNode|string $nodes */ 292 /** @param DOMNode|string $nodes */ 589 * @param DOMNode|string $nodes 595 * @param DOMNode|string $nodes 601 * @param DOMNode|string $nodes 663 * @param DOMNode|string $nodes 672 * @param DOMNode|string $nodes 678 * @param DOMNode|string $nodes 1057 * @param DOMNode|string $nodes [all …]
|
/php-src/ext/dom/tests/modern/xml/ |
H A D | xpath_query_context_in_scope_ns.phpt | 10 $nodes = $xpath->query($query, $context); 11 foreach ($nodes as $node) { 19 if (count($nodes) === 0) { 20 echo "No nodes found\n"; 73 No nodes found 75 No nodes found 85 No nodes found 94 No nodes found
|
/php-src/ext/dom/lexbor/lexbor/core/ |
H A D | in.c | 28 incoming->nodes = lexbor_dobject_create(); in lexbor_in_init() 30 return lexbor_dobject_init(incoming->nodes, chunk_size, in lexbor_in_init() 37 lexbor_dobject_clean(incoming->nodes); in lexbor_in_clean() 47 incoming->nodes = lexbor_dobject_destroy(incoming->nodes, true); in lexbor_in_destroy() 60 lexbor_in_node_t *node = lexbor_dobject_alloc(incoming->nodes); in lexbor_in_node_make() 105 return lexbor_dobject_free(incoming->nodes, node); in lexbor_in_node_destroy() 116 new_node = lexbor_dobject_alloc(node->incoming->nodes); in lexbor_in_node_split()
|
H A D | avl.c | 63 avl->nodes = lexbor_dobject_create(); in lexbor_avl_init() 64 return lexbor_dobject_init(avl->nodes, chunk_len, struct_size); in lexbor_avl_init() 72 lexbor_dobject_clean(avl->nodes); in lexbor_avl_clean() 81 avl->nodes = lexbor_dobject_destroy(avl->nodes, true); in lexbor_avl_destroy() 93 lexbor_avl_node_t *node = lexbor_dobject_calloc(avl->nodes); in lexbor_avl_node_make() 119 return lexbor_dobject_free(avl->nodes, node); in lexbor_avl_node_destroy() 269 new_node = lexbor_dobject_calloc(avl->nodes); in lexbor_avl_insert() 410 lexbor_dobject_free(avl->nodes, node); in lexbor_avl_remove() 433 (void) lexbor_dobject_free(avl->nodes, node); in lexbor_avl_remove_by_node()
|