Skip to content

Deprecate zend_atol() / add zend_ini_parse_quantity() #7951

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Jun 17, 2022
Merged
Prev Previous commit
Next Next commit
Add test
  • Loading branch information
arnaud-lb committed Jun 17, 2022
commit 69e6ff46a120a2eeb602e8f22b628ee3d1e64db0
13 changes: 13 additions & 0 deletions Zend/tests/zend_ini_parse_quantity_ini_setting_error.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
--TEST--
Test ini setting with invalid quantity
--EXTENSIONS--
zend_test
--INI--
zend_test.quantity_value=1MB
--FILE--
<?php

var_dump(ini_get("zend_test.quantity_value"));
--EXPECTF--
Warning: Invalid "zend_test.quantity_value" setting. Invalid quantity "1MB": unknown multipler "B", interpreting as "1" for backwards compatibility in %s on line %d
string(3) "1MB"