- Output for git.master, git.master_jit, rfc.property-hooks
- string(1832) "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <pre class="prettyprint"> SimpleXML Example Please go http://www.ucertify.com </pre><p> Which of the following statements will display the HREF attribute on the anchor tag if the SimpleXML object is $sxml? | In the script given in the question, HREF is the attribute of the anchor (<a>) tag. Besides this, anchor tag is inside the <h1> tag and <body> tag. Hence, you will access the HREF tag in the following way: <pre class="prettyprint">$sxml-&gt;body-&gt;h1-&gt;a[&#039;href&#039;]</pre> Fact What is SimpleXML? SimpleXML is a PHP extension that allows users to easily manipulate/use XML data. Its functions let a user convert XML to an object, which can be processed with property selectors and array iterators. Consider the following XML file, which describes a small collection of books in XML format. It has a root node of store having a direct child, i.e., category, which classifies the books as fiction; category has two children() labelled book; "twilight" by Stephinie Mayer and "The Bikers" by Alex R. Stuart. <pre class="prettyprint"> twilight Stephinie Mayer The Bikers Alex R. Stuart </pre> To extract the book title and author, a user will run the following PHP script: <pre class="prettyprint">category as $category) { printf(&quot;Category %s\n&quot;, $category[&#039;id&#039;]); foreach ($category-&gt;book as $book) { printf(&quot;Title: %s\n&quot;, $book-&gt;title); printf(&quot;Author: %s\n&quot;, $book-&gt;author); } } ?&gt;</pre> </body></h1></a></p> "
This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.
Active branches
Archived branches
Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page
- 2020-03-21 RFC: Is_Literal - declined
- 2020-12-04 Enumerations - included in PHP 8.1
- 2018-06-15 Typed Properties v2 - implemented in PHP 7.4
- 2016-08-12 Object typehint - included in PHP 7.2
- 2016-08-14 Arrow functions - withdrawn
- 2016-05-29 array_change_keys() - withdrawn
- 2016-04-19 Lexical scope support for anonymous classes - suspended
- 2016-04-17 Functional Interfaces - declined
- 2016-03-16 Typed Properties - superseded in favor of Typed Properties 2.0
- 2015-08-27 Callable Prototypes - declined
- 2015-05-01 Short Closures - declined / withdrawn in favor of Arrow Functions
- 2015-02-18 Scalar type hints v5 - included in PHP 7
- 2015-02-14 Union Types - declined
- 2013-09-22 Anonymous classes - included in PHP 7