PHP Create Local Variables From String
17:21 27 Jan 2017

Is there a way to create a variable inside an object from a string? for example:

class Whatever {

   public function createVariables() {
       $this["variable_name"] = 100;
   }

}

I want to dynamically create variables depending on a set of rules that are defined by a child class.

php laravel inheritance