PHP | Gmagick current() Function Last Updated : 21 Jan, 2020 Comments Improve Suggest changes Like Article Like Report The Gmagick::current() function is an inbuilt function in PHP which is used to return the reference of the current Gmagick object. This function does not create any copy but returns the same instance of Gmagick. Syntax: Gmagick Gmagick::current( void ) Parameters: This function doesn’t accept any parameters. Return Value: This function returns Gmagick object on success. Exceptions: This function throws GmagickException on error. Below given programs illustrate the Gmagick::current() function in PHP: Used Image: Program 1: php <?php // Create two new Gmagick object $gmagick = new Gmagick('geeksforgeeks.png'); $gmagicknew = new Gmagick(); // Get the current object $gmagicknew = $gmagick->current(); // Output the new Gmagick object image to browser header('Content-type: image/png'); echo $gmagicknew; ?> Output: Program 2: php <?php // Create two new Gmagick object $gmagick = new Gmagick('geeksforgeeks.png'); $gmagicknew = new Gmagick(); // Get the current object $gmagicknew = $gmagick->current(); // Apply blur to new object $gmagicknew->blurimage(20, 2); // Output the image to browser header('Content-type: image/png'); echo $gmagicknew; ?> Output: Reference: https://www.php.net/manual/en/gmagick.current.php Comment More infoAdvertise with us Next Article PHP | Gmagick current() Function gurrrung Follow Improve Article Tags : Web Technologies PHP PHP-function PHP-Gmagick Similar Reads PHP | Imagick current() Function The Imagick::current() function is an inbuilt function in PHP which is used to return the reference of current Imagick object. This function does not create any copy but returns the same instance of Imagick. Syntax: Imagick Imagick::current( void ) Parameters: This function does not accepts any para 2 min read PHP | Gmagick clear() Function The Gmagick::clear() function is an inbuilt function in PHP which is used to clear all resources associated to Gmagick object. Syntax: Gmagick Gmagick::clear( void )  Parameters: This function does not accepts any parameter. Return Value: This function returns the cleared Gmagick object. Errors/Exc 2 min read PHP | Gmagick __construct() Function The Gmagick::__construct() function is an inbuilt function in PHP which is used to create a Gmagick object. Further Gmagick manipulations can be done with this newly created Gmagick object. Syntax: public Gmagick::__construct( string $filename ) Parameters: This function accepts a single parameter $ 1 min read PHP current() Function The current() function is an inbuilt function in PHP. It is used to return the value of the element in an array which the internal pointer is currently pointing to.The current() function does not increment or decrement the internal pointer after returning the value.In PHP, all arrays have an interna 2 min read PHP | Gmagick cropimage() Function The Gmagick::cropimage() function is an inbuilt function in PHP which is used to extracts the region of the image. This function crop the part of image. Syntax: public Gmagick::cropimage( $width , $height , $x , $y ) Parameters: This function accept four parameters as mention above and describe belo 2 min read Like