1--TEST--
2Bug #60801 (strpbrk() mishandles NUL byte)
3--FILE--
4<?php
5$haystack = "foob\x00ar";
6$needle = "a\x00b";
7
8var_dump(strpbrk($haystack, 'ar'));
9var_dump(strpbrk($haystack, "\x00"));
10var_dump(strpbrk($haystack, $needle));
11var_dump(strpbrk('foobar', $needle));
12var_dump(strpbrk("\x00", $needle));
13var_dump(strpbrk('xyz', $needle));
14var_dump(strpbrk($haystack, 'xyz'));
15?>
16--EXPECT--
17string(2) "ar"
18string(3) "�ar"
19string(4) "b�ar"
20string(3) "bar"
21string(1) "�"
22bool(false)
23bool(false)
24