$array = array('red', 'green', 'blue'); t3lib_div::debug($array);
class MyClass { public $name = "John"; public $age = 30; } $myObject = new MyClass(); t3lib_div::debug($myObject);
$database = t3lib_div::makeInstance('TYPO3\CMS\Core\Database\DatabaseConnection'); $query = "SELECT * FROM tablename WHERE id = 1"; $result = $database->sql_query($query); t3lib_div::debug($result);Brief Description of Examples: The first example shows how to debug an array by outputting its contents. The second example shows how to debug an object by outputting its properties. The third example shows how to debug a database query by outputting the query result. Package Library: The t3lib_div debug function is part of TYPO3 CMS, specifically the "t3lib" package.