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.
You actually throw the "Error" constructor here. Not an error object, just the function that could create an error.
Not that it matters much in a kata, but throwing strings instead of errors means that you won't get a stacktrace, making errors harder to locate. Don't try that at home, kids! :)
it prints "Hello Austin, welcome to PHP!", it doesn't return it
The first point in "[1.3..7]" is supposed to be a comma, right?
Wouldn't it be possible to extend the system so the kata creator defines a fixed interface? That way, test cases and code could run in two seperate runtimes.
Most katas I have seen say something like:
"define a function bla that returns a value blub"
At least this sounds more reliable then a "Cheat detection". (I could see this go horribly wrong)
Or how about allowing downvotes?
A solution that does not contain any spoilers! Nice.
This comment is hidden because it contains spoiler information about the solution
\w
matches numbers, letters AND underscores.This comment is hidden because it contains spoiler information about the solution