File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / standard / tests / strings / strpos_number.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:48:04 2012 UTC (12 years, 5 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17p0, v5_4_17, v5_3_10, HEAD
php

--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"));
?>
--EXPECT--
bool(false)
int(1)
int(4)

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>