Skip to content

Conversation

andrii-pukhalevych
Copy link

https://www.php.net/manual/en/function.strtok.php#103051 strtok function holds input string parameter (or reference to it?) in memory after usage.

https://www.php.net/manual/en/function.strtok.php#103051
`strtok` function holds input string parameter (or reference to it?) in memory after usage.
@tcdent
Copy link
Owner

tcdent commented Jan 1, 2023

Good catch! Appreciate your contribution.

In his comment and third example he also calls unset before calling strtok with an empty string. Is that necessary to achieve this result?

We should do a quick test to verify it's effectiveness before merging.

@andrii-pukhalevych
Copy link
Author

I believe that unset is not required

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants