blob: fd045c64d37fec7d0f437b20426ca375a6f1ad17 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
--TEST--
strpos() matching numbers
--FILE--
<?php
// Integer is handles as an octal representation, so nothing to match
var_dump(strpos("foo 11", 11));
// int(111) is string("o") in octal. Match expected
var_dump(strpos("foo bar", 111));
// string("11") is contained
var_dump(strpos("foo 11", "11"));
?>
--EXPECTF--
Deprecated: strpos(): 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
bool(false)
Deprecated: strpos(): 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
int(1)
int(4)
|