1--TEST-- 2Test escapeshellarg() function: basic test 3--SKIPIF-- 4<?php 5if( 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 */ 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("")); 22 23echo "Done\n"; 24?> 25--EXPECT-- 26Simple testcase for escapeshellarg() function 27string(14) "'Mr O'\''Neil'" 28string(15) "'Mr O\'\''Neil'" 29string(11) "'%FILENAME'" 30string(2) "''" 31Done