Manuel PHP

SplFileInfo::__toString

(No version information available, might be only in CVS)

SplFileInfo::__toStringReturns the path to the file as a string

Description

public void SplFileInfo::__toString ( void )

This method will return the file name of the referenced file.

Liste de paramètres

Cette fonction ne contient aucun paramètre.

Valeurs de retour

Returns the path to the file.

Exemples

Exemple #1 SplFileInfo::__toString() example

  1. <?php
  2. $info = new SplFileInfo('foo');  
  3. var_dump($info->__toString());  
  4. echo $info.PHP_EOL;  
  5.  
  6. $info = new SplFileInfo('/usr/bin/php');  
  7. var_dump($info->__toString());  
  8. echo $info.PHP_EOL;  
  9. ?> 

L'exemple ci-dessus va afficher quelque chose de similaire à :

string(3) "foo" foo string(12) "/usr/bin/php" /usr/bin/php


Remonter Remonter
L'éditeur javascript - CSS - Gentoo - Tutoriaux PHP - Tutoriels PHP - Bretagne - php - Moto - Kit graphique