php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #28858 imagejpeg, imagepng etc return value not correct
Submitted: 2004-06-20 22:06 UTC Modified: 2004-06-21 13:45 UTC
From: antin dot roskat at zarecons dot net Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: Irrelevant
Private report: No CVE-ID: None
 [2004-06-20 22:06 UTC] antin dot roskat at zarecons dot net
Description:
------------
At least imagepng, imagejpeg and imagegif have a documented return value of int. The correct return value should be boolean. Using gettype on the return value returns "boolean".

Reproduce code:
---------------
$im = imagecreatetruecolor(100,100);
echo gettype(imagejpeg($im));

Expected result:
----------------
I'm expecting to see "integer" echoed (according to the manual).

Actual result:
--------------
Instead I'm seeing "boolean" echoed.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-06-21 13:45 UTC] nlopess@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.
 [2020-02-07 06:12 UTC] phpdocbot@php.net
Automatic comment on behalf of nlopess
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=798b64cd27cff8198764e33d5469be7139d083f9
Log: fix #28858: fix protos
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Nov 19 22:00:02 2025 UTC