Annotation of embedaddon/php/ext/standard/tests/strings/stristr2.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: stristr() - New parameter: before_needle
! 3: --FILE--
! 4: <?php
! 5:
! 6: $email = 'AbcCdEfGh';
! 7: var_dump(stristr($email, 'c'));
! 8: var_dump(stristr($email, 'c', 1));
! 9:
! 10: $email = 'AbCdeEfGh';
! 11: var_dump(stristr($email, 'E'));
! 12: var_dump(stristr($email, 'E', 1));
! 13:
! 14: $email = 'wazAbCdeEfGh';
! 15: var_dump(stristr($email, 97));
! 16: var_dump(stristr($email, 97, 1));
! 17:
! 18: ?>
! 19: --EXPECT--
! 20: string(7) "cCdEfGh"
! 21: string(2) "Ab"
! 22: string(5) "eEfGh"
! 23: string(4) "AbCd"
! 24: string(11) "azAbCdeEfGh"
! 25: string(1) "w"
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>