1--TEST--
2strstr() - New parameter: before_needle
3--FILE--
4<?php
5
6$email  = 'aexample.com';
7var_dump(strstr($email, '@'));
8var_dump(strstr($email, '@', 1));
9$email  = 'a@example.com';
10var_dump(strstr($email, '@'));
11var_dump(strstr($email, '@', 1));
12$email  = 'asdfasdfas@e';
13var_dump(strstr($email, '@'));
14var_dump(strstr($email, '@', 1));
15$email  = '@';
16var_dump(strstr($email, '@'));
17var_dump(strstr($email, '@', 1));
18$email  = 'eE@fF';
19var_dump(strstr($email, 'e'));
20var_dump(strstr($email, 'e', 1));
21var_dump(strstr($email, 'E'));
22var_dump(strstr($email, 'E', 1));
23
24var_dump(strstr('', ' ', ''));
25
26?>
27--EXPECT--
28bool(false)
29bool(false)
30string(12) "@example.com"
31string(1) "a"
32string(2) "@e"
33string(10) "asdfasdfas"
34string(1) "@"
35string(0) ""
36string(5) "eE@fF"
37string(0) ""
38string(4) "E@fF"
39string(1) "e"
40bool(false)
41