xref: /php-src/ext/filter/tests/bug73054.phpt (revision 74859783)
1--TEST--
2Bug #73054 (default option ignored when object passed to int filter)
3--EXTENSIONS--
4filter
5--FILE--
6<?php
7var_dump(
8    filter_var(new stdClass, FILTER_VALIDATE_INT, [
9        'options' => ['default' => 2],
10    ]),
11    filter_var(new stdClass, FILTER_VALIDATE_INT, [
12        'options' => ['default' => 2],
13        'flags' => FILTER_NULL_ON_FAILURE
14    ])
15);
16?>
17--EXPECT--
18int(2)
19int(2)
20