/hphp/test/zend/good/ext/standard/tests/strings/fprintf_variation_007_64bit.php
http://github.com/facebook/hiphop-php · PHP · 23 lines · 16 code · 5 blank · 2 comment · 2 complexity · 32ca18f956dfbd9519e2c8c37fded43c MD5 · raw file
- <?hh
- <<__EntryPoint>> function main(): void {
- $int_numbers = varray[ 0, 1, -1, 2.7, -2.7, 23333333, -23333333, "1234" ];
- /* creating dumping file */
- $data_file = dirname(__FILE__) . '/fprintf_variation_007_64bit.phpt.txt';
- if (!($fp = fopen($data_file, 'wt')))
- return;
- /* octal type variations */
- fprintf($fp, "\n*** Testing fprintf() for octals ***\n");
- foreach( $int_numbers as $octal_num ) {
- fprintf( $fp, "\n");
- fprintf( $fp, "%o", $octal_num );
- }
- fclose($fp);
- print_r(file_get_contents($data_file));
- echo "\nDone";
- unlink($data_file);
- }