|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #69387 Example code for Imagick::queryFormats() is inaccurate
Submitted: 2015-04-06 18:41 UTC Modified: 2015-04-08 17:05 UTC
From: justins at journeygroup dot com Assigned:
Status: Duplicate Package: imagick (PECL)
PHP Version: 5.5.23 OS: Mac OS 10.10.2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: justins at journeygroup dot com
New email:
PHP Version: OS:


 [2015-04-06 18:41 UTC] justins at journeygroup dot com
From manual page:

The manual's example is faulty. The method Imagick::queryFormats cannot be called statically. Suggest that replacing the example with a var_dump() and an abbreviated list of expected output would be more helpful.

Test script:
Example code on:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-04-07 11:33 UTC]
-Status: Open +Status: Feedback
 [2015-04-07 11:33 UTC]
What makes you say that it can't be called statically?

It appears to be working for me -
 [2015-04-07 17:09 UTC] justins at journeygroup dot com
-Status: Feedback +Status: Open
 [2015-04-07 17:09 UTC] justins at journeygroup dot com
You're right, I should have worded my initial report better. You _can_ execute the method, however its not preferred to call non-static methods with a static syntax. With strict mode it barks:

"Strict Standards: Non-static method Imagick::queryformats() should not be called statically"
 [2015-04-08 17:05 UTC]
-Status: Open +Status: Duplicate
 [2015-04-08 17:05 UTC]
Duplicate of which was fixed on 2013-09-25
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Jul 30 14:01:24 2021 UTC