1--TEST-- 2strripos() offset integer overflow 3--FILE-- 4<?php 5 6var_dump(strripos("t", "t", PHP_INT_MAX+1)); 7var_dump(strripos("tttt", "tt", PHP_INT_MAX+1)); 8var_dump(strripos(100, 101, PHP_INT_MAX+1)); 9var_dump(strripos(1024, 1024, PHP_INT_MAX+1)); 10var_dump(strripos(array(), array(), PHP_INT_MAX+1)); 11var_dump(strripos(1024, 1024, -PHP_INT_MAX)); 12var_dump(strripos(1024, "te", -PHP_INT_MAX)); 13var_dump(strripos(1024, 1024, -PHP_INT_MAX-1)); 14var_dump(strripos(1024, "te", -PHP_INT_MAX-1)); 15 16echo "Done\n"; 17?> 18--EXPECTF-- 19Warning: strripos() expects parameter 3 to be int, float given in %s on line %d 20bool(false) 21 22Warning: strripos() expects parameter 3 to be int, float given in %s on line %d 23bool(false) 24 25Warning: strripos() expects parameter 3 to be int, float given in %s on line %d 26bool(false) 27 28Warning: strripos() expects parameter 3 to be int, float given in %s on line %d 29bool(false) 30 31Warning: strripos() expects parameter 1 to be string, array given in %s on line %d 32bool(false) 33 34Deprecated: strripos(): 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 35 36Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d 37bool(false) 38 39Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d 40bool(false) 41 42Deprecated: strripos(): 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 43 44Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d 45bool(false) 46 47Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d 48bool(false) 49Done 50