Skip to content

Commit 7e42ece

Browse files
committed
Add test
Signed-off-by: Petr Shumilov <p.shumilov@vkteam.ru>
1 parent a529c73 commit 7e42ece

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
@ok
2+
<?php
3+
require_once 'kphp_tester_include.php';
4+
5+
/**
6+
* @kphp-required
7+
* @param int $a
8+
* @param int $b
9+
* @return int
10+
*/
11+
function cmp(int $a, int $b) {
12+
#ifndef KPHP
13+
sched_yield();
14+
#endif
15+
return $b - $a;
16+
}
17+
function main() {
18+
$arr = [3, 2, 1];
19+
uasort($arr, 'cmp');
20+
}
21+
main();

0 commit comments

Comments
 (0)