php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #65043 Destroy and clear method do the same things
Submitted: 2013-06-16 03:27 UTC Modified: 2013-09-25 07:35 UTC
From: admin at dinacel dot com Assigned: mkoppanen (profile)
Status: Closed Package: imagick (PECL)
PHP Version: Irrelevant OS: All
Private report: No CVE-ID: None
 [2013-06-16 03:27 UTC] admin at dinacel dot com
Description:
------------
Destroy and clear method do the same things but it is not specified in the 
documentation. I've seen that they use both functions in the Wordpress code, it is 
not so dramatic, but they are doing 2 functions call when only one would sufice.

One function should be the alias of the other to reduce code duplication too.

Test script:
---------------
<?php

$imagick = new Imagick();
$imagick->clear();

$imagick = new Imagick();
$imagick->destroy();


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-09-25 07:35 UTC] mkoppanen@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: mkoppanen
 [2013-09-25 07:35 UTC] mkoppanen@php.net
Added a fix
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Tue Oct 06 12:00:01 2026 UTC