summaryrefslogtreecommitdiff
path: root/ext/spl/tests/bug52573.phpt
blob: 54587fae1da4e003751622a19e4b54a4d82f4632 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--TEST--
Bug #52573 (SplFileObject::fscanf Segmentation fault)
--FILE--
<?php // test

$result = null;
$f = new SplFileObject(__FILE__, 'r');
var_dump($f->fscanf('<?php // %s', $result));
var_dump($result);
var_dump($f->fscanf('<?php // %s'));
?>
--EXPECTF--
int(1)
string(4) "test"
array(1) {
  [0]=>
  NULL
}