1--TEST-- 2Test fprintf() function (variation - 6) 3--SKIPIF-- 4<?php 5if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); 6?> 7--FILE-- 8<?php 9 10$int_numbers = array( 0, 1, -1, 2.7, -2.7, 23333333, -23333333, "1234" ); 11 12/* creating dumping file */ 13$data_file = __DIR__ . '/fprintf_variation_006.txt'; 14if (!($fp = fopen($data_file, 'wt'))) 15 return; 16 17/* unsigned int type variation */ 18fprintf($fp, "\n*** Testing fprintf() for unsigned integers ***\n"); 19foreach( $int_numbers as $unsig_num ) { 20 fprintf( $fp, "\n"); 21 fprintf( $fp, "%u", $unsig_num ); 22} 23 24fclose($fp); 25 26print_r(file_get_contents($data_file)); 27echo "\nDone"; 28 29unlink($data_file); 30 31?> 32--EXPECT-- 33*** Testing fprintf() for unsigned integers *** 34 350 361 374294967295 382 394294967294 4023333333 414271633963 421234 43Done 44