Is there any difference between $this->link and $this->_link ?
(link being a pdo connection)
Also, is there a difference between
$this->link->prepare() And: $this->_link->prepare()




Posted 23 June 2011 - 10:15 AM
<?php
class Link
{
public function __construct($link, $_link)
{
$this->link = $link;
$this->_link = $_link;
}
public function printLinks()
{
echo "{$this->link} {$this->_link}\n";
}
private $link;
private $_link;
}
$l = new Link("link1", "link2");
$l->printLinks();
php -f link.php link1 link2
