1--TEST--
2mysql_escape_string()
3--SKIPIF--
4<?php require_once('skipif.inc'); ?>
5--FILE--
6<?php
7include "connect.inc";
8
9$tmp    = NULL;
10$link   = NULL;
11
12if (NULL !== ($tmp = @mysql_escape_string()))
13	printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
14
15var_dump(@mysql_escape_string("Am I a unicode string in PHP 6?"));
16var_dump(@mysql_escape_string('\\'));
17var_dump(@mysql_escape_string('"'));
18var_dump(@mysql_escape_string("'"));
19var_dump(@mysql_escape_string("\n"));
20var_dump(@mysql_escape_string("\r"));
21var_dump(@mysql_escape_string("foo" . chr(0) . "bar"));
22
23print "done!";
24?>
25--EXPECTF--
26%unicode|string%(31) "Am I a unicode string in PHP 6?"
27%unicode|string%(2) "\\"
28%unicode|string%(2) "\""
29%unicode|string%(2) "\'"
30%unicode|string%(2) "\n"
31%unicode|string%(2) "\r"
32%unicode|string%(8) "foo\0bar"
33done!
34