1--TEST--
2Test fprintf() function (variation - 5)
3--FILE--
4<?php
5
6$int_numbers = array( 0, 1, -1, 2.7, -2.7, 23333333, -23333333, "1234" );
7
8/* creating dumping file */
9$data_file = __DIR__ . '/fprintf_variation_005.txt';
10if (!($fp = fopen($data_file, 'wt')))
11   return;
12
13/* %e type variations */
14fprintf($fp, "\n*** Testing fprintf() for scientific type ***\n");
15foreach( $int_numbers as $num ) {
16  fprintf( $fp, "\n");
17  fprintf( $fp, "%e", $num );
18}
19
20fclose($fp);
21
22print_r(file_get_contents($data_file));
23echo "\nDone";
24
25unlink($data_file);
26
27?>
28--EXPECT--
29*** Testing fprintf() for scientific type ***
30
310.000000e+0
321.000000e+0
33-1.000000e+0
342.700000e+0
35-2.700000e+0
362.333333e+7
37-2.333333e+7
381.234000e+3
39Done
40