1--TEST--
2Test parsing of valid 0 quantities
3--EXTENSIONS--
4zend_test
5--FILE--
6<?php
7
8$tests = [
9    '0',
10    '0K',
11    '0k',
12    '0M',
13    '0m',
14    '0G',
15    '0g',
16    '-0',
17    '-0K',
18    '-0k',
19    '-0M',
20    '-0m',
21    '-0G',
22    '-0g',
23];
24
25foreach ($tests as $setting) {
26    printf("# \"%s\"\n", addcslashes($setting, "\0..\37!@\177..\377"));
27    var_dump(zend_test_zend_ini_parse_quantity($setting));
28    print "\n";
29}
30--EXPECT--
31# "0"
32int(0)
33
34# "0K"
35int(0)
36
37# "0k"
38int(0)
39
40# "0M"
41int(0)
42
43# "0m"
44int(0)
45
46# "0G"
47int(0)
48
49# "0g"
50int(0)
51
52# "-0"
53int(0)
54
55# "-0K"
56int(0)
57
58# "-0k"
59int(0)
60
61# "-0M"
62int(0)
63
64# "-0m"
65int(0)
66
67# "-0G"
68int(0)
69
70# "-0g"
71int(0)
72