Skip to content

List of PHP Kata to Update to PHP 7.4

Steffan153 edited this page Apr 23, 2020 · 10 revisions

PHP 7.4 with PHPUnit 9 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
    • Runner detects the appropriate file name to be loaded with psr-4 convention.
    • If the file does not declare a class, it's written to _solution.php or _preloaded.php which is 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.1 so there are some breaking changes

List of Kata

  1. Alphabet war
  2. Backwards Read Primes
  3. Balanced Number (Special Numbers Series #1 )
  4. Ball and Cups
  5. Ball Upwards
  6. Banker's Plan
  7. Basic Mathematical Operations
  8. Basic variable assignment
  9. Basics 08: Find next higher number with same Bits (1's)
  10. Battle of the characters (Easy)
  11. Beginner - Lost Without a Map
  12. Best travel
  13. Bin to Decimal
  14. Binary multiple of 3
  15. Bit Counting
  16. Bits Battle
  17. Bleatrix Trotter (The Counting Sheep)
  18. Bouncing Balls
  19. Brainfuck Translator
  20. Braking well
  21. Breaking chocolate problem
  22. Brick pyramid.
  23. Buddy Pairs
  24. Build a Directory
  25. Build a pile of Cubes
  26. Build a square
  27. Bumps in the Road
  28. Buying a car
  29. By 3, or not by 3? That is the question . . .
  30. Caesar Cipher Helper
  31. Calculate Price Excluding VAT
  32. Calculate the area of a regular n sides polygon inside a circle of radius r
  33. Calculate the stars
  34. Car Park Escape
  35. Car Wars
  36. Cartesian neighbors
  37. Catalog
  38. Century From Year
  39. Challenge Fun #14: Target Game
  40. Champernowne's Championship
  41. Check three and two
  42. Ciphers #1 - The 01 Cipher
  43. Circularly Sorted Array
  44. Classic Hello World
  45. Closest and Smallest
  46. Closest elevator
  47. Coding with Squared Strings
  48. Color Choice
  49. Common Denominators
  50. Compare Strings by Sum of Chars
  51. Composing squared strings
  52. Computer problem series #1: Fill the Hard Disk Drive
  53. Connect 4
  54. Connect Four
  55. Consecutive k-Primes
  56. Consecutive strings
  57. Consonant value
  58. Convert a Number to a String!
  59. Convert a String to a Number!
  60. Convert an array of strings to array of numbers
  61. Convert boolean values to strings 'Yes' or 'No'.
  62. Convert string to camel case
  63. Coordinates Validator
  64. Correct the date-string
  65. Correct the mistakes of the character recognition software
  66. Correct the time-string
  67. Count by X
  68. Count Odd Numbers below n
  69. Count of positives / sum of negatives
  70. Count the Digit
  71. Count the divisors of a number
  72. Count the Monkeys!
  73. Count the smiley faces!
  74. Count up the points for the 7 Wonders board game! Easy version
  75. Counting Duplicates
  76. Counting like a kid.
  77. Create Phone Number
  78. Creating a custom PHP stream wrapper
  79. Cryptography #1 - Viva Cesare
  80. Currying vs. Partial Application
  81. Cut array into smaller parts
  82. d To Capital
  83. Dashatize it
  84. Debug the functions EASY
  85. Decimal to Factorial and Back
  86. Decipher this!
  87. Decode the Morse code
  88. Deodorant Evaporator
  89. Descending Order
  90. Detect Pangram
  91. Determine if the poker hand is flush
  92. Determine offspring sex based on genes XX and XY chromosomes
  93. Difference of Volumes of Cuboids
  94. Diophantine Equation
  95. Directions Reduction
  96. Disarium Number (Special Numbers Series #3)
  97. Disease Spread
  98. Disguised sequences (II)
  99. Divide numbers as strings
  100. DNA to RNA Conversion
  101. Do I get a bonus?
  102. Domain name validator
  103. Don't rely on luck.
  104. Double Trouble
  105. Draw a Circle.
  106. draw me a chessboard
  107. Drawing a cube
  108. Driving Licence
  109. Drying Potatoes
  110. Duplicate Encoder
  111. Ease the StockBroker
  112. Easy Balance Checking
  113. Easy Cyclist's Training
  114. Easy Diagonal
  115. Easy Line
  116. Easy wallpaper
  117. EGG SHARING
  118. Emily's Eccentric Encoding
  119. Equal Sides Of An Array
  120. Errors : histogram
  121. Esolang Interpreters #1 - Introduction to Esolangs and My First Interpreter (MiniStringFuck)
  122. Esolang: InfiniTick
  123. esreveR
  124. Euler's method for a first-order ODE
  125. Evaluate mathematical expression
  126. Exes and Ohs
  127. Experimenting with a sequence of complex numbers
  128. Expressions Matter
  129. Extra Perfect Numbers (Special Numbers Series #7)
  130. extract file name
  131. Factorial decomposition
  132. Factorial tail
  133. Family Gift Exchange / Names Out of a Hat
  134. Faro Shuffle Count
  135. Fibo akin
  136. File Path Operations
  137. Filter out the geese
  138. Filter valid romans
  139. Financing a purchase
  140. Financing Plan on Planet XY140Z-n
  141. Find all pairs
  142. Find Duplicates
  143. Find Grid Position
  144. Find how many times did a team from a given country win the Champions League?
  145. Find numbers which are divisible by given number
  146. Find out whether the shape is a cube
  147. Find the Difference in Age between Oldest and Youngest Family Members
  148. Find the K-th last element of a singly linked list
  149. Find the Middle of the Product
  150. Find the missing term in an Arithmetic Progression
  151. Find the odd int
  152. Find The Parity Outlier
  153. Find the Remainder
  154. Find the smallest
  155. Find the smallest integer in the array
  156. Find the stray number
  157. Find twins
  158. First Variation on Caesar Cipher
  159. Fix string case
  160. FIXME: Get Full Name
  161. FizzBuzz++
  162. Flatten and sort an array
  163. Floating-point Approximation (I)
  164. Floating-point Approximation (II)
  165. Floating-point Approximation (III)
  166. Fluent Calculator
  167. Follow that Spy
  168. Form The Largest
  169. Form The Minimum
  170. Formatting decimal places #0
  171. Friday the 13th Part 1
  172. Fruit Machine
  173. Function 1 - hello world
  174. Function 3 - multiplying two numbers
  175. Functions of Integers on Cartesian Plane
  176. Gap in Primes
  177. Generate keywords
  178. Genetic Algorithm Series - #5 Roulette wheel selection
  179. Get angle between hour and minute hands
  180. get character from ASCII Value
  181. Get Nth Even Number
  182. Get Password from grid
  183. Get the Middle Character
  184. Getting along with Integer Partitions
  185. Going to the cinema
  186. Going to zero or to infinity?
  187. Good words
  188. Grasshopper - Check for factor
  189. Grasshopper - Grade book
  190. Grasshopper - If/else syntax debug
  191. Grasshopper - Messi goals function
  192. Grasshopper - Terminal game combat function
  193. Grasshopper - Terminal game move function
  194. Grouped by commas
  195. Growth of a Population
  196. Guess the list pattern #1
  197. Guess the list pattern #2
  198. Help the bookseller !
  199. Help the Fruit Guy
  200. Help your granny!
  201. Hero's root
  202. Heron's formula
  203. Hidden "Cubic" numbers
  204. Highest and Lowest
  205. Highest Scoring Word
  206. Hofstadter Q
  207. Holiday II - Plane Seating
  208. How good are you really?
  209. How Green Is My Valley?
  210. How many arguments
  211. How many cows do you have?
  212. How many dots are covered
  213. How many e-mails we sent today?
  214. How many lightsabers do you own?
  215. How many stairs will Suzuki climb in 20 years?
  216. How many times does it contain?
  217. How many urinals are free?
  218. How Much?
  219. Human readable duration format
  220. Hungry Hippos
  221. If you can read this...
  222. If you can't beat 'em, join 'em!
  223. If you can't sleep, just count sheep!!
  224. Implement the (Unnormalized) Cardinal Sine
  225. Incrementer
  226. Integers: Recreation One
  227. Integers: Recreation Two
  228. IP Validation
  229. IPv4 Network and Broadcast Addresses
  230. Irreducible Sum of Rationals
  231. Is my friend cheating?
  232. Is a point inside an random area...
  233. Is he gonna survive?
  234. Is it Integer?
  235. Is that a real phone number? (British version)
  236. Is the string uppercase?
  237. Is there a vowel in there?
  238. Is there an arrow missing ? (Relations - Part1: Reflexivity)
  239. Is this my tail?
  240. Is your period late?
  241. Isograms
  242. Jaden Casing Strings
  243. Jenny the youngest detective
  244. Jenny's secret message
  245. John and Ann sign up for Codewars
  246. Jumping Number (Special Numbers Series #4)
  247. k-Primes
  248. Kebabize
  249. Killer Garage Door
  250. Kooka-Counter
  251. L1: Set Alarm
  252. Land perimeter
  253. Langton's ant
  254. Largest Palindromic Product
  255. Lario and Muigi Pipe Problem
  256. League Player Rank
  257. Leap Years
  258. Length of missing array
  259. Linked Lists - Append
  260. Linked Lists - Get Nth Node
  261. Linked Lists - Insert Nth Node
  262. Linked Lists - Push & BuildOneTwoThree
  263. Linux history and ! command. Series#1 The !! command
  264. List of all Rationals
  265. Looking for a benefactor
  266. Loose Change!
  267. Lost number in number sequence
  268. Lucky Bus Ticket
  269. Lunar Bombing Run
  270. MAC Address : Regexp
  271. Magnet particules in boxes
  272. Make sets
  273. Make the Deadfish swim
  274. Manage the Robot Factory: Day 1
  275. Matching And Substituting
  276. Maximum Gap (Array Series #4)
  277. Maximum Length Difference
  278. Maximum Multiple
  279. Maximum Product
  280. Maximum Triplet Sum (Array Series #7)
  281. Maze Runner
  282. Meeting
  283. Mexican Wave
  284. Minimize Sum Of Array (Array Series #1)
  285. Minimum Steps (Array Series #6)
  286. MinMinMax
  287. Mirrored Exponential Chunks
  288. MOBA game rage simulator
  289. MOD 256 without the MOD operator
  290. Moduli number system
  291. Morse Code (translate text to and from morse code)
  292. Moves in squared strings (I)
  293. Moves in squared strings (II)
  294. Moves in squared strings (III)
  295. Moves in squared strings (IV)
  296. MTV Cribs
  297. Multiples of 3 or 5
  298. Multiply
  299. Mumbling
  300. Mutual Recursion
  301. My head is at the wrong end!
  302. Mystery Class
  303. New Cashier Does Not Know About Space or Shift
  304. Nice Array
  305. Not very secure
  306. Now that's a crib!
  307. nth Floyd line
  308. Nth Smallest Element (Array Series #4)
  309. Number of diagonals
  310. Number of People in the Bus
  311. Numbers in strings
  312. Numbers to Letters
  313. Numbers with this digit inside
  314. Object-Oriented PHP #1 - Classes, Public Properties and Methods
  315. Object-Oriented PHP #10 - Objects on the Fly [Advanced]
  316. Object-Oriented PHP #6 - Visibility
  317. Object-Oriented PHP #8 - Interfaces [Advanced]
  318. Odd Ones Out!
  319. Offload your work!
  320. One Line Task: Largest Rectangle
  321. Ones and Zeros
  322. Opposites Attract
  323. Ordered Count of Characters
  324. Pairs of integers from m to n
  325. Palindrome Strings
  326. Parabolic Arc Length
  327. Parse nice int from char problem
  328. Parts of a list
  329. Pattern Generator
  330. Pattern Generator (mirrored)
  331. People’s Travel Sorter (simplified)
  332. Perimeter of squares in a rectangle
  333. Phone Directory
  334. PHP Functions - Anonymous Functions (aka Closures)
  335. PHP Functions - Return Type Declarations
  336. PHP Functions - Type Declarations
  337. PHP Immutable
  338. PHP in Action #5 - PHPMailer Intro
  339. PI approximation
  340. Pie Chart
  341. Pigs in a Pen
  342. Pillars
  343. Playing on a chessboard
  344. Playing with digits
  345. Playing with passphrases
  346. Plenty of Fish in the Pond
  347. Points in the circle
  348. Pokemon Damage Calculator
  349. Pokerhand, straight or not?
  350. Pong! [Basics]
  351. Positions Average
  352. Predict your age!
  353. Primes in numbers
  354. Primorial Of a Number
  355. Principal Diagonal | VS | Secondary Diagonal
  356. Printer Errors
  357. Prize Draw
  358. Product Array (Array Series #5)
  359. Product of Adjacent Grid Numbers
  360. Product of consecutive Fib numbers
  361. Product Of Maximums Of Array (Array Series #2)
  362. Product of two squares
  363. Pull your words together, man!
  364. Pyramid Array
  365. Quarter of the year
  366. Rainfall
  367. Ranking NBA teams
  368. Ranking position
  369. Rectangle into Squares
  370. Reducing by steps
  371. Reflection in PHP #3 - Using Reflection on Classes
  372. Reflection in PHP #4 - Puzzle Challenge [Assessment]
  373. Regexp Basics - is it IPv4 address?
  374. Regular Expression - Check if divisible by 0b111 (7)
  375. Regular expression for binary numbers divisible by 5
  376. Remove anchor from URL
  377. Remove duplicate words
  378. Remove exclamation marks
  379. Remove the time
  380. Removing Elements
  381. Return Negative
  382. Returning Strings
  383. Reverse every other word in the string
  384. Reverse or rotate?
  385. Reverse words
  386. Reverse words of a big string
  387. Reversed sequence
  388. Reversed Strings
  389. Reversed Words
  390. RGB To Hex Conversion
  391. RoboScript #4 - RS3 Patterns to the Rescue
  392. Rock Paper Scissors!
  393. Roman Numerals Decoder
  394. Roman Numerals Encoder
  395. Rotate for a Max
  396. Round To Nearest
  397. Row Weights
  398. Salesman's Travel
  399. Same Array?
  400. Scaling Squared Strings
  401. Scrolling Text
  402. Second Variation on Caesar Cipher
  403. Sectional Array Sort
  404. Sections
  405. Security : Sensitive Data Exposure
  406. See You Next Happy Year
  407. Selective memory
  408. Series of integers from m to n
  409. Shortest Distance to a Character
  410. Shortest Word
  411. Simple assembler interpreter
  412. Simple Encryption #1 - Alternating Split
  413. Simple Fun #1: Seats in Theater
  414. Simple Fun #111: Reverse Brackets
  415. Simple Fun #13: Magical Well
  416. Simple Fun #132: Number Of Carries
  417. Simple Fun #144: Distinct Digit Year
  418. Simple Fun #151: Rocks
  419. Simple Fun #165: Withdraw
  420. Simple Fun #176: Reverse Letter
  421. Simple Fun #181: Rounding
  422. Simple Fun #203: Strange Coach
  423. Simple Fun #27: Rectangle Rotation
  424. Simple Fun #72: Absolute Values Sum Minimization
  425. Simple Fun #74: Growing Plant
  426. Simple Fun #75: Digit Degree
  427. Simple Fun #79: Delete a Digit
  428. Simple Fun #87: Shuffled Array
  429. Simple multiplication
  430. Simple remove duplicates
  431. Simplifying multilinear polynomials
  432. Simpson's Rule - Approximate Integration
  433. Simultaneous Equations - Three Variables
  434. Sliding Puzzle Solver
  435. Small enough? - Beginner
  436. Smallest possible sum
  437. Snakes and Ladders
  438. SNAP
  439. Some Egyptian fractions
  440. Sort and Star
  441. Sort by Last Char
  442. Sort Out The Men From Boys
  443. Special Number (Special Numbers Series #5)
  444. Speed Control
  445. Split Strings
  446. Square into Squares. Protect trees!
  447. Square Pi's
  448. Square(n) Sum
  449. Stacked Balls - 2D
  450. Statistics for an Athletic Association
  451. Steps in k-primes
  452. Steps in Primes
  453. Stop gninnipS My sdroW!
  454. String ends with?
  455. String Merge!
  456. String prefix and suffix
  457. String repeat
  458. String Scramble
  459. Strings Mix
  460. STRONGN Strong Number (Special Numbers Series #2)
  461. Student's Final Grade
  462. Substituting Variables Into Strings: Padded Numbers
  463. Sum Arrays
  464. Sum by Factors
  465. Sum Mixed Array
  466. Sum of a Beach
  467. Sum of all arguments
  468. Sum of angles
  469. Sum of Array Averages
  470. Sum of Minimums!
  471. Sum of numbers from 0 to N
  472. Sum of odd numbers
  473. Sum of powers of 2
  474. Sum of Two Integers
  475. Sum up the random string
  476. Sum without highest and lowest number
  477. Sums of Parts
  478. Super Duper Easy
  479. Surface Area and Volume of a Box
  480. Switch case practicing
  481. Switch it Up!
  482. T.T.T.32: Count with your fingers
  483. Tank Truck
  484. Target Date
  485. Text align justify
  486. Texting with an old-school mobile phone
  487. The Baum-Sweet sequence
  488. The Best Combination
  489. The Deaf Rats of Hamelin
  490. The Hashtag Generator
  491. The iccanobiF Sequence
  492. The observed PIN
  493. The PaperFold sequence
  494. The Poet And The Pendulum
  495. The Skiponacci Sequence
  496. The Walker
  497. The Wide-Mouthed frog!
  498. Thinkful - List Drills: Longest word
  499. Thinkful - Number Drills: Rømer temperature
  500. Thinkful - String Drills: Repeater
  501. Third Angle of a Triangle
  502. Tidy Number (Special Numbers Series #9)
  503. To square(root) or not to square(root)
  504. Tom's Allergies
  505. Tortoise racing
  506. Total amount of points
  507. Tribonacci Sequence
  508. TV Remote
  509. Twice as old
  510. Twice linear
  511. Two Oldest Ages
  512. Two to One
  513. Uglify Word
  514. Unique In Order
  515. up AND down
  516. upperCasePlace()
  517. URL building
  518. URL parsing
  519. Valid Braces
  520. Validate IPv4 and IPv6
  521. Very Basic Inheritance
  522. Vigilante Lists
  523. Volume of a Cuboid
  524. Vowel Count
  525. Vowel Shifting
  526. Wave Sorting
  527. We are Family
  528. Weight for weight
  529. Weird prime generator
  530. WeIrD StRiNg CaSe
  531. Well of Ideas - Harder Version
  532. Which are in?
  533. Which x for that sum?
  534. Who likes it?
  535. Will there be enough space?
  536. Word Count
  537. World Bits War
  538. You Can't Code Under Pressure #1
  539. You only need one - Beginner
Clone this wiki locally