Jump to content

global keyword in php


colap

Recommended Posts

It's a function=>

 

function _wp_call_all_hook($args) {
global $wp_filter;
//var_dump($wp_filter);
//exit();

reset( $wp_filter['all'] );
do {
	foreach( (array) current($wp_filter['all']) as $the_ )
		if ( !is_null($the_['function']) )
			call_user_func_array($the_['function'], $args);

} while ( next($wp_filter['all']) !== false );
}

 

Why is $wp_filter variable declared as global ? Was $wp_filter assigned before ?

Link to comment
https://forums.phpfreaks.com/topic/250193-global-keyword-in-php/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.