Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This fails on
Otherwise, pretty concise!
A comment is useful if it tells us something the code cannot express.
This comment is incorrect (it says "add", whereas the code performs "multiply") and even if it were correct, it is not useful.
While this code may work, it is no pleasure maintaining code like this
One statement, one line; use meaningful variable names--to start somewhere.
On one end, there is Primitive Obsession. On the other end, there is this: reeks of speculative generality.
Your method comments add absolutely nothing. Comment only what the code cannot say.
'formatTime' is a misleading name (the time is not formatted). twoDigits() may be a suitable alternative.
Please do not leave echo statements in your method.
Look into:
No, that is not correct. Check the first conjunct inside the if().
Your reply does point out that this code is not optimally readable.
The array $solutions used inside in_array is constructed by concatenating the inputs into a string.
merely incrementing the test factor $i is very inefficient; you're trying all even numbers
+1 for upper limit (sqrt n) on factor
This comment is hidden because it contains spoiler information about the solution