} } $maxlent += 2; $itemcount = count($data); $idx = 0; foreach ($data as $k => $v) { $idx++; if (typeOf($v) == 'array' || typeOf($v) == 'stdClass') { $ttl = $head . $k . ' '; console::writeLn($ttl); $myend = '|_'; $nhead = $head; if ($idx++ > 0) { $nhead = substr($head, 0, strlen($head) - 1) . ' '; } self::__inspect_recurs($v, $nhead . $myend); } else { switch (typeOf($v)) { case 'boolean': $sv = $v ? 'true' : 'false'; break; default: $sv = '"' . $v . '"'; } console::writeLn('%s = %s', $head . sprintf('%s<%s>', $k, typeOf($v)), $sv); } } } } debug::setDebugProvider(new CliDebugProvider());
$idx = 0; for ($rowidx = 0; $rowidx < count($data); $rowidx++) { $ret .= '<tr><th>' . $rowidx . '</th>'; $row = $data[$rowidx]; $rowdata = array_values($row); for ($col = 0; $col < count($row) / 2; $col++) { $value = $row[$col]; if (is_array($value)) { $ret .= '<td>' . debug::inspectTableArray($value) . '</td>'; } else { if ($value === null) { $ret .= '<td><img src="data:image/gif;base64,R0lGODdhEwAHAKECAAAAAPj4/////////ywAAAAAEwAHAAACHYSPmWIB/KKBkznIKI0iTwlKXuR8B9aUXdYprlsAADs="></td>'; } else { $ret .= '<td>' . htmlentities($value) . '</td>'; } } } $ret .= '</tr>'; } $ret .= '</table>'; return $ret; } public function inspectReflection($obj) { $rc = new ReflectionClass($obj); var_dump($rc); die; } } debug::setDebugProvider(new webDebugProvider());