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

Clone this wiki locally