2 Test escapeshellarg() function: basic test
5 if( substr(PHP_OS, 0, 3) == "WIN" )
6 die("skip.. Do not run on Windows");
10 /* Prototype : string escapeshellarg ( string $arg )
11 * Description: Escape a string to be used as a shell argument.
12 * Source code: ext/standard/exec.c
16 echo "Simple testcase for escapeshellarg() function\n";
18 var_dump(escapeshellarg("Mr O'Neil"));
19 var_dump(escapeshellarg("Mr O\'Neil"));
20 var_dump(escapeshellarg("%FILENAME"));
21 var_dump(escapeshellarg(""));
26 Simple testcase for escapeshellarg() function
27 string(14) "'Mr O'\''Neil'"
28 string(15) "'Mr O\'\''Neil'"
29 string(11) "'%FILENAME'"