Core Training solutions

Core Training was solved using PHP by 8 contestants. Solution sizes: average 1262 bytes (shortest: 697; longest: 1997).