False positive with PHP strtok()

Make sure to read this post before raising a thread here:

Then tell us:

  • What language is this for?
    • PHP
  • Which rule?
    • php:S2201 Return values from functions without side effects should not be ignored
  • Why do you believe it’s a false-positive/false-negative?
    • strtok() is a function in the language that does have side effects
  • Are you using
    • SonarCloud? Yes
    • SonarQube? No
    • SonarLint? 10.3.0.77475 (but does not show as an error in SonarLint for me)
      • in connected mode with SonarQube or SonarCloud? Yes
  • How can we reproduce the problem? Give us a self-contained snippet of code (formatted text, no screenshots)
<?php
$value = "3.14159";
strtok($value, '.');
$round_length = strlen(strtok('.'));

Hello @kdebisschop and welcome back to community!

Thanks for raising awareness on this topic.
This is indeed a FP, I have created a Jira ticket to take care of this.

Thanks again for reporting this.
Best regards,
Rudy