Hi!
Just to reiterate, the previous implementation was also bad - it
returned an entirely undocumented and unexpected null value.
PHP functions always returned null on bad parameters, so it's not
exactly unexpected.
--
Stas Malyshev
smalys...@gmail.com
--
PHP Internals - PHP Runtime Developm
Hi Nikita,
> I've put up an RFC to make the handling of "null" arguments consistent
> between internal and user-defined functions:
>
> https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg
>
> I started an informal discussion for this change during the 7.4 cycle
> already, but decided t
On 03.12.2020 at 00:06, Rowan Tommins wrote:
> On 2 December 2020 22:38:13 GMT+00:00, "Björn Larsson"
> wrote:
>
>> One could add that here the PHP programmer need to do work that
>> basically
>> replicate how the code worked earlier for little gain.
>
> Just to reiterate, the previous implement
On 2 December 2020 22:38:13 GMT+00:00, "Björn Larsson"
wrote:
>One could add that here the PHP programmer need to do work that
>basically
>replicate how the code worked earlier for little gain.
Just to reiterate, the previous implementation was also bad - it returned an
entirely undocumented a
Den 2020-12-01 kl. 20:57, skrev Stanislav Malyshev:
Hi!
Is a warning fine because null bytes indicate a potential attack as
in no
sane context should null bytes be passed around?
A warning is fine because it does what it's supposed to do - fails the
is_file check (which is literally only t
Am 02.12.2020 um 18:24 schrieb Florian Stascheck :
> I suggest to allow string keys to also be used in array literals:
>
> $template = ['created_at' => time(), 'is_admin' => 1];
> $db_rows = [
> ['name' => 'Alice', 'email' => 'al...@example.org', ...$template],
> ['name' => 'Bob', 'email' => 'b.
On Wed, Dec 2, 2020, at 2:18 AM, Christian Schneider wrote:
> Am 01.12.2020 um 21:13 schrieb Reindl Harald (privat) :
> > Am 01.12.20 um 21:09 schrieb Stanislav Malyshev:
> >>> we are running error_reporting E_ALL for 17 years now and don't
> >>> distinct between notice / warning / error, it has to
Hello,
IMHO it’s only a declaration issue.
In other terms, if documentation of strlen says:
strlen ( string $string ) : int
then I mean that $string MUST be a string, and return value MUST be an int.
But then we found that if $string is null, zero is returned. If $string is an
array, null is
Hi devs,
currently new Cl() must be wrapped in parentheses if that object is
further used to call it's method like (new Cl())->method().
It there any reason why not to allow new Cl()->method() ?
Based on https://www.php.net/manual/en/language.operators.precedence.php
- the "new" operator ha
>
> The reason why this has been deferred is because of which semantics should
> be used for duplicate string keys.
>
> Do we use the addition between two arrays semantics or the array_merge()
> semantics? See: https://3v4l.org/7QbWv
>
> As the previous RFC you linked initially wanted to use the
On Wed, Dec 2, 2020 at 10:46 AM G. P. B. wrote:
> The reason why this has been deferred is because of which semantics should
> be used for duplicate string keys.
>
> Do we use the addition between two arrays semantics or the array_merge()
> semantics? See: https://3v4l.org/7QbWv
array_merge is th
On Wed, 2 Dec 2020 at 17:24, Florian Stascheck
wrote:
> Hello!
>
> With PHP8 released and the named arguments RFC being implemented, there's
> now an inconsistency in how the spread operator works.
>
> Historically, the spread operator was first used in PHP 5.6 for arguments:
>
> function php56($
Hello!
With PHP8 released and the named arguments RFC being implemented, there's
now an inconsistency in how the spread operator works.
Historically, the spread operator was first used in PHP 5.6 for arguments:
function php56($a, $b) {
return $a + $b;
}
$test = [1, 2];
php56(...$test) === 3;
Hi internals
The XMLReader object only allows a file name in the constructor and the
open() method. While this is OK most of the time, files stored at cloud
services not accessible via an URL must be downloaded first. For big
files (e.g 100MB to 1GB and more), this requires a lot of time and
resou
On 02.12.2020 at 17:34, Silvio Sparapano wrote:
> Hello,
> IMHO it’s only a declaration issue.
>
> In other terms, if documentation of strlen says:
>
> strlen ( string $string ) : int
>
> then I mean that $string MUST be a string, and return value MUST be an int.
>
> But then we found that if $str
On Wed, Dec 2, 2020 at 3:14 PM Benjamin Morel
wrote:
> Thanks for the pointer, Nikita.
>
> I think the updated example (using `error_reporting() & $errno`) fails to
> mimic exactly what `error_reporting() === 0` did, though.
>
> Say your php.ini mutes E_WARNING, for example:
>
> error_reporti
Thanks for the pointer, Nikita.
I think the updated example (using `error_reporting() & $errno`) fails to
mimic exactly what `error_reporting() === 0` did, though.
Say your php.ini mutes E_WARNING, for example:
error_reporting = E_ALL & ~E_WARNING
Checking for `error_reporting() === 0` allo
On Wed, Dec 2, 2020 at 2:56 PM Benjamin Morel
wrote:
> Hi internals,
>
> Since PHP 8.0, `error_reporting()` started returning a non-zero value when
> the @ silence operator is used.
>
> Demo: https://3v4l.org/CovYv
>
> Is this intentional? This breaks scripts that converted all errors to
> except
Hi internals,
Since PHP 8.0, `error_reporting()` started returning a non-zero value when
the @ silence operator is used.
Demo: https://3v4l.org/CovYv
Is this intentional? This breaks scripts that converted all errors to
exceptions, except those where the silence operator was used:
set_error
On 02.12.2020 at 13:21, Hans Henrik Bergan wrote:
> so.. will the imagecreatefromstring() thing be fixed in 8.0.1 or 8.1.0 ?
This will be fixed in 8.0.1.
Christoph
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php
so.. will the imagecreatefromstring() thing be fixed in 8.0.1 or 8.1.0 ?
On Wed, 2 Dec 2020 at 10:57, Nikita Popov wrote:
>
> On Wed, Dec 2, 2020 at 10:21 AM Aimeos | Norbert Sendetzky <
> norb...@aimeos.com> wrote:
>
> > Am 01.12.20 um 18:24 schrieb Christoph M. Becker:
> > > On 01.12.2020 at 18
On Wed, Dec 2, 2020 at 10:21 AM Aimeos | Norbert Sendetzky <
norb...@aimeos.com> wrote:
> Am 01.12.20 um 18:24 schrieb Christoph M. Becker:
> > On 01.12.2020 at 18:18, Aimeos | Norbert Sendetzky wrote:
> >
> >> PHP 8 is stricter in checking input data then PHP 7. This is good but
> >> has some sid
Am 01.12.20 um 18:24 schrieb Christoph M. Becker:
> On 01.12.2020 at 18:18, Aimeos | Norbert Sendetzky wrote:
>
>> PHP 8 is stricter in checking input data then PHP 7. This is good but
>> has some side effects for is_file(), is_dir() and similar functions when
>> invalid paths are passed for check
Am 02.12.20 um 09:18 schrieb Christian Schneider:
Am 01.12.2020 um 21:13 schrieb Reindl Harald (privat) :
Am 01.12.20 um 21:09 schrieb Stanislav Malyshev:
we are running error_reporting E_ALL for 17 years now and don't
distinct between notice / warning / error, it has to be fixed -
period
S
Am 01.12.2020 um 21:13 schrieb Reindl Harald (privat) :
> Am 01.12.20 um 21:09 schrieb Stanislav Malyshev:
>>> we are running error_reporting E_ALL for 17 years now and don't
>>> distinct between notice / warning / error, it has to be fixed -
>>> period
>> Surely you do. Your code continues to run
25 matches
Mail list logo