escapeshellarg in PHP

Syntax of escapeshellarg in PHP string escapeshellarg(string argument) Properly escapes argument so it can be used as a safe argument to a shell function. When directly passing user input (such as from forms) to a shell command, you should use this function to escape the data to ensure that the argument isn’t a security risk.

error_reporting in PHP

Syntax of error_reporting in PHP int error_reporting([int level]) Sets the level of errors reported by PHP to level and returns the current level; if level is omitted, the current level of error reporting is returned. The following values are available for the function: E_ERROR Fatal runtime errors (script execution halts)E_WARNING Runtime warningsE_PARSE Compile-time parse errorsE_NOTICE … Read more

each in PHP

Syntax of each in PHP array each(array &array) Creates an array containing the keys and values of the element currently pointed at by the array’s internal pointer. The array contains four elements: elements with the keys 0 and key from the element containing the key of the element, and elements with the keys 1 and … Read more

dirname in PHP

Syntax of dirname in PHP string dirname(string path) Returns the directory component of path. This includes everything up to the filename portion (see basename) and doesn’t include the trailing path separator. Example of dirname in PHP

dir in PHP

Syntax of dir in PHP directory dir(string path[, resource context]) Returns an instance of the directory class initialized to the given path. You can use the read(), rewind(), and close() methods on the object as equivalent to the readdir(), rewinddir(), and closedir() procedural functions. Example of dir in PHP Output of dir