Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
public\sfunction\sset(.*[(])(?!\?)(?'type'string|int|array|float)
/
gm

Description

Easy to use in PHPStorm regex that make scalar typed first parameter of setters nullable

Submitted by anonymous - 6 years ago