- var_dump: documentation ( source)
<?php
class test2 {
}
class test3 {
}
class test {
private $title ='test2';
function aaa() {
return new $this->title();
}
function bbb() {
$title =$this->title();
return (new $this->title())();
}
function title() {
return 'test3';
}
}
$t = new test;
var_dump($t->aaa());
var_dump($t->bbb());
?>