This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
// Determine which command has been called. | |
$cmd = (!empty($argv[1])) ? strtolower($argv[1]) : null; | |
// If an invalid number of arguments has been passed (or if no argument | |
// was given at all), display help information. | |
if ($argc < 2 || $argc > 3 || !in_array($cmd, ['save', 'load'])) { |