I am getting a syntax error but I don;t understand exactly why, here is my code:
class VerifyEmail {
private $ip_pool = array("167.114.48.81","167.114.48.82"....);
private $ip_to_use = $this->ip_pool[array_rand($this->ip_pool)]; //ERROR HERE
.....
I tried also:
private $ip_to_use = $ip_pool[array_rand($ip_pool)];
with no luck.
Am I missing something? Or you cannot do an array rand of a private variable when setting up the variables?
Thanks!
array_randhas 2 parameter, Have a look in here$thiswhen defining default values feels wrong. this logic might be more suitable in the constructor.