Skip to content

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.

🌐 Available Languages

Inspiration Repos

The following repositories inspired this project:


Installing PHP

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:

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

php -v
composer --version

Get Started:

Look 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
  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 and Composer (any recent version)


Other Command To Run Koans

composer test       # modern PHP style
php artisan test    # Laravel-style
php spark test      # CodeIgniter 4-style

Tips & Tricks – Watching Koans Automatically

You have to install chokidar, if you have Node.js installed.

node -v                         # make sure Node.js has installed.
npm install -g chokidar-cli     # install chokidar-cli
composer watch                  # run command

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

Languages