|  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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
31 + 8 = ?
Subscribe to this entry?

 [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: Mon Jul 26 21:01:24 2021 UTC