flow type question mark before or after param?

Basically

bar: ?string

accepts a string, null or void:

foo("test");
foo(null);
foo()

While

bar?: string

Accepts only a string or void:

foo("test");
foo();

As passing null instead of a string is somewhat senseless, theres no real life difference between them.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)