PluginProbe ʕ •ᴥ•ʔ
FAPI Member / trunk
FAPI Member vtrunk
2.2.33 2.2.32 trunk 1.9.47 2.1.18 2.2.24 2.2.25 2.2.26 2.2.28 2.2.29 2.2.30 2.2.31
fapi-member / src / Utils / Debugger.php
fapi-member / src / Utils Last commit date
AlertProvider.php 1 year ago ApiClient.php 1 day ago DateTimeHelper.php 1 year ago DateTimes.php 2 years ago DateTimesImmutable.php 2 years ago Debugger.php 1 year ago DisplayHelper.php 1 year ago EmailHelper.php 1 year ago PostTypeHelper.php 2 years ago Random.php 4 years ago SecurityValidator.php 2 years ago ShortcodeSubstitutor.php 2 months ago TemplateProvider.php 2 years ago functions.php 3 years ago
Debugger.php
21 lines
1 <?php declare(strict_types=1);
2
3 namespace FapiMember\Utils;
4
5 final class Debugger
6 {
7 public static function consoleLog(mixed $data): void
8 {
9 $json = json_encode($data);
10
11 if ($json === false) {
12 $json = 'JSON encoding error: ' . json_last_error_msg();
13 }
14
15 echo "<script>
16 console.log(" . $json . ")
17 </script>";
18 }
19
20 }
21