The front underline Of construct in Php construct is double _

Source: Internet
Author: User

Definition and usage

The _ construct () function creates a new SimpleXMLElement object.

If yes, the function returns an object. If it fails, false is returned.

Syntax
__construct(data,options,is_url,ns,is_prefix)
Parameters Description
Data Required. The path or URL of an XML string or XML document.
Options Optional. Specifies the additional Libxml parameter.
Is_url Optional. Specifies whether the data parameter is a URL. The default value is false.
Ns Optional.
Is_prefix Optional.
Return Value

Returns a SimpleXMLElement object that represents data.

Example
<?php$xmlstring = <<<XML<?xml version="1.0" encoding="ISO-8859-1"?><note><to>George</to><from>John</from>SimpleXMLElement($xmlstring);echo $xml->body[0];?>

The output is similar:

Don't forget the meeting!
Later, we can see that the front _ of construct is one. I rely on it. This is also the last error. I forgot, but now I remember it.
Function _ construct ()
{}

No
Function _ construct ()
{}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.