Global variable in Drupal module

There is something different in a variable between a variable in a Drupal module and a variable in a normal php file.

normal php

$_User = "user";

function test() {

global $_User;

..

}

Drupal module

global $_User;

$_User = "user";

function test() {

global $_User;

..

}

In Drupal module, I need the additional global $_User; Why? :?

Comments

blog comments powered by Disqus