|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62529 Static Methods are Slower than Object Defined Methods
Submitted: 2012-07-11 09:10 UTC Modified: 2012-07-11 13:02 UTC
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: mahan dot mp at live dot com Assigned: johannes (profile)
Status: Closed Package: Performance problem
PHP Version: 5.3.15RC1 OS: Windows
Private report: No CVE-ID: None
 [2012-07-11 09:10 UTC] mahan dot mp at live dot com
Static methods are slower than Object Defined methods

Test script:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-07-11 13:02 UTC]
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at

There were many optimizations in 5.4 which help there. On my system I got 

Static call time: 0.053794145584106 ms
Object method call time: 0.063946008682251 ms
Static call (when the static is in the same class of object method) time: 0.063071966171265 ms

In general I would say that more people use dynamic calls so optimizations there are more relevant to overall performance.
 [2012-07-11 13:02 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: johannes
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Mon Nov 28 03:05:54 2022 UTC