ed as (new Cl())->method();,
new (Cl()->method()); is very unusual and parenthesis can be always used
to enforce the intended precedence.
With kind regards / Mit freundlichen Grüßen / S přátelským pozdravem,
Michael Voříšek
ČVUT FEL
On 3 Dec 2020 07:45, Michał Marcin Brzuchalski wrote:
Hi Mi
w" operator has already the highest precedence, thus there
should be no conflict.
With kind regards / Mit freundlichen Grüßen / S přátelským pozdravem,
Michael Voříšek
ČVUT FEL
Intentionally?
It is an issue for static analysers...
With kind regards / Mit freundlichen Grüßen / S přátelským pozdravem,
Michael Voříšek
ČVUT FEL
with it.
Is it ok to introduce "master-passing" branch in official repo, that
will be updated at the very end by CI job triggered by push to "master"
branch?
With kind regards / Mit freundlichen Grüßen / S přátelským pozdravem,
Michael Voříšek
ČVUT FEL
On 30 Nov 2020 16:07, Nikita
237 | if (func->handler == ZEND_FN(display_disabled_function)) {
Thanks for help in advance.
With kind regards / Mit freundlichen Grüßen / S přátelským pozdravem,
Michael Voříšek
ČVUT FEL
uch more sooned until next php minor version has an alpha
release.
What is your opinion on this and is here someone that can implement it?
With kind regards / Mit freundlichen Grüßen / S přátelským pozdravem,
Michael Voříšek
ČVUT FEL
Hi everyone,
maybe a bad idea, but what about addressing the "Principle of least
astonishment" issue by allowing to specify/capture the variable after
the function is assigned:
$f = function () use ($f) {...};
With kind regards / Mit freundlichen Grüßen / S přátelským pozdravem,
Michael
Hi,
what about resolving directly to Closure?
strtoupper::function === \Closure::fromCallable('strtoupper').
$this->method::function === \Closure::fromCallable([$this, 'method']).
With kind regards / Mit freundlichen Grüßen / S přátelským pozdravem,
Michael Voříšek
On 8 Nov 2020 00:41,
4, Michael Voříšek - ČVUT FEL wrote:
I agree - "it's harder to imagine a scenario in real life where".
[...]
If we can agree, that implementation is not guaranteed to be called with
named parameters only, what real world usecase to defend this current
php behaviour is left?
Y
n in iface/parent class
With kind regards / Mit freundlichen Grüßen / S přátelským pozdravem,
Michael Voříšek
On 28 Oct 2020 17:39, Chase Peeler wrote:
On Wed, Oct 28, 2020 at 11:15 AM Michael Voříšek - ČVUT FEL wrote:
I agree - "it's harder to imagine a scenario in real life wher
rüßen / S přátelským pozdravem,
Michael Voříšek
On 28 Oct 2020 15:57, Rowan Tommins wrote:
On 28/10/2020 10:45, Michael Voříšek - ČVUT FEL wrote:
https://3v4l.org/X8omS parameters renamed, result with named parameters
is different
While it's easy to construct an example where this happens, it'
of OOP
inheritance at least)
With kind regards / Mit freundlichen Grüßen / S přátelským pozdravem,
Michael Voříšek
On 26 Oct 2020 15:36, Rowan Tommins wrote:
On 26/10/2020 13:12, Michael Voříšek - ČVUT FEL wrote:
I am writing regarding bug 80248.
Currently, PHP 8 allows parameter reuse
Hi,
I am writing regarding bug 80248.
Currently, PHP 8 allows parameter reuse at different position, which I
belive is very dangerous, as passed parameters may be passed in a
different order with different object impl. See https://3v4l.org/X8omS ,
which is against OOP and LSP.
I belive, we
Wdyt about dedicating "#" char for attributes?
We can deprecate comments with "#" in 8.0 or 8.1
and in later version support attributes with "#" single character -
without [] brackets, ie. support:
#Attribute1
#Attribte2
public function x()...
which will be equivalent to:
#[
Yes, "use (*)" is perfect!
With kind regards / Mit freundlichen Grüßen / S přátelským pozdravem,
Michael Voříšek
On 5 Oct 2020 11:57, Andreas Leathley wrote:
On 04.10.20 22:08, Rowan Tommins wrote:
If we added an opt-in syntax for "capture everything", we might
instead write this:
$f =
freundlichen Grüßen / S přátelským pozdravem,
Michael Voříšek
ČVUT FEL
On 23 Sep 2020 11:28, Michael Voříšek - ČVUT FEL wrote:
Hi,
can someone please verify https://bugs.php.net/bug.php?id=80125 and fix if possible?
With kind regards / Mit freundlichen Grüßen / S přátelským pozdravem,
Michael
Hi,
can someone please verify https://bugs.php.net/bug.php?id=80125 and fix
if possible?
With kind regards / Mit freundlichen Grüßen / S přátelským pozdravem,
Michael Voříšek
ČVUT FEL
, student
On 4 Sep 2020 20:14, David Rodrigues wrote:
Maybe you just can implements your own method to check? Like your exists()
example.
Em sex, 4 de set de 2020 15:08, Michael Voříšek - ČVUT FEL <
voris...@fel.cvut.cz> escreveu:
Your examples provide code for checking the existance o
not way (provided by php language) to check
for existance of magic property.
With kind regards / Mit freundlichen Grüßen / S přátelským pozdravem,
Michael Voříšek
On 4 Sep 2020 19:23, Marco Pivetta wrote:
Heya,
On Fri, Sep 4, 2020 at 7:03 PM Michael Voříšek - ČVUT FEL wrote:
isset() returns
isset() returns false for null
__isset() should return the same, but then if magic property with null
value exists, there is no way to detect it
Example: https://3v4l.org/GqUsh
this is currently an limitation of php
Ideally, we should introduce __exist() which should return true even if
The goal is to be able to access the original object and it's id/hash.
Usecases:
- something is associated with the object using the object id/hash and
it needs to be cloned as well
we need the original object to obtain it's id/hash for spl_object_id and
spl_object_hash methods
-
Hi, please look at
https://stackoverflow.com/questions/63675888/get-original-source-instance-in-clone
do you have anything against updating PHP to pass "instance before
cloned" to any __clone call from php?
no BC - user may accept this extra argument or declare function
__clone() without any
I like "void", as "null" can be ambiguous.
Imagine function example($a = 'default value 1', $b = 'default value 2')
{}
With "void", we can allow skipping arguments in advance to the default
pamameter value like example(void, 'test');.
With kind regards / Mit freundlichen Grüßen / S
PM Michael Voříšek - ČVUT FEL wrote:
Optimizing foreach (array_keys($arr) as $k) is very important, not only
because of memory, but because of speed when not all elements needs to
be iterated, like:
foreach (array_keys($arr) as $k) {
if ($k some condition) {
break;
}
}
Can
Optimizing foreach (array_keys($arr) as $k) is very important, not only
because of memory, but because of speed when not all elements needs to
be iterated, like:
foreach (array_keys($arr) as $k) {
if ($k some condition) {
break;
}
}
please, can someone send a PR for this?
The following code stopped working in PHP 8:
https://3v4l.org/UlIE3
is it a bug or a feature?
is posting issues like this to internals@lists.php.net email prefered
over opening bug directly? or is there any special email for it?
With kind regards / Mit freundlichen Grüßen / S přátelským
/ Mit freundlichen Grüßen / S přátelským pozdravem,
Michael Voříšek
On 20 Aug 2020 14:25, G. P. B. wrote:
Apologies for the double email, my client did something funcky.
On Thu, 20 Aug 2020 at 14:22, G. P. B. wrote:
On Thu, 20 Aug 2020 at 14:15, Michael Voříšek - ČVUT FEL wrote: Hi everyone
:
Den 2020-08-11 kl. 10:53, skrev Rowan Tommins:
On Tue, 11 Aug 2020 at 08:31, Michael Voříšek - ČVUT FEL <
voris...@fel.cvut.cz> wrote:
I am the author of https://github.com/php/php-src/pull/5961 , please
provide feedback.
This idea makes a lot of sense to me as a user (I'll leave co
Please add discussion about merge conflicts. Any inline grouped
attribute syntax needs a manual conflict resolution.
With ungrouped syntax, I expect recommended CS to be one attribute per
line.
If this should be the case also for grouped syntax, then it not +1
character, but +2 new lines
possibility to keep @@ and add @{} as a second syntax for attributes
+1, but I would keep same prefix, ie. @@{} (or @@[]), for both syntaxes,
it is much easier for human eyes to search for one thing, also easier
for grep
With kind regards / Mit freundlichen Grüßen / S přátelským pozdravem,
This seems almost as a bug, strict types should apply also for array key
which is currently not the case.
https://3v4l.org/epv5s
With kind regards / Mit freundlichen Grüßen / S přátelským pozdravem,
Michael Voříšek
On 17 Aug 2020 02:56, Josh Bruce wrote:
I'm sure this conversation has
, Michael Voříšek - ČVUT FEL wrote:
Hello,
I am lead developer in Atk4 project, see https://github.com/mvorisek , but you
are right, I need to be chosed by someoen with VCS account first.
You do not have a VCS account, so you do not qualify for the firstpart,, the
second part is existing people
I have one major issues with the examples.
Syntax Side by Side: The properties are annotated (with attributes)
inline which is the opposited of common usage now (with annotation).
Discussion on Grouping Pro/Cons: But since this depends on the coding
style the user... No, this should be
Hello,
based on https://wiki.php.net/rfc/voting voting access is offered to
people who:
- contributed to PHP source - I have made several smaller contributions
to php-src incl. + some core xdebug optimization
- lead developers of PHP based projects - I contributed to Symfony, Mink
and
I am for stopping the current voting too - because the results are very
different vs. the previous voting, they are almost random and the
discussion is still very hot which violates rule when voting can be
started.
My personal opinion on the attributes is:
- allow not grouped syntax (with @@
Another reason is that sleep(0.1); is silently accepted now (even with strict types enabled),
That appears to not be true: https://3v4l.org/7YbqX
corrected, should be "without strict types enabled" -
https://3v4l.org/A2olN
"even with strict type enabled" statement in BC section remains
Hi everyone,
I am the author of https://github.com/php/php-src/pull/5961 , please
provide feedback.
All details should be in the description, also, please advise if we can
consider it as a small change not requiring RFC as Nikita proposed in
his comment.
With kind regards / Mit
Hi all PHP gurus!
This is a feature request / RFC for the following use-case:
$res = [];
foreach ($arr as $i) {
foreach (make_res($i) as $v) {
$res[] = $v;
}
}
Array_merge in loop is very sloop so it is not a solution.
which I propose to shorten to:
$res = [];
foreach ($arr as $i) {
38 matches
Mail list logo