1--TEST--
2Test escapeshellarg() function: basic test
3--SKIPIF--
4<?php
5if( substr(PHP_OS, 0, 3) != "WIN" )
6  die("skip.. only for 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 */
15
16echo "Simple testcase for escapeshellarg() function\n";
17
18var_dump(escapeshellarg("Mr O'Neil"));
19var_dump(escapeshellarg("Mr O\'Neil"));
20var_dump(escapeshellarg("%FILENAME"));
21var_dump(escapeshellarg("!FILENAME"));
22var_dump(escapeshellarg(""));
23
24echo "Done\n";
25?>
26--EXPECT--
27Simple testcase for escapeshellarg() function
28string(11) ""Mr O'Neil""
29string(12) ""Mr O\'Neil""
30string(11) "" FILENAME""
31string(11) "" FILENAME""
32string(2) """"
33Done
34