Thanks alot for the hint - i am using a "Phalcon\Mvc\Controller" and inside the class i just need to use "$this->request" to get a fully initialized request object.
Nevertheless is it intended, that the default value only gets returned, when the query parameter is not used in the request? (using your code above and the "$this->request" object in a controller)
Example 1
Request: https://localhost/test.php?id=aa
Returned value: ""
Example 2
Request: https://localhost/test.php?id=a11a
Returned value: "11"
Example 3
Request: https://localhost/test.php?id=
Returned value: ""
Example 4
Request: https://localhost/test.php
Returned value: "0"
As in example 4 I would expect to get the default value in the examples 1 and 3 as well, since the given values have been filtered by the "int" filter