Updates to Tomato RAF including NGINX && PHP
[tomato.git] / release / src / router / php / ext / standard / tests / general_functions / escapeshellarg_basic.phpt
blobc26915c923b117705ece4ccebd12b6473d9fa84e
1 --TEST--
2 Test escapeshellarg() function: basic test
3 --SKIPIF--
4 <?php
5 if( substr(PHP_OS, 0, 3) == "WIN" )
6   die("skip.. Do not run on Windows");
7 ?>
8 --FILE--
9 <?php
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
13  * Alias to functions: 
14  */
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(""));
23 echo "Done\n";
25 --EXPECT--
26 Simple testcase for escapeshellarg() function
27 string(14) "'Mr O'\''Neil'"
28 string(15) "'Mr O\'\''Neil'"
29 string(11) "'%FILENAME'"
30 string(2) "''"
31 Done