When the object is instantiated, do you not add a new line? someone writes $ _ sxe = simplexml_load_file ('Text. XML') like this ');
Is it a function or an object?
Reply to discussion (solution)
Simplexml_load_file is a function.
Returns a SimpleXMLElement object.
You bought a car at the 4S store, and you don't need to build it again.
Simplexml_load_file is a function.
Returns a SimpleXMLElement object.
You bought a car at the 4S store, and you don't need to build it again.
As you said, can all php built-in objects be declared without directly using the functions in the object as the instantiation method?
How can this problem be understood? You should take a good look at the manual
If you are ill, don't answer it. get out of the box. do you still need to mention it if your mom B doesn't read the manual? why don't you disagree! Fuck!
How can this problem be understood? You should take a good look at the manual
Your mom B, are you having no problems with php now? if you have any problems, read the manual. are you still confused?
$ _ Sxe = simplexml_load_file ('Text. XML ');
Assign the SimpleXMLElement object returned by simplexml_load_file to the $ _ sxe variable.
Reading the manual is required. There are many problems that may not be available online. you can only read the manual. if you do not have a manual, you can even view the source code.
In this case, the return value of this function is an instantiated object, just like the Singleton mode. you don't need new, but you operate on objects.
Simplexml_load_file is a function.
The data returned by simplexml_load_file is an object.
There is no conflict between the two.
For example, foo is a method and an object is returned.
function foo(){ $ret = array( 'name' => 'fdipzone' ); return (object)$ret;}$obj = foo();echo $obj->name; // fdipzone
Simplexml_load_file is a function.
The data returned by simplexml_load_file is an object.
There is no conflict between the two.
For example, foo is a method and an object is returned.
function foo(){ $ret = array( 'name' => 'fdipzone' ); return (object)$ret;}$obj = foo();echo $obj->name; // fdipzone
I think you are right about this. remember that this principle is used in javascript to enable the write function.
I wonder why it's always a little silly. it's okay. Is it fun here? Your mom B, you don't like to answer other people's questions, or you are very disgusted with the questions raised by others. you can leave here, and this is not a zombie, it's not a cinema either. it's really hard for your mom B to understand. why are you suffering from this sin? there's only one explanation!