SEO Forums


Chess, Go & Poker Server









                                          
User   Password   remember   (register)  ?

chr()



La fonction PHP chr() sert à retourner un caractère en spécifiant son code ascii.

Cet article donne une comparaison de la durée de l'exécution de cette fonction avec d'autres fonctions PHP basiques.

Cette fonction s'emploie comme suit en PHP 4 et PHP 5.

Description :  string chr ( int $ascii )


$ascii étant le code ASCII du caractère retourné.

Voici un exemple de l'utilisation de cette fonction :

print chr(200);
// Affiche : È


Considérez la ligne de code suivante :

$chaine = chr(200);

La durée de son exécution est d'environ 0.001 milli-seconde, soit environ 5.7 fois plus longue que celle de la ligne (( $a = 1; )) avec Easy PHP 2.0 - Apache 2.2.3, PHP 5.2 et MySQL 5.0.27 - sur un ordinateur portable équipé d'un processeur Intel Core 2 Duo T5800 cadencé à 2.0 GHz.

Pour plus de détails et des exemples supplémentaires, vous pouvez consulter le manuel PHP.net :

http://www.php.net/manual/fr/function.chr.php

Voir également la fonction ord()



* addcslashes()
* addslashes()
* bin2hex()
* chop()
* chunk_split()
* count_chars()
* crypt()
* ereg()
* eregi()
* eregi_replace()
* ereg_replace()
* explode()
* htmlentities()
* htmlspecialchars()
* html_entity_decode()
* implode()
* join()
* ltrim()
* md5()
* md5_file()
* nl2br()
* rtrim()
* sha1()
* sha1_file()
* split()



Last modification : March 23, 2010










 
 


Make your profile in the social network :

- Create groups, pages and events.
- Promote your website (free backlink).
- Keep in touch with your friends.
- Discover what your friends think about you.
- And many more features soon...

 


Write upside down to your contacts!   In your blog, anywhere...
(works with Facebook, Twitter, MSN, Yahoo, MySpace, Hi5, Bebo, Youtube...)






Tip of the day :

Protect your files on Mega, Uptobox or Mediafire, and promote your website !

You may use this free tool : Protect your links




FICGS is also a Free Internet Correspondence Games Server.

Here you can play Chess, Go & Poker Texas Holdem online for free in rated class tournaments and a unique world championship. Special events (chess 960) and tournaments with money prizes are also organized.

Free Internet Chess & Go Server


Feel free to link to this page and to FICGS chess server :