$docblock['code'] and api_format_embedded_php() don't need to add <?php

Migrated issue

Reported by: sk33lz

While at Drupalcon this year, I was told repeatedly that best practices are that we should not include the trailing ?> in our PHP code, yet throughout the API documentation, the trailing ?> is included. If we are trying to teach people how to code for Drupal with the documentation, then perhaps we should not include that in the documentation.

Some more examples are:
http://api.drupal.org/api/function/block_example_block/6
http://api.drupal.org/api/function/filter_example_filter/6

After talking with a few people they suggested that it is required for the color formatting on the PHP code, which would make sense, but why can't we also hide those characters on the pages somehow with CSS or something? It just seems like a bad idea to try to set coding standards and then not adhere to those standards in examples. Either way the documentation still rocks.

Thanks,

Jason