ConFoo Montreal 2026: Call for Papers

Voting

: seven minus one?
(Example: nine)

The Note You're Voting On

hemono at gmail dot com
9 years ago
when json_decode a empty string, PHP7 will trigger an Syntax error:
<?php
json_decode
("");
var_dump(json_last_error(), json_last_error_msg());

// PHP 7
int(4)
string(12) "Syntax error"

// PHP 5
int(0)
string(8) "No error"

<< Back to user notes page

To Top