import zend standard tests
[hiphop-php.git] / hphp / test / zend / bad / ext-standard-file / readlink_variation1.php
bloba4edabb02885114e48459129529fb529fd532224
1 <?php
2 /* Prototype: string readlink ( string $path );
3 Description: Returns the target of a symbolic link */
5 /* Testing readlink() with invalid arguments -int, float, bool, NULL, resource */
7 $file_path = dirname(__FILE__);
8 $file_handle = fopen($file_path."/readlink_variation2.tmp", "w");
10 echo "*** Testing Invalid file types ***\n";
11 $filenames = array(
12 /* Invalid filenames */
13 -2.34555,
14 "",
15 TRUE,
16 FALSE,
17 NULL,
18 $file_handle,
20 /* scalars */
21 1234,
25 /* loop through to test each element the above array */
26 foreach( $filenames as $filename ) {
27 var_dump( readlink($filename) );
28 clearstatcache();
30 fclose($file_handle);
32 echo "\n*** Done ***";
33 ?><?php
34 $file_path = dirname(__FILE__);
35 unlink($file_path."/readlink_variation2.tmp");