1--TEST--
2Test fprintf() function (variation - 7)
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_007_64bit.txt';
14if (!($fp = fopen($data_file, 'wt')))
15   return;
16
17/* octal type variations */
18fprintf($fp, "\n*** Testing fprintf() for octals ***\n");
19foreach( $int_numbers as $octal_num ) {
20 fprintf( $fp, "\n");
21 fprintf( $fp, "%o", $octal_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 octals ***
34
350
361
371777777777777777777777
382
391777777777777777777776
40131004725
411777777777777646773053
422322
43Done
44