xref: /php-src/sapi/phpdbg/tests/gh13681.phpt (revision 03f0776d)
1--TEST--
2phpdbg_watch null pointer access
3--CREDITS--
4Yuancheng Jiang
5--SKIPIF--
6<?php
7if (getenv('SKIP_ASAN')) {
8    die("skip intentionally causes segfaults");
9}
10?>
11--FILE--
12<?php
13echo "*** Testing array_multisort() : Testing with anonymous arguments ***\n";
14var_dump(array_multisort(array(1,3,2,4)));
15$xconnect=$GLOBALS[array_rand($GLOBALS)];
16echo "Done\n";
17$a = [];
18$a[0] = 1;
19$a[0] = 2;
20$a = [0 => 3, 1 => 4];
21?>
22--PHPDBG--
23b 6
24r
25w a $a
26c
27q
28--EXPECTF--
29[Successful compilation of %s]
30prompt> [Breakpoint #0 added at %s:%d]
31prompt> *** Testing array_multisort() : Testing with anonymous arguments ***
32bool(true)
33Done
34[Breakpoint #0 at %s:%d, hits: 1]
35>00006: $a = [];
36 00007: $a[0] = 1;
37 00008: $a[0] = 2;
38prompt> prompt> [Script ended normally]
39prompt>
40