News:

Please note these forums are mostly a testing ground for my SMF work and I don't really use them otherwise.

Main Menu

Paste-1259462366:v:use_geshi-1:v:type-php

Started by Guest, Nov 29, 2009, 02:39 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Guest

# description: addslashes() vs. addcslashes()
# times: 200000
# name1: addslashes()
# name2: addcslashes()

$GLOBALS['dummy'] = 'This is a \\ test \'of\' the escaping.';

# ---

$GLOBALS['dummy2'] = addslashes($GLOBALS['dummy']);

# ---

$GLOBALS['dummy2'] = addcslashes($GLOBALS['dummy'], '\'"\\\0');