Remember the concept of encapsulation in OOP! The $filename variable should not be directly accessible from outside the class. So you should create accessors and mutators (sets and gets) for each variable you wish to modify from outside the class.
From within the class, any member variables are accessed with the $this keyword. See below:
test.class.php:
class test {
var $filename;
function test() {
$this->filename = "PRINT THIS";
}
function getFilename() {
return $this->filename;
}
}
Calling program:
include_once("test.class.php");
$express = new test();
print("Returned value is: " . $express->getFilename());