Update trait_get_variables.php

Use PHP Traits & magic method __call to create getter functions to class variables.