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
realpath_cache_size()
[realpath_cache_size – Get realpath cache size]
This function gets the amount [‘size’] of memory used by the realpath cache.
realpath_cache_size();
realpath_cache_size(): returns the amount of memory realpath cache is using.
This function expands all symbolic links and resolves references to /./,/../ and extra / characters in the input path and returns the canonicalized absolute pathname [‘realpath’]. For case-insensitive filesystems, realpath() might or might not normalize the character case. realpath() will not work on a file that is inside a Phar as such a path would be a virtual one NOT a real one.
realpath(path);
[If an empty string is passed as the path parameter, the value is interpreted as the current directory.]
realpath(): returns the canonicalized absolute pathname on success; FALSE on failure. The resulting path will have no symbolic link, /./ or /../ components; trailing delimiters – such as \ and / – are also removed. The running script must have execute permissions on all directories in the hierarchy, otherwise FALSE will be returned.
readlink()
[readlink – Returns the target of a symbolic link]
This function does the same as the readlinkC function.
readlink(path);
readlink(): returns the contents of the symbolic link path on success; FALSE on error.
rename()
[rename – Renames a file or directory]
This function attempts to renameoldname to newname, moving it between directories if necessary. If newname exists when renaming a file, it will be overwritten. If newname exists when renaming a directory, a warning will be emitted. The wrapper used in oldname MUST match the wrapper used in newname.
rename(): returns TRUE on success; FALSE on failure.
rewind()
[rewind – Rewind the position of a file pointer]
This function sets the file position indicator for handle to the beginning of the file stream [thus, it ‘rewinds’ the file position indicator]. Any data written to a file that was opened in append mode [‘a’, ‘a+’] will always be appended to the file, regardless of the file position indicator.
rewind(handle);
rewind(): returns TRUE on success; FALSE on failure.
rmdir()
[rmdir – Removes directory]
This function attempts to remove the directory named by dirname. The relevant permissions must permit this, and dirname must be empty.
rmdir(dirname, context[optional parameter]);
rmdir(): returns TRUE on success; FALSE and an E_WARNING on failure.
stream_set_write_buffer()
[stream_set_write_buffer – Sets write file buffering on the local stream]
This function – an alias of set_file_buffer() – sets the buffering for write operations on the given stream to buffer bytes.
stream_set_write_buffer(stream, buffer);
[stream represents the file pointer. buffer represents the number of bytes to buffer; if 0 then write operations are unbuffered – this ensures that all writes with fwrite() are completed before other processes are allowed to write to that stream.]
stream_set_write_buffer(): returns 0 on success; another value if the request cannot be honoured.
Father of three wonderful children [William, Seth, and Alyssa]. Works as an Instrument Manager 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.
Leave a Reply