Re: Global unavailable?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Problem not reproducable. Test case used:

-------------------------------
a.inc.php:

<?php
$a = 123;

-------------------------------
b.inc.php:

<?php
require 'a.inc.php';
class b {
     function test() {
         global $a;
         echo $a;
     }
}

-------------------------------
t.php:

<?php
require 'b.inc.php';

$x=new b();
$x->test();

-------------------------------
Command line: php t.php
Output: 123


I used PHP-5.1 RC1. No problem whatsoever. Such problems shouldn't arise
in new versions since they are touching very basic concepts that didn't
change.

AllOLLi
____________
"You see, Mr. President: The worlds hates America. And for good reason.
(I wont bother going into details)"
[24 319]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux