Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

filter_var() Constant missing #460

Open
@Machou

Description

@Machou

Description

Many constant missing in filter_var() function, php

Visual Studio Code Version : 1.70.0

Steps to Reproduce

Write this code :

<?php
// Validate filters
// https://www.php.net/manual/en/filter.filters.validate.php#filter.filters.validate

filter_var(true, FILTER_VALIDATE_BOOL);

filter_var('www.google.com', FILTER_VALIDATE_DOMAIN);
filter_var('www.google.com', FILTER_FLAG_HOSTNAME);
filter_var('[email protected]', FILTER_FLAG_EMAIL_UNICODE);
filter_var('00:00:5e:00:53:af', FILTER_VALIDATE_MAC);

// Sanitize filters
// https://www.php.net/manual/en/filter.filters.sanitize.php

filter_var('Is Peter <smart> & funny?', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
filter_var('foo "bar" !', FILTER_FLAG_NO_ENCODE_QUOTES);

// Filter flags
// https://www.php.net/manual/en/filter.filters.flags.php

filter_var('https://www.google��.co�m', FILTER_SANITIZE_RAW);

Examples

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions