@@ -1742,7 +1742,7 @@ PHP_FUNCTION(stristr)
1742
1742
1743
1743
found = php_stristr (ZSTR_VAL (haystack ), ZSTR_VAL (needle ), ZSTR_LEN (haystack ), ZSTR_LEN (needle ));
1744
1744
1745
- if (!found ) {
1745
+ if (UNEXPECTED ( !found ) ) {
1746
1746
RETURN_FALSE ;
1747
1747
}
1748
1748
found_offset = found - ZSTR_VAL (haystack );
@@ -1770,7 +1770,7 @@ PHP_FUNCTION(strstr)
1770
1770
1771
1771
found = php_memnstr (ZSTR_VAL (haystack ), ZSTR_VAL (needle ), ZSTR_LEN (needle ), ZSTR_VAL (haystack ) + ZSTR_LEN (haystack ));
1772
1772
1773
- if (!found ) {
1773
+ if (UNEXPECTED ( !found ) ) {
1774
1774
RETURN_FALSE ;
1775
1775
}
1776
1776
found_offset = found - ZSTR_VAL (haystack );
@@ -1858,7 +1858,7 @@ PHP_FUNCTION(strpos)
1858
1858
ZSTR_VAL (needle ), ZSTR_LEN (needle ),
1859
1859
ZSTR_VAL (haystack ) + ZSTR_LEN (haystack ));
1860
1860
1861
- if (!found ) {
1861
+ if (UNEXPECTED ( !found ) ) {
1862
1862
RETURN_FALSE ;
1863
1863
}
1864
1864
RETURN_LONG (found - ZSTR_VAL (haystack ));
@@ -1890,7 +1890,7 @@ PHP_FUNCTION(stripos)
1890
1890
found = (char * )php_memnistr (ZSTR_VAL (haystack ) + offset ,
1891
1891
ZSTR_VAL (needle ), ZSTR_LEN (needle ), ZSTR_VAL (haystack ) + ZSTR_LEN (haystack ));
1892
1892
1893
- if (!found ) {
1893
+ if (UNEXPECTED ( !found ) ) {
1894
1894
RETURN_FALSE ;
1895
1895
}
1896
1896
RETURN_LONG (found - ZSTR_VAL (haystack ));
@@ -1935,7 +1935,7 @@ PHP_FUNCTION(strrpos)
1935
1935
1936
1936
found = zend_memnrstr (p , ZSTR_VAL (needle ), ZSTR_LEN (needle ), e );
1937
1937
1938
- if (!found ) {
1938
+ if (UNEXPECTED ( !found ) ) {
1939
1939
RETURN_FALSE ;
1940
1940
}
1941
1941
RETURN_LONG (found - ZSTR_VAL (haystack ));
@@ -2037,7 +2037,7 @@ PHP_FUNCTION(strrchr)
2037
2037
ZEND_PARSE_PARAMETERS_END ();
2038
2038
2039
2039
found = zend_memrchr (ZSTR_VAL (haystack ), * ZSTR_VAL (needle ), ZSTR_LEN (haystack ));
2040
- if (!found ) {
2040
+ if (UNEXPECTED ( !found ) ) {
2041
2041
RETURN_FALSE ;
2042
2042
}
2043
2043
found_offset = found - ZSTR_VAL (haystack );
0 commit comments