I am getting an error in my server,
<?php
class Encryption{
private $_encryptionkey;
public function setEncryption($key){
$this->_encryptionkey = $key;
}
}
when I call
$enc = new Encryption();
$enc->setEncryption("abcd123");
I am getting error
PHP Fatal error: Uncaught Error: Cannot access private property Encryption::$_encryptionkey
This error keep show event i change _encryptionkey to protected, but error gone if i change to public.
My Server running PHP Version 7.1.0 using phalcon version 3.0.3