eval function |
eval function |
tudsy |
May 18 2022, 08:23 AM
Post
#1
|
Advanced Member Group: Members Posts: 246 Joined: 30-September 14 Member No.: 21,611 |
Hi
I am new to the eval function but I was wondering can anyone find anything wrong with this code: foreach ($this->subclient_names as $subclient_name) { eval("\$api_instance = \"new /home/ecovibdc/vendor/klaviyo/sdk/API/ ${subclient_name}/Api(new /home/ecovibdc/vendor/guzzlehttp/guzzle/src/Client.php, $this->config\";"); $this->$subclient_name = new Subclient( $api_instance, $wait_seconds = 3, $num_retries = 3, ); Any help would be appreciated. Thanks Adrian. |
Lo-Fi Version | Time is now: 5th June 2024 - 12:56 AM |