PluginProbe
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance / 4.7.0
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance v4.7.0
4.7.0 4.6.1 4.6.0 4.5.5 4.5.4 4.5.3 4.5.2 3.2.20 3.2.21 3.2.22 3.2.3 3.2.5 3.2.6 3.2.7 3.2.9 3.3.0 3.3.1 3.3.2 3.4.0 3.4.1 3.4.2 3.5.0 3.6.0 3.7.0 3.7.1 All 111 releases
wp-optimize / vendor / simplehtmldom / simplehtmldom / docs / Debug / index.md

index.md in WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance 4.7.0, at vendor/simplehtmldom/simplehtmldom/docs/Debug/index.md

27 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 Provides the ability to see debug messages for deprecated functions, malformed documents and parsing issues. Debug messages can be sent to a custom message handler or written to error_log (default).
2
3 ## Example
4
5 ```php
6 <?php
7 include_once 'HtmlDocument.php';
8 include_once 'Debug.php';
9 use simplehtmldom\HtmlDocument;
10 use simplehtmldom\Debug;
11
12 Debug::enable();
13
14 $dom = new HtmlDocument();
15 $dom->load('<html></html>');
16 $dom->root->children(); // This causes a deprecation warning
17
18 Debug::disable();
19 ```
20
21 **Output**
22
23 ```
24 [DEBUG] [/var/www/html/simplehtmldom/Debug.php:30] [/var/www/html/simplehtmldom/test.php:7] "Debug mode has been enabled"
25 [DEBUG] [/var/www/html/simplehtmldom/HtmlNode.php:83] [/var/www/html/simplehtmldom/test.php:11] "simplehtmldom\HtmlNode->children() has been deprecated and will be removed in the next major version of simplehtmldom. Use simplehtmldom\HtmlNode->childNodes() instead."
26 [DEBUG] [/var/www/html/simplehtmldom/Debug.php:38] [/var/www/html/simplehtmldom/test.php:13] "Debug mode has been disabled"
27 ```