Bug #72574 [Opn]: Non encoded string with IP-address recognized as float by json_decode

From: Date: Mon, 11 Jul 2016 09:31:18 +0000
Subject: Bug #72574 [Opn]: Non encoded string with IP-address recognized as float by json_decode
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-202188@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=72574&edit=1 ID: 72574 User updated by: apuzanoff at gmail dot com Reported by: apuzanoff at gmail dot com Summary: Non encoded string with IP-address recognized as float by json_decode Status: Open Type: Bug Package: JSON related Operating System: deb8u1 PHP Version: 5.6.23 Block user comment: N Private report: N New Comment: P.S. It works on windows php as expected. Empty string and JSON_ERROR_SYNTAX from json_last_error() Previous Comments: ------------------------------------------------------------------------ [2016-07-11 09:27:11] apuzanoff at gmail dot com Description: ------------ --- From manual page: http://www.php.net/function.json-decode --- non encoded string with IP-address recognized as float Test script: --------------- echo json_decode('10.7.11.122'), '<br>'; Expected result: ---------------- empty string with generate error Actual result: -------------- 10.7 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=72574&edit=1

« previous php.bugs (#202188) next »