Hey this was a real world example, not just something for demonstration. I think the one who posted is was perfectly serious about his code.
Anyway, to be true I didn't make much use of self-defined functions when I started, so there's not a loud to be proud of. However after the first variable collisions (like accidently overwriting a variable) I found that PHP's variable scoping may actually be a useful concept.
There's only one small project since that has a halfway decent logical structure, where the main script handles input and output and the actual work (lots of string manipulation in this case) is done by functions in an included script.
And there's one function I'd like to write sometimes, but it's not urgent right now: a recursive function that handles hierarchical data organized in a parent-son way, so that it can be used to retrieve all the information that can be queried from a nested set model with just one query. (Actually I kind of like the nested set approach, but since it's less human-readable, I wouldn't use it if there is any chance that someone else might mess things up.)