1--TEST--
2stristr() - New parameter: before_needle
3--FILE--
4<?php
5
6$email  = 'AbcCdEfGh';
7var_dump(stristr($email, 'c'));
8var_dump(stristr($email, 'c', 1));
9
10$email  = 'AbCdeEfGh';
11var_dump(stristr($email, 'E'));
12var_dump(stristr($email, 'E', 1));
13
14$email  = 'wazAbCdeEfGh';
15var_dump(stristr($email, 97));
16var_dump(stristr($email, 97, 1));
17
18?>
19--EXPECTF--
20string(7) "cCdEfGh"
21string(2) "Ab"
22string(5) "eEfGh"
23string(4) "AbCd"
24
25Deprecated: stristr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
26string(11) "azAbCdeEfGh"
27
28Deprecated: stristr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
29string(1) "w"
30