[PHP-DEV] Manual unset and GC

2025-03-10 Thread Vinicius Dias
Hello, folks. If this is not the correct place to ask, I apologize. > TL;DR: Does setting a variable to `null` (or even `unset`ing it) have **any** > effect if that's the last instruction of a function? The full version of the question with context: I have a question about the inner workings of

Re: [PHP-DEV] Multiple property assigning without constructor

2024-12-04 Thread Vinicius Dias
> But often classes need constructors only to set properties. In such cases, > constructors become redundant. Actually, the behavior is not the same and the constructors are not redundant. Taking your example: ``` class Person { public string $firstName; public int $age; } $person = new

Re: [PHP-DEV] RFC idea: using the void type to control maximum arity of user-defined functions

2024-04-04 Thread Vinicius Dias
> I like this concept, but instead of introducing a new syntax, have you > considered leveraging attributes in the same way that PHP 8.3 > introduced #[Override]? > > #[Nonvariadic] > function foo () {} > foo(42); // warning: foo() expects exactly 0 arguments, 1 given > > I think the intent would b

Re: [PHP-DEV] FFI in PHAR files

2023-12-19 Thread Vinicius Dias
> If you choose not to use a phar, but instead, just loose PHP files, it > extracts the sources to a random `/tmp` directory when executing. So, > FFI and other things should "just work" without any shenanigans. > > Robert Landers > Software Engineer > Utrecht NL Thank you for the suggestion. The

Re: [PHP-DEV] FFI in PHAR files

2023-12-18 Thread Vinicius Dias
> > I suppose it'd be possible to improve FFI to call the PHP VFS layer to > > resolve a path, which would handle the phar:// scheme and other schemes. > > But, I would be worried about potential other downstream impacts - esp. > > security implications - as this is a novel (to me at least) scen

Re: [PHP-DEV] PHP test coverage

2023-12-08 Thread Vinicius Dias
> The code coverage report can be found at > https://app.codecov.io/github/php/php-src Ah, perfect. Thank you for sharing. I will take a closer look after work, but something seems weird to me. Here[1] you see that ctype_alpha seems to be uncovered, but here[2] we can see that it's tested. [1]:

[PHP-DEV] PHP test coverage

2023-12-07 Thread Vinicius Dias
PHP doc article about writing tests [1] mentions gcov.php.net as the source to see the coverage, but this address is not available anymore. I believe this should be updated to show how the coverage can be found so people know where to focus their efforts if they want to contribute with tests. [1]

Re: [PHP-DEV] Short Function Syntax

2023-11-02 Thread Vinicius Dias
I honestly don't see any benefits. `function` isn't verbose, it's explicit. I prefer `function` over `fn` for methods. But despite what one may prefer, I believe changing the language syntax just because of "taste" probably isn't worth the effort. -- PHP Internals - PHP Runtime Development Maili

Re: [PHP-DEV] Proposal to unbundle imap/pspell/oci8 extensions for PHP 8.4

2023-09-13 Thread Vinicius Dias
or reading e-mails. They are not equivalent. Am I missing something here? Vinicius Dias, Zend Certified Engineer, iMasters PHP Certified Professional Em qua., 13 de set. de 2023 às 05:50, Derick Rethans escreveu: > > Hi, > > In a recent chat between the PHP Foundation developers, we discuss

Re: [PHP-DEV] FFI in PHAR files

2023-09-08 Thread Vinicius Dias
ot; being supported. Vinicius Dias, Zend Certified Engineer, iMasters PHP Certified Professional Vinicius Dias, Zend Certified Engineer, iMasters PHP Certified Professional Em sex., 8 de set. de 2023 às 16:55, Bishop Bettini escreveu: > > On Fri, Sep 8, 2023 at 2:33 PM Vinicius Dias wr

[PHP-DEV] FFI in PHAR files

2023-09-08 Thread Vinicius Dias
have setup a dummy repo so the error could be easily reproduced: https://github.com/CViniciusSDias/ffi-phar-problem I am sorry if this is not the list to send this type of problem. I will gladly move the thread to the right one if someone points it out. Thanks, folks. Vinicius Dias, Zend Cert

Re: [PHP-DEV] PASSWORD_DEFAULT value

2023-09-06 Thread Vinicius Dias
at totally answers the question of why the default is still bcrypt. Thank you both for replying. [1] https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html Vinicius Dias, Zend Certified Engineer, iMasters PHP Certified Professional Em qua., 6 de set. de 2023 às 1

[PHP-DEV] PASSWORD_DEFAULT value

2023-09-06 Thread Vinicius Dias
Hey there, folks! I was wondering here... Is there any reason for `PASSWORD_DEFAULT`'s value not to be `PASSWORD_ARGON2ID`? Would that change require an RFC? -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

[PHP-DEV] session_regenerate_id concurrency problems

2023-07-07 Thread Vinicius Dias
Hello, internals. I hope you all are well. The documentation page for the `session_regenerate_id`[1] function has the following warning: > **Warning** Currently, session_regenerate_id does not handle an unstable network well, e.g. Mobile and WiFi network. Therefore, you may experience a lost sess

[PHP-DEV] session_regenerate_id concurrency problems

2023-07-06 Thread Vinicius Dias
Hello, internals. I hope you all are well. The documentation page for the `session_regenerate_id`[1] function has the following warning: > **Warning** Currently, session_regenerate_id does not handle an unstable network well, e.g. Mobile and WiFi network. Therefore, you may experience a lost sess

Re: [PHP-DEV] Possible RFC: PDOStatement::addBatch

2023-06-16 Thread Vinicius Dias
external library is out of their reality. Having an `addBatch` method in PHP's core would definitely help them write a better and more performatic code. I once again appreciate the attention and the replies. Vinicius Dias. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

[PHP-DEV] Possible RFC: PDOStatement::addBatch

2023-06-13 Thread Vinicius Dias
ed). I am looking forward to hearing back your comments on this. Thank you very much, Vinicius Dias. [1]: https://docs.oracle.com/en/java/javase/20/docs/api/java.sql/java/sql/Statement.html#addBatch(java.lang.String) -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php