include class debug |
18 |
require __DIR__.'/../class/class.debug.php'; $t->checkEqual(class_exists('debug'), true);
|
[1.385 ms]
true |
Ok |
check versions info |
23 |
$info = $t->getClassVersion("debug"); $t->check($info, $info >= 2.52);
|
[0.073 ms] 2.52 |
Ok |
debug::write integer |
27 |
$var = 1; debug::write($var); $t->checkOutput('Line '.(__LINE__-1).',integer,1h');
|
[0.038 ms]
[26.04.2025 10:55:56,484](775k/960k) Debug::write "phpcheck.class.debug.php" Line 28 |
0 | integer | 1 [00000001h] |
|
Ok |
debug::write float |
32 |
$var = 1.1; debug::write($var); $t->checkOutput('Line '.(__LINE__-1).',1.1');
|
[0.051 ms]
[26.04.2025 10:55:56,484][+48 μs](776k/960k) Debug::write "phpcheck.class.debug.php" Line 33 |
0 | double | 1.1 |
|
Ok |
debug::write float result |
37 |
$var = 0.7 + 0.1; debug::write($var); $t->checkOutput('Line '.(__LINE__-1).',0.799');
|
[0.015 ms]
[26.04.2025 10:55:56,484][+57 μs](778k/960k) Debug::write "phpcheck.class.debug.php" Line 38 |
0 | double | 0.7999999999999999 |
|
Ok |
debug::write ASCII string |
42 |
$var = "ASCII-String"; debug::write($var); $t->checkOutput('string(12),ASCII');
|
[0.103 ms]
[26.04.2025 10:55:56,484][+21 μs](780k/960k) Debug::write "phpcheck.class.debug.php" Line 43 |
0 | string(12) ASCII | "ASCII-String" |
|
Ok |
debug::write string, integer |
47 |
$var = 6789; debug::write('Ein Integer:',$var); $t->checkOutput(6789);
|
[0.025 ms]
[26.04.2025 10:55:56,484][+110 μs](781k/960k) Debug::write "phpcheck.class.debug.php" Line 48 |
0 | string(12) ASCII | "Ein Integer:" | 1 | integer | 6789 [00001A85h] |
|
Ok |
debug::write UTF8 string |
52 |
$var = "Umlaute äöü"; debug::write($var); $t->checkOutput('string(14),UTF,äöü');
|
[0.016 ms]
[26.04.2025 10:55:56,484][+31 μs](784k/960k) Debug::write "phpcheck.class.debug.php" Line 53 |
0 | string(14) UTF-8 | "Umlaute äöü" |
|
Ok |
debug::write UTF8 BOM |
57 |
$var = "\xEF\xBB\xBFUmlaute äöü"; debug::write($var); $t->checkOutput('UTF,BOM,äöü');
|
[0.019 ms]
[26.04.2025 10:55:56,484][+21 μs](785k/960k) Debug::write "phpcheck.class.debug.php" Line 58 |
0 | string(17) UTF-8 BOM | "\xef\xbb\xbfUmlaute äöü" |
|
Ok |
debug::write UTF-8mb3 |
62 |
$var = "1€"; debug::write($var); $t->checkOutput('UTF-8mb3,1€');
|
[0.013 ms]
[26.04.2025 10:55:56,484][+24 μs](787k/960k) Debug::write "phpcheck.class.debug.php" Line 63 |
0 | string(4) UTF-8mb3 | "1€" |
|
Ok |
debug::write ISO-String |
67 |
$string = "text mit Umlauten äöü"; $iso = mb_convert_encoding($string,"ISO-8859-1","UTF8"); debug::write($iso); $t->checkOutput('ISO-8859-1');
|
[0.053 ms]
[26.04.2025 10:55:56,484][+33 μs](789k/960k) Debug::write "phpcheck.class.debug.php" Line 69 |
0 | string(21) ISO-8859-1 | "text mit Umlauten \xe4\xf6\xfc" |
|
Ok |
debug::write CP1252-String |
73 |
$utf8 = "text mit Umlauten äöü und € Symbol"; $str = mb_convert_encoding($utf8,"CP1252","UTF8"); debug::write($str); $t->checkOutput('CP1252');
|
[0.041 ms]
[26.04.2025 10:55:56,484][+55 μs](791k/960k) Debug::write "phpcheck.class.debug.php" Line 75 |
0 | string(34) CP1252 | "text mit Umlauten \xe4\xf6\xfc und \x80 Symbol" |
|
Ok |
debug::write Binary String |
79 |
$var = chr(0x7F).chr(3)."\t\r\n"; debug::write($var); $t->checkOutput('\x7f,\x03,\t,\r,\n');
|
[0.018 ms]
[26.04.2025 10:55:56,484][+36 μs](793k/960k) Debug::write "phpcheck.class.debug.php" Line 80 |
0 | string(5) ASCII | "\x7f\x03\t\r\n" |
|
Ok |
debug::write Binary String with \0 |
84 |
$var = chr(0)."abc"."\0"; debug::write($var); $t->checkOutput('\x00,abc');
|
[0.016 ms]
[26.04.2025 10:55:56,484][+23 μs](795k/960k) Debug::write "phpcheck.class.debug.php" Line 85 |
0 | string(5) ASCII | "\x00abc\x00" |
|
Ok |
debug::write String with Backlash |
89 |
$var = "a".chr(0x5C)."b"; //'a\b' 3 chars debug::write($var); $t->checkOutput('string(3),'."a".chr(0x5C).chr(0x5C).'b');
|
[0.012 ms]
[26.04.2025 10:55:56,484][+20 μs](796k/960k) Debug::write "phpcheck.class.debug.php" Line 90 |
0 | string(3) ASCII | "a\\b" |
|
Ok |
debug::write String with Backlash |
94 |
$var = "a\\b"; //'a\b' 3 chars debug::write($var); $t->checkOutput('string(3),'."a".chr(0x5C).chr(0x5C).'b');
|
[0.019 ms]
[26.04.2025 10:55:56,484][+17 μs](798k/960k) Debug::write "phpcheck.class.debug.php" Line 95 |
0 | string(3) ASCII | "a\\b" |
|
Ok |
debug::write String with Single Quotes |
99 |
$var = "test's"; debug::write($var); $t->checkOutput('string(6),'."test's");
|
[0.011 ms]
[26.04.2025 10:55:56,484][+24 μs](800k/960k) Debug::write "phpcheck.class.debug.php" Line 100 |
0 | string(6) ASCII | "test's" |
|
Ok |
debug::write String with Double Quotes |
104 |
$var = "test \"hochkomma\""; debug::write($var); $t->checkOutput('string(16),test,\"hochkomma');
|
[0.013 ms]
[26.04.2025 10:55:56,484][+16 μs](802k/960k) Debug::write "phpcheck.class.debug.php" Line 105 |
0 | string(16) ASCII | "test \"hochkomma\"" |
|
Ok |
debug::write String with many Spaces |
109 |
$var = "five spaces"; debug::write($var); $t->checkOutput('five,\x20\x20\x20\x20 ');
|
[0.012 ms]
[26.04.2025 10:55:56,484][+18 μs](804k/960k) Debug::write "phpcheck.class.debug.php" Line 110 |
0 | string(15) ASCII | "five\x20\x20\x20\x20 spaces" |
|
Ok |
debug::writePre Text |
114 |
$sqlString = "SELECT id, eventdate, eventdesc FROM tab LIMIT 100; "; debug::writePre($sqlString); //check if 2 blank spaces in front of 100 $t->checkOutput('SELECT, 100');
|
[0.012 ms]
[26.04.2025 10:55:56,484][+17 μs](805k/960k) Debug::writePre "phpcheck.class.debug.php" Line 121 |
0 | string(58) ASCII | SELECT
id, eventdate, eventdesc
FROM
tab
LIMIT
100;
|
|
Ok |
debug::writeHex |
126 |
$string = "012"; debug::writeHex($string); $t->checkOutput('\x30\x31\x32');
|
[0.012 ms]
[26.04.2025 10:55:56,484][+16 μs](807k/960k) Debug::writeHex "phpcheck.class.debug.php" Line 127 |
0 | string(3) ASCII | \x30\x31\x32 |
|
Ok |
debug::writeUni |
131 |
$string = "0123\r\naöäü€ def"; debug::writeUni($string); $t->checkOutput('0123\\x0d\\x0aa\\u{f6}\\u{e4}\\u{fc}\\u{20ac}\\x20def');
|
[0.063 ms]
[26.04.2025 10:55:56,484][+16 μs](809k/960k) Debug::writeUni "phpcheck.class.debug.php" Line 132 |
0 | string(20) UTF-8mb3 | 0123\x0d\x0aa\u{f6}\u{e4}\u{fc}\u{20ac}\x20def |
|
Ok |
debug::writeUni utf8mb4 |
136 |
$string = "'takriLetterA:𑚀'"; debug::writeUni($string); $t->checkOutput('takriLetterA:\u{11680}');
|
[0.021 ms]
[26.04.2025 10:55:56,484][+68 μs](811k/960k) Debug::writeUni "phpcheck.class.debug.php" Line 137 |
0 | string(19) UTF-8mb4 | 'takriLetterA:\u{11680}' |
|
Ok |
debug::writeIf: false |
141 |
debug::save('first Info'); //with condition==false save-Info will be remove $condition = false; debug::writeIf($condition,'second Info'); $t->checkEqual($t->getOutput(), "");
|
[0.016 ms]
|
Ok |
debug::writeIf: true |
148 |
debug::save('1.Info'); $condition = true; debug::writeIf($condition,'2.Info'); $t->checkOutput("save,1.Info,write,2.Info");
|
[0.025 ms]
[26.04.2025 10:55:56,484][+20 μs](813k/960k) Debug::save "phpcheck.class.debug.php" Line 148 |
0 | string(6) ASCII | "1.Info" |
[26.04.2025 10:55:56,484][+12 μs](814k/960k) Debug::writeIf "phpcheck.class.debug.php" Line 150 |
0 | string(6) ASCII | "2.Info" |
|
Ok |
debug::write array |
157 |
$var = array("a" => 1, "b" => 5.6, "string" => "text"); debug::write($var); $t->checkOutput('array(3)');
|
[0.023 ms]
[26.04.2025 10:55:56,484][+18 μs](816k/960k) Debug::write "phpcheck.class.debug.php" Line 158 |
0 | array(3) | array (
'a' => 1,
'b' => 5.6,
'string' => "text",
) |
|
Ok |
debug::writeHex array |
162 |
$var = array("a" => 1, "b" => 5.6, "string" => "text"); debug::writeHex($var); $t->checkOutput('array(3),\x74');
|
[0.033 ms]
[26.04.2025 10:55:56,484][+29 μs](818k/960k) Debug::writeHex "phpcheck.class.debug.php" Line 163 |
0 | array(3) | array (
'a' => 1,
'b' => 5.6,
'string' => "\x74\x65\x78\x74",
) |
|
Ok |
debug::write Array with Recursion |
167 |
$var = array("a","b"); $var['c'] = & $var; debug::write($var); $t->checkOutput('array');
|
[0.014 ms]
[26.04.2025 10:55:56,484][+39 μs](820k/960k) Debug::write "phpcheck.class.debug.php" Line 169 |
0 | array(3) | Array
(
[0] => a
[1] => b
[c] => Array
*RECURSION*
)
|
|
Ok |
debug::write object |
173 |
class data{ public $p1 = 23; public $p2 = "test_p2"; } $var = new data; debug::write($var); $t->checkOutput('data::');
|
[0.021 ms]
[26.04.2025 10:55:56,485][+18 μs](822k/960k) Debug::write "phpcheck.class.debug.php" Line 178 |
0 | object(data)#2 (2) | \data::__set_state(array(
'p1' => 23,
'p2' => "test_p2",
)) |
|
Ok |
debug::write object with *RECURSION* |
182 |
$var->c = $var; debug::write($var); $t->checkOutput('data,RECURSION');
|
Unknown error 8192: Creation of dynamic property data::$c is deprecated (phpcheck.class.debug.php line 182) [0.038 ms]
Deprecated: Creation of dynamic property data::$c is deprecated in /mnt/web313/c0/70/5508370/htdocs/pju24/check/phpcheck.class.debug.php on line 182
[26.04.2025 10:55:56,485][+48 μs](825k/960k) Debug::write "phpcheck.class.debug.php" Line 183 |
0 | object(data)#2 (3) | data Object
(
[p1] => 23
[p2] => test_p2
[c] => data Object
*RECURSION*
)
|
|
Ok |
debug::write date-time object |
187 |
$date = new DateTime(); debug::write($date); $t->checkOutput(array('date',date("Y-m-d")));
|
[0.036 ms]
[26.04.2025 10:55:56,485][+29 μs](827k/960k) Debug::write "phpcheck.class.debug.php" Line 188 |
0 | object(DateTime)#3 (3) | \DateTime::__set_state(array(
'date' => "2025-04-26 10:55:56.485078",
'timezone_type' => 3,
'timezone' => "UTC",
)) |
|
Ok |
debug::write Simple XML |
192 |
$strXml = '<root><div attr="abc">45</div></root>'; $xml = simplexml_load_string($strXml); debug::write($xml); $t->checkOutput('abc,45');
|
[0.215 ms]
[26.04.2025 10:55:56,485][+128 μs](829k/960k) Debug::write "phpcheck.class.debug.php" Line 194 |
0 | object(SimpleXMLElement)#4 (1) | <?xml version="1.0"?>
<root>
<div attr="abc">45</div>
</root>
|
|
Ok |
debug::write Simple XML attributes |
198 |
debug::write($xml->div->attributes()); $t->checkOutput('abc');
|
[0.073 ms]
[26.04.2025 10:55:56,485][+135 μs](831k/960k) Debug::write "phpcheck.class.debug.php" Line 198 |
0 | object(SimpleXMLElement)#7 (1) | array(
'@attributes' =>
array (
'attr' => "abc",
),
) |
|
Ok |
debug::write DOMDocument |
202 |
$str = "<!DOCTYPE html><div>test3</div>"; $doc = new DOMDocument(); $doc->loadHTML($str); debug::write($doc); $t->checkOutput('DOMDocument,<div,test3,/div');
|
[0.060 ms]
[26.04.2025 10:55:56,485][+112 μs](834k/960k) Debug::write "phpcheck.class.debug.php" Line 205 |
0 | object(DOMDocument)#7 (0) | <?xml version="1.0" standalone="yes"?>
<!DOCTYPE html>
<html>
<body>
<div>test3</div>
</body>
</html>
|
|
Ok |
debug::write DOMNodeList |
209 |
$str = "<!DOCTYPE html><div>test4</div>"; $doc = new DOMDocument(); $doc->loadHTML($str); $nodeList = $doc->getElementsByTagName('div'); debug::write($nodeList); $t->checkOutput('DOMNodeList,<div,test4,/div');
|
[0.043 ms]
[26.04.2025 10:55:56,485][+44 μs](836k/960k) Debug::write "phpcheck.class.debug.php" Line 213 |
0 | object(DOMNodeList)#7 (1) | array(
DOMElement::'<div>test4</div>'
) |
|
Ok |
function socket_create not exists for test |
225 |
$t->checkEqual(function_exists('socket_create'),true);
|
[0.000 ms]
false |
Error |
debug::write resource(gd) |
230 |
$img = imagecreate(100 , 50); ImageColorAllocate($img, 0, 255, 0); debug::write($img); $expectedOutput = intval(PHP_VERSION) >= 8 ? 'object(GdImage)' : 'resource(gd)' ; $t->checkOutput($expectedOutput);
|
[0.189 ms]
[26.04.2025 10:55:56,485][+54 μs](852k/960k) Debug::write "phpcheck.class.debug.php" Line 232 |
0 | object(GdImage)#8 (0) | 100 x 50 px (Error Creation of dynamic property data::$c is deprecated)
|
|
Ok |
debug::write resource(gd) with error |
240 |
$img = imagecreate(50 , 50); debug::write($img); $t->checkOutput($expectedOutput);
|
Warning: imagepng(): gd-png error: no colors in palette (class.debug.php line 868) [0.025 ms]
[26.04.2025 10:55:56,485][+188 μs](851k/960k) Debug::write "phpcheck.class.debug.php" Line 241 |
0 | object(GdImage)#6 (0) | 50 x 50 px (Error imagepng(): gd-png error: no colors in palette)
|
|
Ok |
debug::write truecolor resource gd |
245 |
$img = imagecreatetruecolor(50 , 50); $green = ImageColorAllocate($img, 0, 255, 0); $blue = imagecolorallocate($img, 0, 0, 255); imagefill($img, 0, 0, $green); imagefilledrectangle($img, 10, 10, 40,40, $blue); debug::write($img); $t->checkOutput($expectedOutput);
|
[0.315 ms]
[26.04.2025 10:55:56,485][+67 μs](862k/960k) Debug::write "phpcheck.class.debug.php" Line 250 |
0 | object(GdImage)#8 (0) | 50 x 50 px
|
|
Ok |
debug::write gd with transparent |
255 |
imagecolortransparent($img, $blue); debug::write($img); $t->checkOutput($expectedOutput);
|
[0.251 ms]
[26.04.2025 10:55:56,486][+282 μs](864k/960k) Debug::write "phpcheck.class.debug.php" Line 256 |
0 | object(GdImage)#8 (0) | 50 x 50 px
|
|
Ok |
setImgStyle new background |
260 |
debug::setImgStyle(' max-height:20rem; max-width:20rem; background-image: repeating-linear-gradient(-45deg, white, #88f 6px); '); debug::write($img); $t->checkOutput($expectedOutput);
|
[0.243 ms]
[26.04.2025 10:55:56,486][+254 μs](866k/960k) Debug::write "phpcheck.class.debug.php" Line 265 |
0 | object(GdImage)#8 (0) | 50 x 50 px
|
|
Ok |
debug::write inside function |
269 |
function testFct1($par1,$par2) { debug::write($par1,$par2); } testFct1("abc",78); $t->checkOutput('testFct1(,abc,78');
|
[0.058 ms]
[26.04.2025 10:55:56,486][+249 μs](869k/960k) Debug::write "phpcheck.class.debug.php" Line 270 <= Line 272 testFct1("abc", 78) |
0 | string(3) ASCII | "abc" | 1 | integer | 78 [0000004Eh] |
|
Ok |
debug::write inside object method |
276 |
class testClass1{ private $dateTimeObj; public function __construct(DateTime $par){ debug::write('$par,$this',$par,$this); } } $myclass = new testClass1(new datetime); $t->checkOutput('__construct');
|
[0.059 ms]
[26.04.2025 10:55:56,486][+67 μs](872k/960k) Debug::write "phpcheck.class.debug.php" Line 279 <= Line 282 testClass1 {testClass1} -> __construct(object) |
0 | string(10) ASCII | "$par,$this" | 1 | object(DateTime)#9 (3) | \DateTime::__set_state(array(
'date' => "2025-04-26 10:55:56.486663",
'timezone_type' => 3,
'timezone' => "UTC",
)) | 2 | object(testClass1)#6 (1) | \testClass1::__set_state(array(
'dateTimeObj' => NULL,
)) |
|
Ok |
debug::write inside closure |
286 |
$testFct2 = function ($par1,$par2) { debug::write($par1,$par2); }; $testFct2("text\r\n",95); $t->checkOutput('closure,text,95');
|
[0.025 ms]
[26.04.2025 10:55:56,486][+61 μs](875k/960k) Debug::write "phpcheck.class.debug.php" Line 287 <= Line 289 {closure}("text\r\n", 95) |
0 | string(6) ASCII | "text\r\n" | 1 | integer | 95 [0000005Fh] |
|
Ok |
debug::save |
293 |
debug::save("Save into buffer, Output with next write"); debug::write(); $t->checkOutput('Debug::save,Save into');
|
[0.021 ms]
[26.04.2025 10:55:56,486][+31 μs](877k/960k) Debug::save "phpcheck.class.debug.php" Line 293 |
0 | string(40) ASCII | "Save into buffer, Output with next write" |
[26.04.2025 10:55:56,486][+14 μs](878k/960k) Debug::write "phpcheck.class.debug.php" Line 294 |
|
Ok |
debug::clear |
298 |
debug::save("Save Info, do not know if it is needed"); debug::clear(); // delete all save-infos ! debug::write('First information is not output'); $t->checkOutput('Debug::write,not output');
|
[0.025 ms]
[26.04.2025 10:55:56,486][+13 μs](879k/960k) Debug::write "phpcheck.class.debug.php" Line 300 |
0 | string(31) ASCII | "First information is not output" |
|
Ok |
debug::stop at once |
304 |
try{ debug::stop(true,"Stop at once"); } catch(exception $e){ echo "stop_exception"; } $t->checkOutput('Stop at once,stop_exception');
|
[0.020 ms]
[26.04.2025 10:55:56,486][+18 μs](881k/960k) Debug::stop "phpcheck.class.debug.php" Line 305 |
0 | string(12) ASCII | "Stop at once" |
stop_exception |
Ok |
debug::stop at 4. cycle |
312 |
try{ for($i=1;$i<10;$i++){ debug::stop(4,"Stop at cycle",$i); } } catch(exception $e){ echo "stop_exception at cycle ".$i; } $t->checkOutput('stop_exception at cycle 4');
|
[0.023 ms]
[26.04.2025 10:55:56,486][+29 μs](884k/960k) Debug::stop "phpcheck.class.debug.php" Line 314 |
0 | string(13) ASCII | "Stop at cycle" | 1 | integer | 4 [00000004h] |
stop_exception at cycle 4 |
Ok |
write with red background |
322 |
debug::wrc('important message'); $t->checkOutput('wrc');
|
[0.042 ms]
[26.04.2025 10:55:56,486][+52 μs](886k/960k) Debug::wrc "phpcheck.class.debug.php" Line 322 |
0 | string(17) ASCII | "important message" |
|
Ok |
get debug info as html |
326 |
$result = debug::html('a info'); $t->checkContains($result,'a info');
|
[0.014 ms]
[26.04.2025 10:55:56,486][+20 μs](872k/960k) Debug::html "phpcheck.class.debug.php" Line 326 |
0 | string(6) ASCII | "a info" |
|
Ok |
strhex: |
330 |
$result = debug::strhex("test\r\n"); $t->checkEqual($result, '\x74\x65\x73\x74\x0d\x0a');
|
[0.003 ms] \x74\x65\x73\x74\x0d\x0a |
Ok |
systeminfo |
334 |
debug::systeminfo(); $t->checkOutput();
|
[0.018 ms]
[26.04.2025 10:55:56,486][+30 μs](890k/960k) Debug::write "class.debug.php" Line 396 <="phpcheck.class.debug.php" Line 334 Debug :: systeminfo() |
0 | string(25) ASCII | "Linux PHP 8.2.28 (64Bit) " |
|
Ok |
set and get timestamps |
338 |
debug::setTimestamp(0); debug::microSleep(10000); $result = debug::getTimestampDiff(0); $t->check($result,$result-10000 < 150);
|
[10.0 ms]
10003 |
Ok |
get diff timestamp |
344 |
$result = debug::getTimestampDiff(0); $t->check($result,$result>10000);
|
[0.001 ms]
10013 |
Ok |
debug::switchLog - enable |
348 |
//Simulate extern task to enable output file_put_contents(__DIR__.'/debug.switch',"1"); debug::switchLog(); //refresh Switch debug::write("This information is shown"); $t->checkOutput('Debug::write,This information is shown');
|
[2.083 ms]
[26.04.2025 10:55:56,499][+12 ms](893k/960k) Debug::write "phpcheck.class.debug.php" Line 351 |
0 | string(25) ASCII | "This information is shown" |
|
Ok |
debug::switchLog - disable |
355 |
//Simulate extern task to disable output file_put_contents(__DIR__.'/debug.switch',"0"); debug::switchLog(); debug::write("Info is not shown"); $t->checkOutput('');
|
[1.664 ms]
|
Ok |
debug::switchLog - enable permanent |
362 |
debug::switchLog(true); //enable,ignore extern file debug::write("This information is also shown"); $t->checkOutput('Debug::write,also');
|
[0.030 ms]
[26.04.2025 10:55:56,500][+1724 μs](896k/960k) Debug::write "phpcheck.class.debug.php" Line 363 |
0 | string(30) ASCII | "This information is also shown" |
|
Ok |
debug::log("TMP") - log into tempfile |
367 |
debug::log("TMP"); debug::write('LOGINFO'); $tmpFileName = debug::getLogFileName(); $logContent = file_get_contents($tmpFileName); //read file $testOk = strpos($logContent,"LOGINFO") > 0; $t->check($logContent, $testOk);
|
[2.276 ms]
Debug Log TMP
[26.04.2025 10:55:56,501][+1159 μs](881k/960k) Debug::write "phpcheck.class.debug.php" Line 368 |
0 | string(7) ASCII | "LOGINFO" |
|
Ok |
Delete temp. Logfile |
375 |
debug::deleteLogFile(); $t->check($tmpFileName, !file_exists($tmpFileName));
|
[0.933 ms] log20250426105556_5007.html |
Ok |
Get 32-bit CRC of String, Object, Array |
379 |
$result = debug::crc('abc'); $t->checkEqual($result, '2E5A7DD1');
|
[0.005 ms] 2E5A7DD1 |
Ok |
Get TypeInfo of String Variable |
383 |
$result = debug::TypeInfo('abc'); $t->checkContains($result, 'string,3');
|
[0.008 ms] string(3) ASCII |
Ok |
Get TypeInfo of Class Instance |
387 |
$object = (object)array(1,2); $result = debug::TypeInfo($object); $t->checkContains($result, 'object(stdClass),(2)');
|
[0.005 ms] object(stdClass)#10 (2) |
Ok |
Get TypeInfo of Class implements Countable |
392 |
class counter implements Countable { #[\ReturnTypeWillChange] public function count() { return 17; } } $object = new counter(); $result = debug::TypeInfo($object); $t->checkContains($result, 'object(counter),(17)');
|
[0.009 ms] object(counter)#12 (17) |
Ok |
Get TypeInfo of DOMNodeList |
403 |
$html ='<li>Text1-1</li><li>Text2-2</li>'; $doc = new DOMDocument(); $r = $doc->loadHTML($html); $nodelist = $doc -> getElementsByTagName("li"); $result = debug::TypeInfo($nodelist); $t->checkContains($result, 'object(DOMNodeList),(2)');
|
[0.046 ms] object(DOMNodeList)#13 (2) |
Ok |
strToUnicode |
412 |
$result = debug::strToUnicode('A'); $t->checkEqual($result, 'A');
|
[0.006 ms] A |
Ok |
strToUnicode with " ans space |
416 |
$result = debug::strToUnicode(' !"#A~'); $t->checkEqual($result, '\x20!\x22#A~');
|
[0.007 ms] \x20!\x22#A~ |
Ok |
strToUnicode |
420 |
$result = debug::strToUnicode("ä\x80𑚀€"); $t->checkEqual($result, '\u{e4}\x80\u{11680}\u{20ac}');
|
[0.014 ms] \u{e4}\x80\u{11680}\u{20ac} |
Ok |
strToUnicode contain UTF8-Fragment |
424 |
$string = "ä".substr("€",0,1)."äx"; $result = debug::strToUnicode($string); $t->checkEqual($result, '\u{e4}\xe2\u{e4}x');
|
[0.006 ms] \u{e4}\xe2\u{e4}x |
Ok |
strToUnicode contain UTF8-Fragment |
429 |
$string = "ä".substr("€",0,2)."äY"; $result = debug::strToUnicode($string); $t->checkEqual($result, '\u{e4}\xe2\x82\u{e4}Y');
|
[0.005 ms] \u{e4}\xe2\x82\u{e4}Y |
Ok |
strToUnicode check control chars |
434 |
$result = debug::strToUnicode("\x03\r\n"); $expected = '\x03\x0d\x0a'; $t->checkEqual($result,$expected);
|
[0.003 ms] \x03\x0d\x0a |
Ok |
unicodeToString |
440 |
$code = 'a\x42\u{e4}\u{20ac}'; //not parsed in single quotes $result = debug::unicodeToString($code); $t->checkEqual($result, "aBä€");
|
[0.072 ms] aBä€ |
Ok |
UniDecode |
446 |
$result = debug::UniDecode('U+0041'); $t->checkEqual($result, 'A');
|
[0.022 ms] A |
Ok |
UniDecode 4 Byte UTF |
450 |
$result = debug::UniDecode('U+1F603'); $t->checkEqual($result, '😃');
|
[0.002 ms] 😃 |
Ok |
UniDecode invalid Notation |
454 |
$result = debug::UniDecode('U+1F60X'); $t->checkEqual($result, false);
|
[0.001 ms]
false |
Ok |
detect_encoding ASCII |
459 |
$string = "Ein ASCII String"; $result = debug::detect_encoding($string); $t->checkEqual($result, 'ASCII');
|
[0.003 ms] ASCII |
Ok |
detect_encoding UTF-8 |
464 |
$string = "German ä is a UTF-8 character"; $result = debug::detect_encoding($string); $t->checkEqual($result, 'UTF-8');
|
[0.001 ms] UTF-8 |
Ok |
detect_encoding UTF-8mb3 |
469 |
$string = "€ ist a 3 byte UTF-8 character"; $result = debug::detect_encoding($string); $t->checkEqual($result, 'UTF-8mb3');
|
[0.002 ms] UTF-8mb3 |
Ok |
is header sent |
475 |
$t->checkEqual(debug::isHeaderSent(), false);
|
[0.002 ms]
false |
Ok |
headerInfo() |
478 |
$result = debug::headerInfo(); $t->check($result, is_array($result));
|
[0.005 ms]
array (
'headerSent' => false,
'fileName' => '',
'line' => 0,
'output_buffering' => '',
'bytes output buffer' => false,
'headers' =>
array (
0 => 'X-Powered-By: PHP/8.2.28',
1 => 'Content-Type: text/html; charset=UTF-8',
),
) |
Ok |
detect UTF16LE |
483 |
$str = 'A Teststring with characters € + äöü'; $test = mb_convert_encoding($str, 'UTF-16LE','UTF-8'); $result = debug::detectUTFencoding($test); $t->checkEqual($result, 'UTF-16LE');
|
[0.078 ms] UTF-16LE |
Ok |
detect UTF16LE with BOM |
489 |
$test = "\xff\xfe".mb_convert_encoding($str, 'UTF-16LE','UTF-8'); $result = debug::detectUTFencoding($test); $t->checkEqual($result, 'UTF-16LE_BOM');
|
[0.003 ms] UTF-16LE_BOM |
Ok |
detect UTF16BE |
494 |
$str = 'A Teststring with characters € + äöü'; $test = mb_convert_encoding($str, 'UTF-16BE','UTF-8'); $result = debug::detectUTFencoding($test); $t->checkEqual($result, 'UTF-16BE');
|
[0.007 ms] UTF-16BE |
Ok |
detect UTF16BE with BOM |
500 |
$test = "\xfe\xff".mb_convert_encoding($str, 'UTF-16BE','UTF-8'); $result = debug::detectUTFencoding($test); $t->checkEqual($result, 'UTF-16BE_BOM');
|
[0.002 ms] UTF-16BE_BOM |
Ok |
detect UTF32LE |
505 |
$str = 'A Teststring with characters € + äöü'; $test = mb_convert_encoding($str, 'UTF-32LE','UTF-8'); $result = debug::detectUTFencoding($test); $t->checkEqual($result, 'UTF-32LE');
|
[0.005 ms] UTF-32LE |
Ok |
detect UTF32LE with BOM |
511 |
$test = "\xff\xfe\x00\x00".mb_convert_encoding($str, 'UTF-32LE','UTF-8'); $result = debug::detectUTFencoding($test); $t->checkEqual($result, 'UTF-32LE_BOM');
|
[0.001 ms] UTF-32LE_BOM |
Ok |
detect UTF32BE |
516 |
$str = 'A Teststring with characters € + äöü'; $test = mb_convert_encoding($str, 'UTF-32BE','UTF-8'); $result = debug::detectUTFencoding($test); $t->checkEqual($result, 'UTF-32BE');
|
[0.005 ms] UTF-32BE |
Ok |
detect UTF32BE with BOM |
522 |
$test = "\x00\x00\xfe\xff".mb_convert_encoding($str, 'UTF-32BE','UTF-8'); $result = debug::detectUTFencoding($test); $t->checkEqual($result, 'UTF-32BE_BOM');
|
[0.001 ms] UTF-32BE_BOM |
Ok |
detect UTF8 |
527 |
$str = 'A Teststring with characters € + äöü'; $test = $str; $result = debug::detectUTFencoding($test); $t->checkEqual($result, 'UTF-8');
|
[0.005 ms] UTF-8 |
Ok |
detect UTF8 with BOM |
533 |
$test = "\xef\xbb\xbf".$str; $result = debug::detectUTFencoding($test); $t->checkEqual($result, 'UTF-8_BOM');
|
[0.001 ms] UTF-8_BOM |
Ok |
detect other |
538 |
$str = 'A Teststring with characters € + äöü'; //$test = utf8_decode($str); //deprecated PHP 8.2 $test = mb_convert_encoding($str, 'ISO-8859-1', 'UTF-8'); $result = debug::detectUTFencoding($test); $t->checkEqual($result, 'Other');
|
[0.007 ms] Other |
Ok |