Base::dump PHP Method

dump() public method

Dump expression with syntax highlighting
public dump ( $expr ) : null
$expr mixed
return null
    function dump($expr)
    {
        echo $this->highlight($this->stringify($expr));
    }

Usage Example

コード例 #1
0
ファイル: index.php プロジェクト: iplus/quiz-helper
function show_question(\Base $f3, $params)
{
    $ans = $f3->get('GET.answer');
    $rowid = $f3->get('GET.rowid');
    $db = $f3->get('DB');
    if ($rowid && $ans == "") {
        $f3->reroute('/');
    } else {
        if ($ans && $rowid) {
            $f3->dump($rowid);
            $res = $db->exec('UPDATE q SET answer = ? WHERE rowid = ?', array($ans, $rowid));
            $f3->reroute('/');
        } else {
            $res = $db->exec("SELECT rowid, * FROM q WHERE answer = '' ORDER BY random() LIMIT 1", $txt);
            $f3->set('question', $res);
            echo View::instance()->render('show_question.htm');
        }
    }
}