PHP5和lib GD:开箱即用支持?

Does php5 come with the GD graphics library as standard? http://www.libgd.org

it mentions a version of php4 on their site - do I assume every version since then has it built in?

The documentation here says that there has been a built-in version since PHP 4.3.

But it looks like you need to explicitly include it when configuring PHP. The documentation here says you need to pass --with-gd to include it.

So you will not be guaranteed to have GD support enabled, but if you are compiling PHP you can configure it to use the built-in version.

this here should answer your question: http://de3.php.net/manual/en/book.image.php

PHP must be configured with the --with-gd= option, but I'd say it's safe to say GD is bundled in the vast majority of PHP installations, especially with web hosting companies.

If in doubt, ask beforehand.

If you have shared hosting, you're likely fine. As others have said, asking is the best way, or if you're compiling it yourself, make sure to include the proper flags.

Important to note: if you plan on doing extensive manipulation, you'll likely want to make sure you have the jpeg-6b and libpng packages installed and linked when compiling PHP, or make sure that your host has done so (GIF support is automatically included), along with FreeType libraries. These aren't strictly required, but you may run into scenarios where they're necessary.