1--TEST--
2Bug #21730 (*scanf "%n" conversion flag gives string instead of integer)
3--FILE--
4<?php
5$foo = "ABC = DEF";
6$fmt = "%s = %s %n";
7$res_a = array();
8
9/* $res_a[2] is supposed to be a integer value that
10 * represents the number of characters consumed so far
11 */
12sscanf($foo, $fmt, $res_a[0], $res_a[1], $res_a[2]);
13
14$res_b = sscanf($foo, $fmt);
15
16var_dump($res_a);
17var_dump($res_b);
18?>
19--EXPECT--
20array(3) {
21  [0]=>
22  string(3) "ABC"
23  [1]=>
24  string(3) "DEF"
25  [2]=>
26  int(9)
27}
28array(3) {
29  [0]=>
30  string(3) "ABC"
31  [1]=>
32  string(3) "DEF"
33  [2]=>
34  int(9)
35}
36