zheyu1995 opened a new issue, #10995:
URL: https://github.com/apache/skywalking/issues/10995

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/skywalking/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Apache SkyWalking Component
   
   PHP (apache/skywalking-php)
   
   ### What happened
   
   <?php
   echo '111';
   {
       try {
         $client = new Redis();
         $host = "127.0.0.1";
         $port = "6379";
         $client->connect($host, $port, 1);
         $client->set('foo', '1111');
       } catch (RedisException $e) {
       }
   }
   echo "ok";
   
   当connect 中使用变量的方式时,是无法获取connet信息。
   
![image](https://github.com/apache/skywalking/assets/135955826/1047da22-48f9-4865-8091-d85b8479f6f4)
   
   若不是变量的方式时,是可以获取到connect信息
   <?php
   
   echo '111';
   
   {
           $client = new Redis();
           $client->connect("127.0.0.1", 6379, 1);
           $client->set('foo', '1111');
   }
   
   echo "ok";
   
   
![image](https://github.com/apache/skywalking/assets/135955826/c103c8f9-5df4-44ba-805c-d2a54d681958)
   
   
   ### What you expected to happen
   
   
![image](https://github.com/apache/skywalking/assets/135955826/1e12210c-264f-41c9-bb01-790ee610d796)
   
   
   ### How to reproduce
   
   <?php
   echo '111';
   {
       try {
         $client = new Redis();
         $host = "127.0.0.1";
         $port = "6379";
         $client->connect($host, $port, 1);
         $client->set('foo', '1111');
       } catch (RedisException $e) {
       }
   }
   echo "ok";
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: 
[email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to