All you need to do is add “&” in front of your __get function to pass it as reference:
public function &__get ( $index )
Struggled with this one for a while.
More Related Contents:
- PHP __get and __set magic methods
- Best practice: PHP Magic Methods __set and __get [duplicate]
- How to document magic (_call and _callStatic) methods for IDEs
- PHP global in functions
- php mysqli_connect: authentication method unknown to the client [caching_sha2_password]
- What is the difference between HTTP_HOST and SERVER_NAME in PHP?
- How to pass $_GET variables from a link to a bootstrapmodal?
- FPDF error: Some data has already been output, can’t send PDF
- A form doesn’t submit [duplicate]
- Laravel-5 ‘LIKE’ equivalent (Eloquent)
- php array behaving strangely with key value 07 & 08
- How to store NULL values in datetime fields in MySQL?
- UTF-8 encoded html pages show � (questions marks) instead of characters
- Extra backslash needed in PHP regexp pattern
- Manipulate a url string by adding GET parameters
- MySQLI binding params using call_user_func_array
- AWS Cloudfront + Load Balancer, url changes from main domain to load balancer subdomain [closed]
- Remotely destroy a session in php (user logs in somewhere else)?
- Laravel 4 removing public from URL
- while ($row = mysql_fetch_array($result)) – how many loops are being performed?
- What is a Factory Design Pattern in PHP?
- How to store and retrieve image contents from the database using Laravel
- Why Session object destruction failed
- PHP function imagettftext() and unicode
- PHP remember file field contents
- stdClass object and foreach loops
- How can i send an Email using PHP at windows Azure?
- How to make mysqli connect function?
- In PHP, is there an easy way to get the first and last date of a month?
- preg_match() vs strpos() for match finding?