A PHP CLI for printing an emoji roughly corresponding to the current moon phase.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#!/usr/bin/env php
|
|
<?php
|
|
require_once dirname(__FILE__) . '/vendor/autoload.php';
|
|
|
|
$phases = [
|
|
'New Moon' => '🌑',
|
|
'Waxing Crescent' => '🌒',
|
|
'First Quarter' => '🌓',
|
|
'Waxing Gibbous' => '🌔',
|
|
'Full Moon' => '🌕',
|
|
'Waning Gibbous' => '🌖',
|
|
'Third Quarter' => '🌗',
|
|
'Waning Crescent' => '🌘',
|
|
];
|
|
|
|
$moonphase = new Solaris\MoonPhase;
|
|
print $phases [ $moonphase->phase_name() ];
|
|
|
|
# print " " . $moonphase->phase_name();
|