diff options
| author | kkadosh | 2018-10-05 22:46:23 +0200 |
|---|---|---|
| committer | jvoisin | 2018-10-05 20:46:23 +0000 |
| commit | fc6e2455c5fcc2a5ec365552fb8d89a9c0571154 (patch) | |
| tree | 0e286d6f140a73c84303cd8e888e5752f1525993 /src/tests/sloppy_comparison_array_search_keys.phpt | |
| parent | 2805631c6a71f1214906f8889ad6711f89b493f7 (diff) | |
Fix segfault array keys
Many thanks to @xXx-caillou-xXx for finding the true root cause and fixing the issue ♥
Diffstat (limited to 'src/tests/sloppy_comparison_array_search_keys.phpt')
| -rw-r--r-- | src/tests/sloppy_comparison_array_search_keys.phpt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/tests/sloppy_comparison_array_search_keys.phpt b/src/tests/sloppy_comparison_array_search_keys.phpt new file mode 100644 index 0000000..031708b --- /dev/null +++ b/src/tests/sloppy_comparison_array_search_keys.phpt | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | --TEST-- | ||
| 2 | Sloppy comparison array_search with keys | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | --INI-- | ||
| 6 | sp.configuration_file={PWD}/config/sloppy_comparison.ini | ||
| 7 | --FILE-- | ||
| 8 | <?php | ||
| 9 | $array = array(0 => 'blue', 1 => 'red', 2 => 'green', 3 => 'red'); | ||
| 10 | var_dump(array_search('green', $array)); | ||
| 11 | ?> | ||
| 12 | --EXPECT-- | ||
| 13 | int(2) | ||
