xref: /PHP-7.0/ext/filter/tests/bug73054.phpt (revision 23e721fc)
1--TEST--
2Bug #73054 (default option ignored when object passed to int filter)
3--SKIPIF--
4<?php
5if (!extension_loaded('filter')) die('skip filter extension not available');
6?>
7--FILE--
8<?php
9var_dump(
10    filter_var(new stdClass, FILTER_VALIDATE_INT, [
11        'options' => ['default' => 2],
12    ]),
13    filter_var(new stdClass, FILTER_VALIDATE_INT, [
14        'options' => ['default' => 2],
15        'flags' => FILTER_NULL_ON_FAILURE
16    ])
17);
18?>
19===DONE===
20--EXPECT--
21int(2)
22int(2)
23===DONE===
24