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

Clone this wiki locally