enisshala / pokerhands
get poker hands from a file and return hands from the highest to lowest
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/enisshala/pokerhands
Requires
- php: >=7.1.0
- ext-json: *
Requires (Dev)
- phpunit/phpunit: 4.*
This package is auto-updated.
Last update: 2025-12-29 03:07:12 UTC
README
This PHP package reads poker hands from a file and returns the list of the hands sorted by the rank from highest to lowest.
Install
Via Composer
$ composer require enisshala/pokerhands
Usage
$hands = new enisshala\PokerClass(); echo $hands->sortHands($hands_file);
Testing with CLI
in the root folder of the package there is IndexTest.php, you can run it in terminal with following command
php -r "include 'IndexTest.php'; IndexTest::test('https://pastebin.com/raw/FXneUYCc');"
I used Pastebin for hands and reading from file, some of the hands i used:
https://pastebin.com/raw/FXneUYCc
https://pastebin.com/raw/4xRPSB9j
https://pastebin.com/raw/5Mn3z8m1
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.