Summersleeps's User Defined PHP Functions 0.2 Testing:
A while back I started a project called Generic PHP Interface, to save me work, by creating a generic interface I could use for many of the tools I make for Linux. On a similar note I've started this project, which is a collection of PHP functions I've made. PHP allows the creation of user defined functions, and that's what these are. By creating generic functions to use in my tools, I can make it easier to use the same code multiple times within a project, as well as across other projects. And of course you can too. This project is opensource, published under the Comprehensible Open License, a copy of which is included in the download.
Each function has comments in the code to explain which arguments need be passed, listing dependencies, etc. Aside from that the project doesn't include any instructions. Some functions may depend only on PHP itself, some may depend on other functions from the collection, and some may depend on additional programs (how you install these will vary by distro). It also specifies which OS the function was built and tested on, typically Lubuntu 16.04 AMD64.
To use a function, include the PHP file for that function into your project's PHP file, and then execute the function the same as you would any normal PHP function (eg: function();).
- sudpf1483400000 = Recursively find all files in a directory, and output the results to a file.
- sudpf1483400001 = Recursively find all directories in a directory, and output the results to a file.
- sudpf1483400902 = Extract specified files from a zip archive, retaining paths.
- sudpf1483400906 = Create a zip archive from specified files, retaining paths.
- sudpf1483400907 = Create a zip archive from specified files, ignoring paths.
- sudpf1483401030 = Output an error message.
- SHA-512: 4708fa743a47ebc76e5531b56811265a1eab99a1c58b17f2b532e549dcfb37fb732da779c5bc0825dc2d7266cca11213a8fa26d7c885764fb686569f48359915