php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52715 Err in get_loaded_extensions() with true argument
Submitted: 2010-08-27 08:47 UTC Modified: 2010-10-19 06:12 UTC
From: satya61229 at gmail dot com Assigned: kalle (profile)
Status: Closed Package: Documentation problem
PHP Version: 5.3SVN-2010-08-27 (snap) OS: WinXP
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: satya61229 at gmail dot com
New email:
PHP Version: OS:

 

 [2010-08-27 08:47 UTC] satya61229 at gmail dot com
Description:
------------
I got to know that get_loaded_extensions() has FALSE value as default argument. So, I got that I can use TRUE also to list Zend extensions. But for this value, it  returns empty array. I tried this function on Win 7 OS also and result is same. 

Test script:
---------------
$loaded = get_loaded_extensions(true);

Expected result:
----------------
List of extensions loaded with the zend extension included.

Actual result:
--------------
Empty array

Patches

support-true-arg (last revision 2010-08-27 06:51 UTC by satya61229 at gmail dot com)

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-08-27 08:55 UTC] satya61229 at gmail dot com
-Summary: get_loaded_extensions() with true argument +Summary: Err in get_loaded_extensions() with true argument -Package: Unknown/Other Function +Package: PHP options/info functions
 [2010-08-27 08:55 UTC] satya61229 at gmail dot com
Corrected the Package name
 [2010-08-30 10:41 UTC] kalle@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: kalle
 [2010-08-30 10:41 UTC] kalle@php.net
Simply do:

$extensions = array_merge(get_loaded_extensions(), get_loaded_extensions(true));

Its most likely we will never add such an option to get both when it can be done that easily in userland PHP code.
 [2010-08-30 11:01 UTC] pajoye@php.net
-Status: Closed +Status: Wont fix
 [2010-08-30 11:01 UTC] pajoye@php.net
Won't fix is the correct status.
 [2010-08-30 11:50 UTC] satya61229 at gmail dot com
Why to merge the array returned by get_loaded_extensions(true), if it returns nothing. get_loaded_extensions(true) returned me empty array on both WinXP and Win7.  And if  I follow your solution, how to get Zend extensions only as discussed in manual?
 [2010-08-30 12:47 UTC] johannes@php.net
-Status: Wont fix +Status: Open -Package: PHP options/info functions +Package: Documentation problem
 [2010-08-30 12:47 UTC] johannes@php.net
I assume you are confused by the term "Zend Extension". A Zend Extension is a special module which effects the core engine, like a debugger or such. Most likely you don't have such an extension enabled.

Making this a doc issue as the documentation isn't clear about the fact that, get_loaded_extensions(true) lists Zend exts only.
 [2010-08-30 16:24 UTC] Satya61229 at gmail dot com
Thanks johannes @php.net. You are right. 
Sorry to trouble you all.
 [2010-08-30 16:42 UTC] Satya61229 at gmail dot com
Actually I have point to get confused. On my home laptop, I have xDebug loaded. but I could not make difference because of get_loaded_extensions(); is listing xDebug with other extensions, whereas I expect it should not come in this list. Because default value is false. 
get_loaded_extensions(true); is only listing zend extension. In my case output is xDebug. Which is right. 
Now, I need to check if xDebug extension comes in both category for a reason!
 [2010-10-19 06:12 UTC] kalle@php.net
Automatic comment from SVN on behalf of kalle
Revision: http://svn.php.net/viewvc/?view=revision&revision=304493
Log: Fixed bug #52715 (Err in get_loaded_extensions() with true argument)
 [2010-10-19 06:12 UTC] kalle@php.net
-Status: Assigned +Status: Closed
 [2010-10-19 06:12 UTC] kalle@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 [2020-02-07 06:09 UTC] phpdocbot@php.net
Automatic comment on behalf of kalle
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=939144320a3ca2cfb14c2f8306748bcfe4acece9
Log: Fixed bug #52715 (Err in get_loaded_extensions() with true argument)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 23:01:28 2024 UTC