I have the following code:
<?php
class picture{
private $path = 'files/';
private $login = base64_decode('dGVzdGluZw==');
private $password = base64_decode('MTIzNDU2');
private $image_path = $this->path.time().'.jpg';
//code
I get the following error:
Parse error: parse error, expecting
','' or‘;” in * on line 6
Line 6 is the line on which $path is declared.
You cannot directly assign the return value of a function to a member declaration in PHP. Use a constructor instead: