REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 887 B
Close
/home/nshryvcy/himaltourism.com/wp-content/plugins/mailpoet/lib/Automation/Engine/Utils/Json.php
Text
Base64
<?php declare(strict_types = 1); namespace MailPoet\Automation\Engine\Utils; if (!defined('ABSPATH')) exit; use MailPoet\Automation\Engine\Exceptions; use MailPoet\Automation\Engine\Exceptions\InvalidStateException; class Json { public static function encode(array $value): string { $json = json_encode($value, JSON_UNESCAPED_SLASHES | JSON_PRESERVE_ZERO_FRACTION); $error = json_last_error(); if ($error || $json === false) { throw new InvalidStateException(json_last_error_msg(), (string)$error); } return $json; } public static function decode(string $json): array { $value = json_decode($json, true); $error = json_last_error(); if ($error) { throw new InvalidStateException(json_last_error_msg(), (string)$error); } if (!is_array($value)) { throw Exceptions::jsonNotObject($json); } return $value; } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 2
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
index.php
0 B
lrw-r--r--
2023-04-04 05:35:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Json.php
887 B
lrw-r--r--
2023-04-04 05:35:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).