double arrow , single-arrow and now multi arrow ????
Posted: Mon Dec 22, 2014 2:57 am
hey guys i have been learning PHP for a few days now : i have a difficulty though :
checkout the below script :
now when i see something like :
or
i am comfortable with the syntex , but when i see something like :
i really get horrified !!! when are such constructs really used ??
can somebody really be kind enuf to point me to a documentation or some example .
This has been haunting me for quite a while now .
Thanks .
Gautam.
checkout the below script :
Code: Select all
<?php
ini_set("display_errors","1");
ERROR_REPORTING(E_ALL);
include_once('universal_connect.php');
class CreateTable
{
private $tableMaster;
private $hookup;
private $sql;
public function __construct()
{
$this->tableMaster="gautam";
$this->hookup=UniversalConnect::doConnect();
$drop = "DROP TABLE IF EXISTS $this->tableMaster";
if($this->hookup->query($drop) === true)
{
printf("Old table %s has been dropped.<br/>",$this->tableMaster);
}
$this->sql = "CREATE TABLE $this->tableMaster (
id SERIAL,
name NVARCHAR(30),
email NVARCHAR(36),
lang NVARCHAR(10),
PRIMARY KEY(id)
)";
if($this->hookup->query($this->sql) === true)
{
printf("Table $this->tableMaster has been created successfully.<br/>");
}
$this->hookup->close();
}
}
$worker=new CreateTable();
?>Code: Select all
a => "LOL"Code: Select all
$instance = new person();
$instance->get_person_name();Code: Select all
$a->$b->$c ; can somebody really be kind enuf to point me to a documentation or some example .
This has been haunting me for quite a while now .
Thanks .
Gautam.