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?>
31--EXPECT--
32# "0"
33int(0)
34
35# "0K"
36int(0)
37
38# "0k"
39int(0)
40
41# "0M"
42int(0)
43
44# "0m"
45int(0)
46
47# "0G"
48int(0)
49
50# "0g"
51int(0)
52
53# "-0"
54int(0)
55
56# "-0K"
57int(0)
58
59# "-0k"
60int(0)
61
62# "-0M"
63int(0)
64
65# "-0m"
66int(0)
67
68# "-0G"
69int(0)
70
71# "-0g"
72int(0)
73