Skip to content

List of PHP Kata to Update to PHP 7.4

kazk edited this page Apr 9, 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
  • Each file should have <?php
    • Runner prepends this if missing for backwards compatibility, but any new code should include it

List of Kata

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