See someone write $_sxe=simplexml_load_file (' Text.xml ') like this;
Is this a function or an object?
Reply to discussion (solution)
Simplexml_load_file is a function
He returns a SimpleXMLElement object
You bought a car in a 4S store, and you don't need to build it.
Simplexml_load_file is a function
He returns a SimpleXMLElement object
You bought a car in a 4S store, and you don't need to build it.
As you say, any PHP built-in object can not be declared, directly using the function in the object as a method of instantiation?
How can you be so understanding? You should take a look at the handbook.
You are sick, do not want to answer, go away, your mother B do not read the handbook still use you to mention it, I can not understand how you disagree Ah! Exercise!
How can you be so understanding? You should take a look at the handbook.
Your mother B You have no problem with PHP now, is not a problem you read the manual ah, lack of heart or stupid you?
$_sxe=simplexml_load_file (' Text.xml ');
Assigns the SimpleXMLElement object returned by the Simplexml_load_file function to the $_SXE variable.
Look at the manual is necessary, a lot of questions online does not necessarily have, you can do is to read manuals, manuals, or even to see the source
In this case, the return value of this function is an instantiated object, just like the singleton pattern, you don't need new, but you're manipulating the object.
Simplexml_load_file is a function
And the data returned by Simplexml_load_file is an object
There is no conflict between the two.
For example: Foo is a method and returns an object.
function foo () { $ret = array ( ' name ' = ' Fdipzone ' ); Return (object) $ret;} $obj = foo (); Echo $obj->name; Fdipzone
Simplexml_load_file is a function
And the data returned by Simplexml_load_file is an object
There is no conflict between the two.
For example: Foo is a method and returns an object.
function foo () { $ret = array ( ' name ' = ' Fdipzone ' ); Return (object) $ret;} $obj = foo (); Echo $obj->name; Fdipzone
I think you are right, remember that JavaScript is used in this principle, in order to have ligatures function.
I just wonder why there are always some silly busy playing here, here is fun? Your mother B You do not like to answer other people's questions, or you are very disgusted with other people ask questions, your mother B you can leave here ah, here is not your mother's forced the brothel, is not a movie theater, really your mother B do not understand, why you here by this sin, there is only one explanation, lack of mind!