Skip to content

List of PHP Kata to Update

interrupt-routine edited this page Jul 12, 2025 · 68 revisions

PHP 8.0 with PHPUnit 9.5.2 was added. The kata on this page needs to be updated manually. Any help is appreciated!

Summary of Changes

  • Files are no longer concatenated, but it should work very similarly as before because solution and preloaded files are autoloaded
  • The name of the test class now required to end with Test
  • Solution and Preloaded file should have <?php
    • Runner prepends this if missing for backwards compatibility, but any new code should include it
  • Test file should have <?php use PHPUnit\Framework\TestCase;
    • Runner prepends this if <?php is missing for backwards compatibility, but any new code should include it
  • PHPUnit is updated to 9.5.2 so there are some breaking changes
    • Testing for exceptions: PHPUnit 6 removed support for testing for exceptions with PHPDoc annotations:
     /**
     * @expectedException InvalidArgumentException
     */
     public function testForException()
     {
         functionThatShouldThrow();
     }
    new code should use expectException():
    public function testForException()
    {
        $this->expectException(InvalidArgumentException::class);
        functionThatShouldThrow();
    }

List of Kata

  1. 'Magic' recursion call depth number
  2. Brainfuck Translator
  3. Buddy Pairs
  4. Burrows-Wheeler-Transformation
  5. Buying a car
  6. Car Park Escape
  7. Catalog
  8. Challenge Fun #14: Target Game
  9. Check and Mate?
  10. Ciphers #1 - The 01 Cipher
  11. Color Choice
  12. Connect 4
  13. Count up the points for the 7 Wonders board game! Easy version
  14. Creating a custom PHP stream wrapper
  15. Divide numbers as strings
  16. Domain name validator
  17. Don't rely on luck.
  18. Esolang Interpreters #1 - Introduction to Esolangs and My First Interpreter (MiniStringFuck)
  19. Esolang: InfiniTick
  20. Evaluate mathematical expression
  21. Experimenting with a sequence of complex numbers
  22. Factorial decomposition
  23. Family Gift Exchange / Names Out of a Hat
  24. Fibo akin
  25. Financing Plan on Planet XY140Z-n
  26. Fluent Calculator
  27. Functions of Integers on Cartesian Plane
  28. Generate keywords
  29. Get angle between hour and minute hands
  30. Going to the cinema
  31. Going to zero or to infinity?
  32. Good words
  33. Hofstadter Q
  34. How many dots are covered
  35. How Much?
  36. Human readable duration format
  37. Hungry Hippos
  38. Implement the (Unnormalized) Cardinal Sine
  39. Is my friend cheating?
  40. Is there an arrow missing ? (Relations - Part1: Reflexivity)
  41. John and Ann sign up for Codewars
  42. Largest Palindromic Product
  43. League Player Rank
  44. Linked Lists - Get Nth Node
  45. Linked Lists - Insert Nth Node
  46. List of all Rationals
  47. Make sets
  48. Mirrored Exponential Chunks
  49. Mystery Class
  50. Object-Oriented PHP #1 - Classes, Public Properties and Methods
  51. Object-Oriented PHP #6 - Visibility
  52. One Line Task: Largest Rectangle
  53. Pattern Generator
  54. Pattern Generator (mirrored)
  55. Perimeter of squares in a rectangle
  56. PHP Immutable
  57. PHP in Action #5 - PHPMailer Intro
  58. Pigs in a Pen
  59. Points in the circle
  60. Pokemon Damage Calculator
  61. Positions Average
  62. Product of two squares
  63. Pull your words together, man!
  64. Rectangle into Squares
  65. Reflection in PHP #1 - Introduction
  66. Reflection in PHP #3 - Using Reflection on Classes
  67. Reflection in PHP #4 - Puzzle Challenge [Assessment]
  68. RoboScript #4 - RS3 Patterns to the Rescue
  69. Roman Numerals Decoder
  70. Screen Locking Patterns
  71. Selective memory
  72. Shortest Distance to a Character
  73. Simple assembler interpreter
  74. Simple consecutive pairs
  75. Simplifying multilinear polynomials
  76. Smallest possible sum
  77. Snakes and Ladders
  78. Square Pi's
  79. String Scramble
  80. Sum Mixed Array
  81. Text align justify
  82. Texting with an old-school mobile phone
  83. The Skiponacci Sequence
  84. The Walker
  85. URL building
  86. Wave Sorting
  87. We are Family
  88. Weight for weight

After changing assertEquals with assertSame to avoid this problem some katas failed the automatic change and require manual editing:

  1. A Rule of Divisibility by 7
  2. Area of an arrow
  3. Binary Genetic Algorithms
  4. Brainfuck Translator
  5. Buying a car
  6. Calculate mean and concatenate string
  7. Closest and Smallest
  8. Convert a String to a Number!
  9. Creating a custom PHP stream wrapper
  10. Disease Spread
  11. Driving School Series #2
  12. Easy Cyclist's Training
  13. Easy Line
  14. Euclidean distance in n dimensions
  15. Fibonacci, Tribonacci and friends
  16. Financing Plan on Planet XY140Z-n
  17. Find the Middle of the Product
  18. Find the area of the rectangle!
  19. FizzBuzz++
  20. Fun with lists: filter
  21. Fun with lists: map
  22. Functions of Integers on Cartesian Plane
  23. Heron's formula
  24. How good are you really?
  25. How many dots are covered
  26. League Player Rank
  27. Looking for a benefactor
  28. Molecule to atoms
  29. Mutual Recursion
  30. One Line Task: Largest Rectangle
  31. Ordered Count of Characters
  32. Parse a linked list from a string
  33. Pascal's Triangle
  34. Pattern Generator (mirrored)
  35. Program a Calculator #2 - 3D Vectors
  36. Quarter of the year
  37. Regex Tic Tac Toe Win Checker
  38. Regexp Basics - is it IPv4 address?
  39. Return the closest number multiple of 10
  40. Return the first M multiples of N
  41. Reverse polish notation calculator
  42. Screen Locking Patterns
  43. Send in the Clones
  44. Simple Fun #181: Rounding
  45. Simple Fun #74: Growing Plant
  46. Simple Fun #87: Shuffled Array
  47. Square Pi's
  48. Sum and Length
  49. Sum of Array Averages
  50. Sum of Intervals
  51. Sum of positive
  52. The Walker
  53. Tiny Three-Pass Compiler
  54. Tortoise racing
  55. Wave Sorting
  56. We are Family
  57. simple calculator
Clone this wiki locally