__construct()

It creates a new SimpleXMLElement object.

Example

<?php
class PHPCode {
function __construct() {
print “Inside constructor”;
}

}

$phpObj = new PHPCode();
?>

Output

Inside constructor

Share