GFDL license question


I have a question regarding GFDL license under which all Yii documentation is published.

I used code from a couple of tutorials in the website that doesn’t allow any reuse or copy of the source code. And now I am having trouble figuring out if I am allowed to use code from tutorials. i.e. this code:

If I am, then what should I say in comments. Wikipedia explanation of GFDL wasn’t very helpful. I hope you could clarify it.

It’s a no-brainer:

Copy and modify and share, but do not claim that you wrote it. A link to the original is required and credit (if not obvious from the link).

Thanks for clarification.