https://github.com/alrik11es/cowsayphp
Classic cowsay PHP port
https://github.com/alrik11es/cowsayphp
cowsay php
Last synced: 5 months ago
JSON representation
Classic cowsay PHP port
- Host: GitHub
- URL: https://github.com/alrik11es/cowsayphp
- Owner: alrik11es
- License: mit
- Created: 2015-02-14T13:03:32.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-03-03T19:55:23.000Z (over 8 years ago)
- Last Synced: 2025-04-18T04:57:08.880Z (6 months ago)
- Topics: cowsay, php
- Language: PHP
- Size: 24.4 KB
- Stars: 71
- Watchers: 2
- Forks: 12
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# cowsayphp
[](https://github.com/alrik11es/cowsayphp/releases)
[](LICENSE.md)
[](https://travis-ci.org/alrik11es/cowsayphp)
[](https://scrutinizer-ci.com/g/alrik11es/cowsayphp/code-structure)
[](https://scrutinizer-ci.com/g/alrik11es/cowsayphp)
[](https://packagist.org/packages/alrik11es/cowsayphp)Do you remember classic linux Cowsay? Well this is a port for PHP if you want lovely cows everywhere in your terminal
apps.Now supporting more animals in the farm.
## Install
Via Composer
``` bash
$ composer require alrik11es/cowsayphp
```
Requires PHP >=5.6## Using
``` php
use Cowsayphp\Farm;$cow = Farm::create(\Cowsayphp\Farm\Cow::class);
echo ''.$cow->say("Ohmg I'm a cow!").'';
```The result:
< Ohmg I'm a cow! >
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
### Other animals_\Cowsayphp\Farm\Whale::class_
< hello I'm a whale! >
\
\ ## .
## ## ## ==
## ## ## ## ## ===
/"""""""""""""""""\___/ ===
~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ / ===- ~~~
\______ o __/
\ \ __/
\____\_______/_\Cowsayphp\Farm\Dragon::class_
< Dragon! >
\ / \ //\
\ |\___/| / \// \\
/0 0 \__ / // | \ \
/ / \/_/ // | \ \
@_^_@'/ \/_ // | \ \
//_^_/ \/_ // | \ \
( //) | \/// | \ \
( / /) _|_ / ) // | \ _\
( // /) '/,_ _ _/ ( ; -. | _ _\.-~ .-~~~^-.
(( / / )) ,-{ _ `-.|.-~-. .~ `.
(( // / )) '/\ / ~-. _ .-~ .-~^-. \
(( /// )) `. { } / \ \
(( / )) .----~-.\ \-' .~ \ `. \^-.
///.----..> \ _ -~ `. ^-` ^-_
///-._ _ _ _ _ _ _}^ - - - - ~ ~-- ,.-~
_\Cowsayphp\Farm\Tux::class_
< Tux present! >
\
\
.--.
|o_o |
|:_/ |
// \ \
(| | )
/'\_ _/`\
\___)=(___/
## Deprecated useThis will be deprecated in future versions. But still works.
``` php
use Cowsayphp\Cow;echo '
'.Cow::say("Ohmg I'm a cow!").'';
```## Testing
``` bash
$ ./bin/phpunit
```## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
## Credits
- [Marcos Sigueros Fernández](https://github.com/alrik11es)
- [All Contributors](../../contributors)## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.