The PHP Koans walk you along the path to enlightenment in order to learn PHP.
The goal is to learn the PHP language, syntax, structure, and some common functions and libraries.
We also teach you culture by basing the koans on tests.
Testing is not just something we pay lip service to, but something we live.
Testing is essential in your quest to learn and do great things in PHP.
This project is inspired by Ruby Koans.
The following repositories inspired this project:
- Ruby Koans
- Python Koans
- PHP Koans (by Akoebbe)
- PHP Koans (by IvanSolaDelgado)
- Rustlings
- Rust Koans (by crazymykl)
If you do not have PHP and Composer set up, please visit php.net for OS-specific installation instructions.
To run the koans, you need PHP and Composer installed.
To verify your installation:
php -v
composer --versionLook at phpunit.xml and then uncomment each test. You can start from AboutAsserts. These images below shows how to do it.
git clone https://github.com/Porrapat/php_koans.git
cd php_koans
composer install
php path_to_enlightenment.php- Setup Koans
- Config Koans
- Run Koans
- Do Koans
- Review Koans
Author: Porrapat Petchdamrongskul <[email protected]>
Powered by: GeeGee a.k.a ChatGPT 😄
Issue Tracker: GitHub Issues
Requirements: PHP 7.4.x or later and Composer (any recent version)
composer test # modern PHP style
php artisan test # Laravel-style
php spark test # CodeIgniter 4-styleJust run this command, it will use Rust built binary to watch /koans /KoansLib /koansSolution path_to_enlightenment.php and config_koans.txt
./watcher-Windows.exe # For Windows
./watcher-macOS # For macOS
./watcher-Linux # For Linux- Example type ./watcher-Windows.exe
- The Koans will refresh automatically when edit the files and saved.
I found that Rust is good for write this watcher task. You must install Rust compiler. You can run it by
cd php_koan_watcher_rust
cargo run






