php-src/Zend/tests/gh13145.phpt
Ilija Tovilo ed64949d12
strtok is not comptime()
Fixes GH-13145
Closes GH-13148
2024-01-14 19:12:41 +01:00

17 lines
289 B
PHP

--TEST--
GH-13145: strtok() misoptimization
--FILE--
<?php
$tok = strtok("This is\tan example\nstring", " \n\t");
while ($tok !== false) {
var_dump($tok);
$tok = strtok(" \n\t");
}
?>
--EXPECT--
string(4) "This"
string(2) "is"
string(2) "an"
string(7) "example"
string(6) "string"