<?php
function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
global $debug;
$err_type = array (
1 => "Error", 2 => "Warning", 4 => "Parsing Error", 8 => "Notice", 16 => "Core Error", 32 => "Core Warning", 64 => "Compile Error", 128 => "Compile Warning", 256 => "User Error", 512 => "User Warning", 1024=> "User Notice", 2048=> "Strict Notice", 4096=> "Catchable fatal error", );
if (!empty($debug)) {
printf("%s: %s (%d)\n", $err_type[$err_no], $err_msg, $linenum);
}
else {
printf("ERR: %s\n",$err_type[$err_no]);
}
}
set_error_handler('test_error_handler');
$t_ary = array(
's1' => '日本語EUC-JPの文字列',
's2' => 'English Text'
);
class tc
{
public $s1 = '日本語EUC-JPの文字列';
public $s2 = 'English Text';
function tc()
{
}
}
$t_obj = new tc;
?>