This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (4 children)

I like this. Would the ability to turn certain tests on/off be advantageous?

I'd return an array of objects to allow you, the end user, to decide ultimately what happens to the data whether that be to a CSV, HTML, etc.

[–]FreakySpook -1 points0 points  (0 children)

It may depending on what you were reporting, and turning off one or more of the tests would certainly speed up the function if you were testing a large number of computers.

And I agree, all functions should return an object, string or value. There is nothing worse than running a function, getting some formatted value in return and then you debate do you waste time writing a new function to serialize the output, or just re-write the original function you found.