--TEST-- Test strstr() function --FILE-- expected ?> DONE --EXPECTF-- *** Testing basic functionality of strstr() *** string(11) "test string" string(6) "string" string(6) "string" string(8) "t string" string(1) "g" string(32) "7272696018bdeb2c9a3f8d01fc2a9273" bool(false) bool(false) string(0) "" string(1) "a" bool(false) *** Testing strstr() with various needles *** -- Iteration 0 -- string(85) "Hello world,012033 -3.3445 NULL TRUE FALSE%0 abcd\xxyz %00 octal abcd$:Hello world" -- Iteration 1 -- bool(false) -- Iteration 2 -- string(39) "%0 abcd\xxyz %00 octal abcd$:Hello world" -- Iteration 3 -- string(39) "%0 abcd\xxyz %00 octal abcd$:Hello world" -- Iteration 4 -- string(27) "%00 octal abcd$:Hello world" -- Iteration 5 -- string(37) "abcd\xxyz %00 octal abcd$:Hello world" -- Iteration 6 -- string(31) "xyz %00 octal abcd$:Hello world" -- Iteration 7 -- string(24) "octal abcd$:Hello world" -- Iteration 8 -- string(66) "-3.3445 NULL TRUE FALSE%0 abcd\xxyz %00 octal abcd$:Hello world" -- Iteration 9 -- string(66) "-3.3445 NULL TRUE FALSE%0 abcd\xxyz %00 octal abcd$:Hello world" -- Iteration 10 -- string(66) "-3.3445 NULL TRUE FALSE%0 abcd\xxyz %00 octal abcd$:Hello world" -- Iteration 11 -- string(66) "-3.3445 NULL TRUE FALSE%0 abcd\xxyz %00 octal abcd$:Hello world" -- Iteration 12 -- string(54) "NULL TRUE FALSE%0 abcd\xxyz %00 octal abcd$:Hello world" -- Iteration 13 -- string(73) "012033 -3.3445 NULL TRUE FALSE%0 abcd\xxyz %00 octal abcd$:Hello world" -- Iteration 14 -- string(73) "012033 -3.3445 NULL TRUE FALSE%0 abcd\xxyz %00 octal abcd$:Hello world" -- Iteration 15 -- string(72) "12033 -3.3445 NULL TRUE FALSE%0 abcd\xxyz %00 octal abcd$:Hello world" -- Iteration 16 -- string(49) "TRUE FALSE%0 abcd\xxyz %00 octal abcd$:Hello world" -- Iteration 17 -- string(72) "12033 -3.3445 NULL TRUE FALSE%0 abcd\xxyz %00 octal abcd$:Hello world" -- Iteration 18 -- string(72) "12033 -3.3445 NULL TRUE FALSE%0 abcd\xxyz %00 octal abcd$:Hello world" -- Iteration 19 -- string(85) "Hello world,012033 -3.3445 NULL TRUE FALSE%0 abcd\xxyz %00 octal abcd$:Hello world" -- Iteration 20 -- string(44) "FALSE%0 abcd\xxyz %00 octal abcd$:Hello world" -- Iteration 21 -- string(80) " world,012033 -3.3445 NULL TRUE FALSE%0 abcd\xxyz %00 octal abcd$:Hello world" -- Iteration 22 -- string(59) " NULL TRUE FALSE%0 abcd\xxyz %00 octal abcd$:Hello world" -- Iteration 23 -- string(36) "bcd\xxyz %00 octal abcd$:Hello world" -- Iteration 24 -- bool(false) -- Iteration 25 -- string(19) " abcd$:Hello world" -- Iteration 26 -- string(72) "12033 -3.3445 NULL TRUE FALSE%0 abcd\xxyz %00 octal abcd$:Hello world" -- Iteration 27 -- bool(false) -- Iteration 28 -- string(85) "Hello world,012033 -3.3445 NULL TRUE FALSE%0 abcd\xxyz %00 octal abcd$:Hello world" *** Testing miscellaneous input data *** -- Passing objects as string and needle -- string(5) "world" -- Posiibilities with null -- Deprecated: strstr(): Passing null to parameter #2 ($needle) of type string is deprecated in %s on line %d string(0) "" Deprecated: strstr(): Passing null to parameter #1 ($haystack) of type string is deprecated in %s on line %d Deprecated: strstr(): Passing null to parameter #2 ($needle) of type string is deprecated in %s on line %d string(0) "" Deprecated: strstr(): Passing null to parameter #2 ($needle) of type string is deprecated in %s on line %d string(1) "a" string(1) "0" -- A longer and heredoc string -- string(729) "abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789 abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789 abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789 abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789 abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789 abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789 abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789 abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789 abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789 abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789" string(702) "123456789abcdefghijklmnopqrstuvwxyz0123456789 abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789 abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789 abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789 abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789 abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789 abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789 abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789 abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789 abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789" -- A heredoc null string -- bool(false) bool(false) -- simple and complex syntax strings -- string(5) "world" string(7) "world'S" Warning: Undefined variable $needleS in %s on line %d string(13) "Hello, worldS" string(6) "worldS" string(6) "worldS" *** Testing error conditions ***string(729) "abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789 abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789 abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789 abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789 abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789 abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789 abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789 abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789 abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789 abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789" bool(false) DONE