summaryrefslogtreecommitdiff
path: root/ext/standard/tests/array/bug43541.phpt
blob: 847f61ad2bb2c24be961011a01bf484622078bab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--TEST--
Bug #43541 (length parameter omitted or not does not work when casted to float)
--FILE--
<?php
$arr = array(1, 2, 3, 4, 5, 6);

var_dump(array_slice($arr, 0, (float)2));
var_dump(array_slice($arr, 0, (int)2));
?>
--EXPECT--
array(2) {
  [0]=>
  int(1)
  [1]=>
  int(2)
}
array(2) {
  [0]=>
  int(1)
  [1]=>
  int(2)
}