1--TEST--
2Test strstr() function : usage variations - complex strings containing other than 7-bit chars
3--FILE--
4<?php
5$string = chr(0).chr(128).chr(129).chr(234).chr(235).chr(254).chr(255);
6$stringAsHex = bin2hex($string);
7echo "-- Positions of some chars in the string '$stringAsHex' are as follows --\n";
8echo bin2hex( chr(128) ) ." => ";
9var_dump( bin2hex( strstr($string, chr(128) ) ) );
10echo bin2hex( chr(255) ) ." => ";
11var_dump( bin2hex( strstr($string, chr(255) ) ) );
12echo bin2hex( chr(256) ) ." => ";
13var_dump( bin2hex( strstr($string, chr(256) ) ) );
14?>
15
16DONE
17--EXPECT--
18-- Positions of some chars in the string '008081eaebfeff' are as follows --
1980 => string(12) "8081eaebfeff"
20ff => string(2) "ff"
2100 => string(14) "008081eaebfeff"
22
23DONE
24