Coder Social home page Coder Social logo

php-koans's Introduction

PHP-Koans

Learn PHP by fixing failing tests. Designed as a series of successive problems where you type missing pieces of code to learn the basics all the way to advanced concepts with PHP. When you're finished you'll also have an entire library of code samples to reference as well.

Designed to teach the basics of PHP and inspired by the absolutely awesome http://www.rubykoans.com Requires PHP 5.3 or greater.

Prerequisites

  • Install PHP 5.3 or higher and the ability to run the php command from the command line.
  • Install Composer from https://getcomposer.org

Getting Started

  1. Checkout or fork this repository and make sure you're on the master branch.
  2. Open up a terminal run composer install from the checked out project to install dependencies.
  3. Run php koans.php from a terminal and follow the instructions. Re run this command as you solve the problems to see your progress.

Exercises

Chapter 1 - Variables

  1. Declaration - [S]
  2. Integers - [S]
  3. Floats - [S]
  4. Booleans - [S]
  5. Null - [S]
  6. Casting - [S]
  7. Assignment - [S]
  8. Constants - [S]

Chapter 2 - Math

  1. Addition - [S]
  2. Subtraction - [S]
  3. Multiplication - [S]
  4. Division - [S]
  5. Modulus - [S]
  6. Rounding Naturally - [S]
  7. Rounding Up and Down - [S]
  8. Increment and Decrement - [S]

Chapter 3 - Strings

  1. Concatenation - [S]
  2. Substitution - [S]
  3. Replacement - [S]
  4. Length - [S]
  5. Single Characters - [S]
  6. Substrings - [S]
  7. Changing Case - [S]
  8. Searching - [S]

Status

I'm building this out as a side project when I have time so the exercises don't cover all of the concepts they should yet, but everything in the master branch will always be complete. If you get stuck you can also check the solutions branch to see the pieces of missing code to fix the problems.

Feedback

If you found these helpful, spot a bug, or want to help contribute please contact me.

php-koans's People

Contributors

mtoigo avatar phasetwo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.