<?php
include_once "extend.php";
$t = new ObjectModify();
//add dump method
$t->dump = function($a) {
var_dump($a);
};
//set today
$t->dayOfWeek = date('l');
//add dump today method
$t->addMethod('today', function () {
return $this->dump($this->dayOfWeek);
});
//dump today method
$t->today();
|