We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I saw public function map(array! data) in closures.md but as far as I can tell that exclamation mark is not explained elsewhere: https://github.com/search?q=repo%3Azephir-lang%2Fdocumentation%20!&type=code
public function map(array! data)
I believe it's declared here: https://github.com/zephir-lang/php-zephir-parser/blob/ac23688ea0283b713295950d57b23f08c8637cc0/parser/zephir.lemon#L776 comparing it to a normal one and the C function signature:
xx_ret_parameter(zval *ret, int const_param, zval *type, zval *cast, xx_parser_token *N, zval *default_value, int mandatory, int reference, xx_scanner_state *state) // type a xx_parameter(R) ::= xx_parameter_type(T) IDENTIFIER(I) . { xx_ret_parameter(&R, 0, &T, NULL, I, NULL, 0, 0, status->scanner_state); } // type! a xx_parameter(R) ::= xx_parameter_type(T) NOT IDENTIFIER(I) . { xx_ret_parameter(&R, 0, &T, NULL, I, NULL, 1, 0, status->scanner_state); }
So does this all mean public function map(array data) has an optional argument and public function map(array! data) has a required argument?
public function map(array data)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I saw
public function map(array! data)
in closures.md but as far as I can tell that exclamation mark is not explained elsewhere: https://github.com/search?q=repo%3Azephir-lang%2Fdocumentation%20!&type=codeI believe it's declared here: https://github.com/zephir-lang/php-zephir-parser/blob/ac23688ea0283b713295950d57b23f08c8637cc0/parser/zephir.lemon#L776 comparing it to a normal one and the C function signature:
So does this all mean
public function map(array data)
has an optional argument andpublic function map(array! data)
has a required argument?The text was updated successfully, but these errors were encountered: