I have created a plugin that is running good in PHP v5.5.x. When I upgrade my PHP version to 7.x it gives me errors.
Code that is suspicious is:
$this->EE =& get_instance();
Error is:
only variables should be passed by reference
As error says, PHP 7 is only allow variables to passed by reference not an instance. You now need to remove that line and replace all $this->EE calls to ee(). That will work for you.
ee(). However I was looking for workaround with $this->EE.
Pretty sure you don't need this in a plugin `$this->EE =& get_instance(); ref https://docs.expressionengine.com/v2/development/plugins.html
$this->EE instead of ee() call