Last active
February 24, 2023 13:38
-
-
Save guanguans/e068d0f1a987e5e25e1187d97aed558b to your computer and use it in GitHub Desktop.
#json #php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// json_decode returns NULL with validated json data, error: "Control character error, possibly incorrectly encoded" | |
json_decode(preg_replace('/[[:cntrl:]]/mu', '', $json), true); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment