Clicking the ‘randomize’ button situated above the reference table generates a new table whereby the function descriptions, function syntaxes, and function return values are randomized. The quiz involves matching the function descriptions, function syntaxes, and function return values to the correct function name. Information relating to the randomization of table cells will be displayed for three seconds, before disappearing.
On a desktop computer, table elements are selected by left-clicking the desired table cell and holding the left click in the mouse down position for one second before releasing the left click. The text inside the table cell will turn red to indicate that the one-second mouse left-click has successfully selected a table cell. To then swap the selected table cell with the target table cell, simply repeat the one-second left mouse-click process on the target cell; the table cells will swap position. To de-select a table cell, simply repeat the one-second left mouse-click process on the original table cell.
To select a table element on a touchscreen device (mobile, tablet), simply touch the desired table cell and maintain the touch for one second before removing your finger from the screen. The text inside the table cell will turn red to indicate that the one-second touch has successfully selected a table cell. To then swap the selected table cell with the target table cell, simply repeat the one-second touch process on the target cell; the table cells will swap position. To de-select a table cell, simply repeat the one-second touch process on the original table cell.
Normal touchscreen scrolling behaviour is exhibited by the cells with a light green background; cells without a light green background will not respond to normal touchscreen scrolling. The table is positioned in such a way that the user can also initiate touchscreen scrolling by swiping to the right or left of the table.
When a row consists of the correct function name, function description, function syntax, and function return value, the background colour of the row will change from ‘transparent’ to ‘khaki’; this provides visual feedback that the row is complete.
Once the entire table is complete, a paragraph of feedback will congratulate the user and provide the following information: date and time of quiz commencement; date and time of quiz completion; and the length of time it took the user to complete the quiz.
VIEWPORT OPTIONS:
An example of the layout designed for mobile phonesAn example of the layout designed for tabletsAn example of the layout designed for desktop computers
PURPOSE:
This webpage serves two purposes:
It provides a reference table for the PHP filesystem functions, with information extracted and condensed from w3schools.com, phptutorial.info and php.net.
It enables users to complete a quiz related to the PHP filesystem functions.
USAGE:
For each filesystem function there are four table cells of information: the function name; the function description; the function syntax; and the function return value. There are three layouts available – ‘mobile‘, ‘tablet‘, and ‘desktop‘.
Click the relevant button below to display the PHP filesystem functions reference table, sized appropriately for the desired viewport. A ‘RANDOMIZE‘ button appears above the reference table once the viewport is selected; clicking this button facilitates the commencement of a quiz.
Click the ‘RANDOMIZE‘ button to randomize the functional descriptions, the functional syntaxes, and the functional return information.
FUNCTION NAME
FUNCTION DESCRIPTION
FUNCTION SYNTAX
FUNCTION RETURN VALUE
parse_ini_file()
[parse_ini_file – Parse a configuration file]
This function loads in [‘parses’] the ini file specified in filename and returns the settings in it in an associative array. The structure of the ini file is the same as that of php.ini.
parse_ini_file(filename, process_sections[optional parameter with a default value of FALSE], scanner_mode[optional parameter with a default value of INI_SCANNER_NORMAL]);
[If process_sections is set to TRUE, a multidimensional array is returned – with section names and settings included. If INI_SCANNER_RAW is specified for the scanner_mode parameter, option values will not be parsed. If INI_SCANNER_TYPED is selected [available as of PHP 5.6.1], boolean, null, and integer types are preserved wherever possible. The string values “true”, “on”, and “yes” are converted to TRUE. “false”, “off”, “no”, and “none” are considered FALSE. “null” is converted to NULL.
All numeric strings are converted to integers if possible.]
parse_ini_file(): the settings are returned as an associative array on success; FALSE on failure. This function can be used to read in your own application’s configuration files. Any ini file values containing non-alphanumeric characters need to be enclosed in double quotes. Entries without an equals sign are ignored.
parse_ini_string()
[parse_ini_string – Parse a configuration string]
This function reads [‘parses’] the settings in ini_string and returns them in an associative array. The structure of ini_string is the same as that of php.ini.
parse_ini_string(ini_string, process_sections[optional parameter with a default value of FALSE], scanner_mode[optional parameter with a default value of INI_SCANNER_NORMAL]);
[The same observations apply for parse_ini_string() as for parse_ini_file() above, regarding the process_sections and scanner_mode parameters.]
parse_ini_string(): the settings are returned as an associative array on success; FALSE on failure.
pathinfo()
[pathinfo – Returns information about a file path]
This function returns information about path – either as an associative array or a string, depending on options. Since this function is locale-aware, the matching locale must be set for it to parse a path containing multibyte characters correctly.
pathinfo(path, options[optional parameter]);
[path represents the path to be parsed. options specifies a particular element to be returned: PATHINFO_DIRNAME; PATHINFO_BASENAME; PATHINFO_EXTENSION; or PATHINFO_FILENAME.
If options is not specified, all available elements are returned.]
pathinfo(): depends upon the options parameter. If options is not specified, an associative array containing the following elements is returned: dirname; basename; extension [if any]; and filename.
popen()
[popen – Opens process file pointer]
This function opens a pipe to a process executed by forking the command given by command.
popen(command, mode);
popen(): returns a file pointer identical to that returned by fopen(), except that it is unidirectional and may only be closed with pclose(). This pointer may be used with fgets(), fgetss(), and fwrite().
The returned file pointer is equal to the STDOUT of the command when mode is ‘r’; when the mode is ‘w’ the returned file pointer is equal to the STDIN of the command. FALSE is returned upon error.
pclose()
[pclose – Closes process file pointer]
This function closes a file pointer to a pipe opened by popen().
pclose(resource_handle);
pclose(): returns the termination status of the process that was run, as an integer. -1 is returned if an error occurs.
readfile()
[readfile – Outputs a file]
This function reads a file and writes it to the output buffer.
readfile(filename, use_include_path[optional parameter with a default value of FALSE], context[optional parameter]);
[Set use_include_path to TRUE if you want to search for filename in the include path too.]
readfile(): returns the number of bytes read from the file on success; FALSE and an error message on failure.
realpath_cache_get()
[realpath_cache_get – Get realpath cache entries]
This function gets the contents of the realpath cache.
realpath_cache_get();
realpath_cache_get(): returns an array of realpath cache entries. The keys are original path entries and the values are arrays of data items, containing the resolved path, expiration date, and other options kept in the cache.
FILL IN FORM AND CLICK SUBMIT TO ADD YOUR STATISTICS TO THE LEADERBOARD:
Forty-year-old father of three wonderful children [William, Seth, and Alyssa]. Works as an Assistant Technical Officer in the Sterile Services Department of Treliske Hospital, Cornwall. Enjoys jogging, web design, learning programming languages, and supporting Arsenal FC. Obtained a BA degree in English from the University of Bolton in 2008, and has continued to gain qualifications in a diverse range of subjects thereafter.