1--TEST-- 2Test sscanf() function : basic functionality - unsigned format 3--SKIPIF-- 4<?php 5if (PHP_INT_SIZE != 4) { 6 die("skip this test is for 32bit platform only"); 7} 8?> 9--FILE-- 10<?php 11 12echo "*** Testing sscanf() : basic functionality - using unsigned format ***\n"; 13 14$str = "-11 +11 11 -11.234 +11.234 11.234"; 15$format = "%u %u %u %u %u %u"; 16 17echo "\n-- Try sccanf() WITHOUT optional args --\n"; 18// extract details using short format 19list($arg1, $arg2, $arg3, $arg4, $arg5, $arg6) = sscanf($str, $format); 20var_dump($arg1, $arg2, $arg3, $arg4, $arg5, $arg6); 21 22echo "\n-- Try sccanf() WITH optional args --\n"; 23// extract details using long format 24$res = sscanf($str, $format, $arg1, $arg2, $arg3, $arg4, $arg5, $arg6); 25var_dump($res, $arg1, $arg2, $arg3, $arg4, $arg5, $arg6); 26 27?> 28--EXPECT-- 29*** Testing sscanf() : basic functionality - using unsigned format *** 30 31-- Try sccanf() WITHOUT optional args -- 32string(10) "4294967285" 33int(11) 34int(11) 35string(10) "4294967285" 36NULL 37NULL 38 39-- Try sccanf() WITH optional args -- 40int(4) 41string(10) "4294967285" 42int(11) 43int(11) 44string(10) "4294967285" 45NULL 46NULL 47