- ob_start: documentation ( source)
- var_export: documentation ( source)
<?php
class AnotherClass{
public $world = "world";
}
$anotherClass = new AnotherClass();
class TestClass{
function __construct(){
ob_start(array($this,"callback"));
}
function callback($input){
global $anotherClass;
return $input. get_class($antherClass) . var_export($anotherClass->world, true);
}
}
$tClass = new TestClass();
echo "hello";
//ob_flush();