Re: [PHP-DEV] [Discussion] Variable Type Declaration Before Usage

2023-11-06 Thread Marcos Marcolin
yVar); # The way out is Marcos myVar = True; print(myVar); # The output is True ``` As for Javascript, it doesn't even have type annotations, you need to use `JSDoc` to document, or use `Typescript` to use types. Hug. --- Marcos Marcolin Software Engineer | PHP www.marcosmarcolin.com.br

Re: [PHP-DEV] Short Function Syntax

2023-11-03 Thread Marcos Marcolin
, or `priv` instead of `private` in method or property declarations. Just an addition to your example and my opinion. I prefer to define all properties in the class, instead of using property promotion in the constructor, maybe I have a serious problem. --- *Marcos Marcolin* Software Engi

Re: [PHP-DEV] New RFC : empty() function

2023-10-31 Thread Marcos Marcolin
Hi Alessandro, It would be better to add syntax highlighting to the code examples of your RFC, it is not legal to read/understand the texts as if they were just texts. --- Marcos Marcolin Software Engineer | PHP www.marcosmarcolin.com.br

Re: [PHP-DEV] New RFC : empty() function

2023-10-30 Thread Marcos Marcolin
Hello, I understand that the idea of ​​the RFC is about some behaviors of empty(), e.g.: ```php $var = ''; var_dump(empty($var)); // true $var= []; var_dump(empty($var)); // true $var= 0; var_dump(empty($var)); // true var_dump(empty($empty)); // true $var= true; var_dump(empty($var)); // f