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. Most of them should be easy to fix.

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