NAJAX is a PHP Ajax framework. Not only does it look easy to use, it also appears to have well-written and well-documented code.
One of the examples is a PHP Exam. I managed to score only 7 out of 12. A list of my errors in in the extended section of this article.
The errors
- I confused array_shift with that of array_unshift. I always mix these two up.
- I never heard of pcntl_exec before, so I didn't know why it was different than exec.
- I didn't know how the === operator worked. I feel ashamed :) (it checks if both operands are the same and are of the same type)
- I didn't know what the purpose of either get_required_files or get_included_files was. I guessed that they would be different, but in fact they are exactly the same. It returns an array with the names of included or required files.
- I was fooled by the behavior of the ksort function: it does not return an array but rather applies the changes directly in the array passed to it, and returns a bool instead.
Hurray! I learned something today.

Comments
Add Comment