$myVar = "hello"; class MyClass { function __construct() { echo $myVar; } }