The php.net web site is full of comments showing code snippets/functions/small libraries. I was unable to find any mention on php.net regarding what license these snippets fall under, and a web search didn't show me anything.
Does anyone know what the legal rules are for reusing these pieces of code?
Is it enough to include a comment specifying where the code came from?
Should the code never be reused without contacting the original comment author?
Does the PHP web site enforce a particular copyright license (such as MIT, BSD, or GPL) for users contributed comments?
If php.net is considered a public meeting place for user posted content, then I imagine each poster owns the copyright to their respective code, and therefore the code can't ever be reused without contacting the original author and obtaining a copyright license (often not possible, due to fake or old/expired e-mails being used)... which would make the whole point of the easily accessible code snippets moot, as you can't use them.
Is it legally allowed to write new code based on the code snippets, without directly copying and pasting their code, i.e. using different formatting, different variable names, not identical code structure, etc.?