Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Porrapat/php_koans

Repository files navigation

PHP Koans

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.

Introduction

🌐 Available Languages

Inspiration Repos

The following repositories inspired this project:


Installing PHP

If you do not have PHP set up, please visit php.net for OS-specific installation instructions.
To run the koans, you need PHP installed.

To verify your installation:

On Unix/Linux/macOS/Windows (from any terminal window):

php -v

Get Started:

Look at config_koans.txt 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
php path_to_enlightenment.php
  1. Setup Koans

img1.png

  1. Config Koans

img2.png

  1. Run Koans

img3.png

  1. Do Koans

img4.png

  1. Review Koans

img5.png

Other Stuff

Author: Porrapat Petchdamrongskul <porrapat.cpe20@gmail.com>
Powered by: GeeGee a.k.a ChatGPT πŸ˜„
Issue Tracker: GitHub Issues
Requirements: PHP 7.4.x or later


Other Command To Run Koans

php artisan test # Laravel-style
php spark test # CodeIgniter 4-style

Tips & Tricks – Watching Koans Automatically

Just 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
  1. Example type ./watcher-Windows.exe

img1.png

  1. The Koans will refresh automatically when edit the files and saved.

img2.png

About Rust Watcher

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

License

License: MIT

About

Learn PHP with PHP Koans (inspired by Ruby Koans)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /