Eg:
class abc {
public $instance;
function load_instance() {
$self -> instance = new classname;
}
}
$abc = new abc;
$abc -> load_instance();
But, because instances are passed by reference, the variable's life ends after the closing }.
Eg:
class abc {
public $instance;
function load_instance() {
$self -> instance = new classname;
}
}
$abc = new abc;
$abc -> load_instance();
But, because instances are passed by reference, the variable's life ends after the closing }.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks