1--TEST--
2Test fprintf() function (variation - 6)
3--SKIPIF--
4<?php
5if (PHP_INT_SIZE != 8) die("skip this test is for 64bit 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_64bit.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
3718446744073709551615
382
3918446744073709551614
4023333333
4118446744073686218283
421234
43Done
44