Collection of simple php tools.
Yet another simple php csv reader using php's Spl(Temp)FileObject to read from files or strings. I just wanted something more convenient, while still keeping all of the SplFileObject functions at my fingertips.
$csv = MonoCsv::load('../data/test01.csv');
// Skip 2 lines on each loop and do something
while (false !== $row = $csv->skip(2)->next())
{
echo $row[0]."\n";
}
Simple php exec wrapper to execute shell commands (with some limitations) and retrieve the return values.
// Store command output to $os or throw exception on error.
try {
$os = MonoShell::run('uname', 1)->getOut();
} catch (InvalidArgumentException $e) {}