note 125734 added to function.imagecreatetruecolor

From: Date: Thu, 28 Jan 2021 07:23:29 +0000
Subject: note 125734 added to function.imagecreatetruecolor
Groups: php.notes 
Request: Send a blank email to php-notes+get-216245@lists.php.net to get a copy of this message
As of PHP 8, the return type for image creation functions is GdImage instead of a resource. Therefore, people can type hint. <?php class MyImage { private GdImage $img; }; ?> Similarly, <?php function save_image(GdImage $img, string $name, string $directory = null) : bool { /*...*/ }; ?> ---- Server IP: 45.112.84.4 Probable Submitter: 45.91.159.166 (proxied: 43.248.12.228) ---- Manual Page -- http://php.net/manual/en/function.imagecreatetruecolor.php Edit -- https://master.php.net/note/edit/125734 Del: integrated -- https://master.php.net/note/delete/125734/integrated Del: useless -- https://master.php.net/note/delete/125734/useless Del: bad code -- https://master.php.net/note/delete/125734/bad+code Del: spam -- https://master.php.net/note/delete/125734/spam Del: non-english -- https://master.php.net/note/delete/125734/non-english Del: in docs -- https://master.php.net/note/delete/125734/in+docs Del: other reasons-- https://master.php.net/note/delete/125734 Reject -- https://master.php.net/note/reject/125734 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#216245) next »