I'd like to have a function behaving as mysql_real_escape_string without connecting to database as at times I need to do dry testing without DB connection. mysql_escape_string is deprecated and therefore is undesirable. Some of my findings:
http://www.gamedev.net/community/forums/topic.asp?topic_id=448909
http://w3schools.invisionzone.com/index.php?showtopic=20064
Thank you in advance!