PHP documentation, includes some code reordering