Be EXTREMELY cautious when using the code majid4466 at gmail dot com provided, or JSON_NUMERIC_CHECK in general.For example, in php 7.4 and 8.1 with precision: 14 and serialize_precision: -1 we get:<?php$array = ['€', 55.6666666666666666, 'http://example.com/some/cool/page', '000337', '55.6666666666666666'];echo $case1 = json_encode($array);echo $case2 = json_encode($array, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES );echo $case3 = json_encode($array, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_NUMERIC_CHECK);["\u20ac",55.666666666666664,"http:\/\/example.com\/some\/cool\/page","000337","55.6666666666666666"]["€",55.666666666666664,"http://example.com/some/cool/page","000337","55.6666666666666666"]["€",55.666666666666664,"http://example.com/some/cool/page",337,55.666666666666664]Also, note that in php 5.x you will probably get some different but equally wrong results as default values may be different and some functions have changed internally as well.