SEO Forums


Chess, Go & Poker Server









                                          
User   Password   remember   (register)  ?

addslashes()



La fonction PHP addslashes() a pour but d'ajouter des "antislash" dans une chaine de caractères.

Cet article se donne pour but de comparer la durée de l'exécution de cette fonction afin d'optimiser vos programmes PHP.

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

Description :  string addslashes ( string $str )


$str étant la chaine dans laquelle vous voulez rajouter des antislash.

Un exemple de l'utilisation de cette fonction :

echo addslashes("c'est un exemple");
// Affiche :  c'est un exemple (avec antislash)


Considérez la ligne de code suivante :

$chaine = addslashes("c'est un exemple");

La durée de son exécution est d'environ 0.00375 milli-seconde, soit 21.6 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.addslashes.php

Voir également la fonction addcslashes()



* addcslashes()
* bin2hex()
* chop()
* chr()
* 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 20, 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 :

Promote your website & protect your Uptobox, Mega or Mediafire links !

Here is the simplest 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 :