php-src/ext/standard/tests/strings/bug21730.phpt
Steph Fox 87fac43ac0 - killed off UEXPECT
- html_translation_table and setlocale tests are no longer relevant
- there are a number of ANSI-encoded files. Is this deliberate?
2008-05-27 10:50:48 +00:00

36 lines
570 B
PHP

--TEST--
Bug #21730 (*scanf "%n" conversion flag gives string instead of integer)
--FILE--
<?php
$foo = "ABC = DEF";
$fmt = "%s = %s %n";
$res_a = array();
/* $res_a[2] is supposed to be a integer value that
* represents the number of characters consumed so far
*/
sscanf($foo, $fmt, $res_a[0], $res_a[1], $res_a[2]);
$res_b = sscanf($foo, $fmt);
var_dump($res_a);
var_dump($res_b);
?>
--EXPECT--
array(3) {
[0]=>
unicode(3) "ABC"
[1]=>
unicode(3) "DEF"
[2]=>
int(9)
}
array(3) {
[0]=>
unicode(3) "ABC"
[1]=>
unicode(3) "DEF"
[2]=>
int(9)
}