xref: /php-src/Zend/tests/gh13145.phpt (revision ed64949d)
1--TEST--
2GH-13145: strtok() misoptimization
3--FILE--
4<?php
5$tok = strtok("This is\tan example\nstring", " \n\t");
6while ($tok !== false) {
7    var_dump($tok);
8    $tok = strtok(" \n\t");
9}
10?>
11--EXPECT--
12string(4) "This"
13string(2) "is"
14string(2) "an"
15string(7) "example"
16string(6) "string"
17