本文整理汇总了PHP中Test::a方法的典型用法代码示例。如果您正苦于以下问题:PHP Test::a方法的具体用法?PHP Test::a怎么用?PHP Test::a使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Test
的用法示例。
在下文中一共展示了Test::a方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: a
<?php
require_once 'vendor/autoload.php';
use PHPixie\Debug;
$debug = new Debug();
Debug::log("test");
Debug::log(array(3));
class Test
{
public function a($string, $num)
{
//Note how the trace
//Will contain function parameters
Debug::logTrace();
}
}
$t = new Test();
$t->a("test", 5);
//The values will be printed
//only after this call
$debug->dumpLog();
示例2: a
$debug = new Debug();
Debug::dump("Array dump:");
Debug::dump(array(1));
Debug::dump("Short array dump:");
Debug::dump(array(1), true);
$object = (object) array('t' => 1);
Debug::dump("Object dump:");
Debug::dump($object);
Debug::dump("Short object dump:");
Debug::dump($object, true);
Debug::dump("Dump trace with parameters");
class Test
{
public function a($string)
{
$array = array(1, 2);
$this->b($string, $array);
}
public function b($string, $array)
{
$object = (object) array('t' => 1);
$this->c($string, $array, $object);
}
public function c()
{
Debug::trace();
}
}
$t = new Test();
$t->a("test");
示例3: a
//Pretty printing exceptions
try {
throw new \Exception("test");
} catch (\Exception $e) {
$debug->exceptionMessage($e);
}
echo "\n-------\n";
//Register handlers to pretty print
//all exception automatically.
//Logged items will also be printed
$debug->registerHandlers();
class Test
{
public function a($string)
{
$array = array(1, 2);
$this->b($string, $array);
}
public function b($string, $array)
{
$object = (object) array('t' => 1);
$this->c($string, $array, $object);
}
public function c()
{
substr();
}
}
$test = new Test();
$test->a("pixie");