/
vshmidt
/
php
Обзор
Документация
Войти
/
vshmidt
/
php
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
ext/json/tests/json_decode_error.phpt
20 строк
499 B
Tyson Andre
Clean up calls to extension_loaded('json') in tests
28 май 2020, 22:07
28 май 2020, 22:07
32a1ebb
Код
Авторство
О чём код?
--TEST-- Test json_decode() function : error conditions --FILE-- <?php echo "*** Testing json_decode() : error conditions ***\n"; echo "\n-- Testing json_decode() function with depth below 0 --\n"; try { var_dump(json_decode('"abc"', true, -1)); } catch (\ValueError $e) { echo $e->getMessage() . \PHP_EOL; } ?> --EXPECT-- *** Testing json_decode() : error conditions *** -- Testing json_decode() function with depth below 0 -- json_decode(): Argument #3 ($depth) must be greater than 0