On 19.06.25 18:55, Hans Henrik Bergan wrote:
On Thu, Jun 19, 2025, 18:24 Ben Ramsey wrote:
> On Jun 19, 2025, at 11:08, Calvin Buckley wrote:
>
> On Jun 19, 2025, at 11:08 AM, Marc Bennewitz
wrote:
>>
>> Hi,
>>
>> During t
On 20.06.25 10:15, Hans Henrik Bergan wrote:
On Fri, 20 Jun 2025 at 09:15, Marc Bennewitz wrote:
On 19.06.25 18:08, Calvin Buckley wrote:
I think the biggest arguments against this would be:
- embedded systems; think of PHP in use for i.e. router web UIs. While I
suspect a lot of these are
On 19.06.25 18:08, Calvin Buckley wrote:
I think the biggest arguments against this would be:
- embedded systems; think of PHP in use for i.e. router web UIs. While I
suspect a lot of these are going to be i.e. AArch64/RV64 in the future,
there might be a long tail of existing systems. Of cours
Hi,
During the discussion about the year 2038 issue it turned out that maybe
it's time to drop support for 32-bit of PHP completely.
Based on that I have created an RFC to deprecate 32-bit build in 8.next
and drop support for it in 9.
RFC: https://wiki.php.net/rfc/drop_32bit_support
Ope
On 16.06.25 19:01, Yogarine wrote:
Hi all,
On 16 Jun 2025, at 17:24, Rob Landers wrote:
On Mon, Jun 16, 2025, at 16:54, Alexandru Pătrănescu wrote:
On Mon, Jun 16, 2025 at 4:03 PM Marc Bennewitz wrote:
Hi all,
It's 12.5 years only until the timestamps in PHP on 32bit will not wo
On 16.06.25 17:21, Rob Landers wrote:
On Mon, Jun 16, 2025, at 16:54, Alexandru Pătrănescu wrote:
On Mon, Jun 16, 2025 at 4:03 PM Marc Bennewitz wrote:
Hi all,
It's 12.5 years only until the timestamps in PHP on 32bit will
not work
as expected anymore.
Hi,
I think
On 16.06.25 16:16, Kamil Tekiela wrote:
Why do you say that these functions do not work with year 2038?
https://3v4l.org/61VLh
I wouldn't be opposed to deprecating them, but I don't know if we have
a good enough reason to do so.
https://3v4l.org seems to be 64bit now ;) -> https://3v4l.org/1F
Hi all,
It's 12.5 years only until the timestamps in PHP on 32bit will not work
as expected anymore.
The DateTime[Immutable] classes use 64bit integers internally already
but there are still a couple of places where this is an issue in the API
due to PHP integer limit:
Based on that I pers
s you noted in your RFC:
> On the other hand, there is no shortage of dumb things that people
can do with PHP already. The exact same silliness could be implemented
using |__get|, for instance. ...
--Larry Garfield
Thanks,
Marc
OpenPGP_0x3936ABF753BC88CE.asc
Description: OpenPGP public key
OpenPGP_signature.asc
Description: OpenPGP digital signature
ed to not end up in a situation that such optimization would be useful but can't be applied as of this feature.Kind Regards,Volker
Regards,Marc
Hi Tim,
Unintentionally, I first replied to Tim only but it was meant to be send
to the list.
On 07.02.25 16:11, Tim Düsterhus wrote:
Hi
Am 2025-02-07 16:03, schrieb Marc Bennewitz:
Is that something feasible and how complicated would that be to
implement?
Supporting this might cause
>name, 3);
}
}
Means, allowing get-only property hooks on enums reducing the need to
write "old school" getter methods.
Is that something feasible and how complicated would that be to implement?
Best,
Marc Bennewitz
OpenPGP_0x3936ABF753BC88CE.asc
Description: OpenPGP public key
ould be:
$value is int and &$x
Which removes the confusion you mentioned before (also for someone
like me who uses bitwise-and quite a bit).
— Rob
Is it possible to use the already added "is", like:
$arr is ['a' => $a, 'b' => is $b]
Or, to use the already known uniform variable syntax "{$var}", like:
$arr is ['a' => $a, 'b' => {$b}]
Best,
Marc
OpenPGP_0x3936ABF753BC88CE.asc
Description: OpenPGP public key
OpenPGP_signature.asc
Description: OpenPGP digital signature
al one in
this case)
Additionally, if you really what to compare empty vs. non empty you can
use empty to make it explicit.
Marc
OpenPGP_0x3936ABF753BC88CE.asc
Description: OpenPGP public key
OpenPGP_signature.asc
Description: OpenPGP digital signature
What do you think?
Does that make sense?
Is that implementable?
Marc
OpenPGP_0x3936ABF753BC88CE.asc
Description: OpenPGP public key
OpenPGP_signature.asc
Description: OpenPGP digital signature
y ask if this can be merged to be included in 8.4
or if I should do something else?
[1] https://github.com/php/php-src/issues/13773
[2] https://github.com/php/php-src/pull/14581
Thanks,
Marc
OpenPGP_0x3936ABF753BC88CE.asc
Description: OpenPGP public key
OpenPGP_signature.asc
Description: Op
y be beneficial to have this sooner than later.
What do you think?
Best regards,
Gina P. Banyard
Best,
Marc
OpenPGP_0x3936ABF753BC88CE.asc
Description: OpenPGP public key
OpenPGP_signature.asc
Description: OpenPGP digital signature
ching
which opens up another question: Could we have an interface allowing
objects to match in a specific way?
interface Matchable {
public function match(mixed $value): bool;
}
Thanks for working on it!
Marc
OpenPGP_0x3936ABF753BC88CE.asc
Description: OpenPGP public key
OpenPGP_signature.asc
Description: OpenPGP digital signature
Am 11.05.2024 11:09 schrieb Niels Dossche :On 11/05/2024 08:38, Marc B. wrote:
> Hi Niels,
>
> Am 10.05.2024 19:38 schrieb Niels Dossche :
>
> On 10/05/2024 16:31, Larry Garfield wrote:
> > On Fri, May 10, 2024, at 2:03 PM, Niels Dossche wrote:
> >&
tantiated object. What does it open?And what happens on calling openStream in a middle of reading/writing an XML document.What happens on calling openStream stream after calling open - does it read/write from/to both?Best,Marc
Kind regards
Niels
ldProp); // string(0) ""
$t->oldProp = 'bar';
var_dump($t); // { ["newProp"]=> string(10) "backed:bar" }
var_dump($t->newProp); // string(3) "bar"
var_dump($t->oldProp); // string(0) ""
Kind regards,
Marc
OpenPGP_0x3936ABF753BC88CE.asc
Description: OpenPGP public key
OpenPGP_signature.asc
Description: OpenPGP digital signature
Hi internals,
On 17.03.24 13:23, Marc Bennewitz wrote:
Hello internals,
I have opened the vote for the "Rounding Integers as int" RFC:
https://wiki.php.net/rfc/integer-rounding
Do to Easter weekend the vote will run for two weeks and two days
until Tue the 2nd of April 2024.
T
Hi Bob, and sorry for the late reply ...
On 19.03.24 01:05, Bob Weinand wrote:
Hey Marc,
On 18.3.2024 08:53:01, Marc Bennewitz wrote:
Hi Bob,
On 17.03.24 14:59, Bob Weinand wrote:
On 17.3.2024 13:23:04, Marc Bennewitz wrote:
Hello internals,
I have opened the vote for the "Rou
value." this is already noted in the RFC and the
functions will be a no-op in this case.
Best regards,
Marc
OpenPGP_0x3936ABF753BC88CE.asc
Description: OpenPGP public key
OpenPGP_signature.asc
Description: OpenPGP digital signature
Hi Bob,
On 17.03.24 14:59, Bob Weinand wrote:
On 17.3.2024 13:23:04, Marc Bennewitz wrote:
Hello internals,
I have opened the vote for the "Rounding Integers as int" RFC:
https://wiki.php.net/rfc/integer-rounding
Do to Easter weekend the vote will run for two weeks and two days
On 17.03.24 14:10, Tim Düsterhus wrote:
Hi
On 3/17/24 13:23, Marc Bennewitz wrote:
I have opened the vote for the "Rounding Integers as int" RFC:
https://wiki.php.net/rfc/integer-rounding
Please also update the Status within the RFC itself and move it to the
correct section
Hello internals,
I have opened the vote for the "Rounding Integers as int" RFC:
https://wiki.php.net/rfc/integer-rounding
Do to Easter weekend the vote will run for two weeks and two days until Tue the
2nd of April 2024.
Best regards,
Marc Bennewitz
OpenPGP_0x3936ABF753
, the return value has the same type as /number/.
... but in python int is limited only by memory and not by the type
which makes it very different.
I have added a description and updated example in the RFC.
Best,
Marc
OpenPGP_0x3936ABF753BC88CE.asc
Description: OpenPGP public key
OpenPGP_signature.asc
Description: OpenPGP digital signature
}
That do you think?
This is just something that come to mind without having the knowledge
nor time for this kind of RFC or implementation.
Greetings,
Marc
0 via new parameter
"force_float".
Also the deprecation has been removed as nobody liked it.
If no further comments arrive I'll like to start voting next week Friday.
Best regards,
Marc
On 25.02.24 18:09, Marc Bennewitz wrote:
Hi all,
I now have updated the RFC to allow to opt-i
Hi all,
I now have updated the RFC to allow to opt-in to new behavior on PHP 8.4
and be able to opt-out to previous behavior in PHP 9.0 via new parameter
"force_float".
Also the deprecation has been removed as nobody liked it.
Best regards,
Marc
On 26.09.23 12:39, Marc Bennewitz
n your RFC.
About `fpow` - I personally never felled the need to use `fdiv` but as
`fdiv` was explicitly introduced to expose IEEE-754 semantics I think it
totally makes sense to add `fpow` as well.
Greetings,
Marc
Kind regards,
Jorg
OpenPGP_0x3936ABF753BC88CE.asc
Description: OpenPGP
ambiguous. What happens if you declare
`set($field) {}` ? Does such construct let the engine set the property
value immediately as the input value gets immediately assigned to the
property via $field?
Greetings,
Marc
OpenPGP_0x3936ABF753BC88CE.asc
Description: OpenPGP public key
OpenPGP_signature.asc
Description: OpenPGP digital signature
On 20.02.24 09:58, Derick Rethans wrote:
On 20 February 2024 08:41:19 GMT, Marc Bennewitz wrote:
Hi Hans,
On 16.02.24 13:05, Hans Henrik Bergan wrote:
My name is "Hans Henrik Bergan", usually go by the nickname
"divinity76", I've contributed to OSS (includi
on
defined parts needs to be explicitly reset using `|!`
* leap seconds support on UTC TZ
* As of leap seconds ... wouldn't it be better to default to +00:00
instead of UTC ?
* Support nanoseconds
I'm for sure not able to work on all these points and that's why I only
started
On 29.10.23 19:41, Marc wrote:
Hi Saki,
On 28.10.23 18:32, Saki Takamachi wrote:
Hi Marc,
On a 64bit system it's obvious to have higher precision if you
handle the integer and fractions part separately (as timelib does)
but this doesn't help if you already have a floating point
Hi Saki,
On 28.10.23 18:32, Saki Takamachi wrote:
Hi Marc,
On a 64bit system it's obvious to have higher precision if you handle the
integer and fractions part separately (as timelib does) but this doesn't help
if you already have a floating point number at hand. Also JS use
On 28.10.23 17:33, Rowan Tommins wrote:
On 28 October 2023 15:40:29 BST, Saki Takamachi wrote:
Hi Marc,
Personally, I don't think these are necessarily necessary since there is a "from
format".
As noted on the PR, both the default constructor and createFromFormat require
):DateTime
date_create_immutable_from_timestamp(int|float$timestamp):DateTimeImmutable
I hope this does not require an RFC, but I'm not sure so I'm writing
here to get some thoughts.
Thanks,
Marc
id(mixed $var): bool
$refl = ReflectionClass(UserId::class);
$refl = ReflectionType::from(UserId::class);
...
Best,
Marc
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php
years ago Sara was working on it, too ;)
https://externals.io/message/21883
Jordan
Best,
Marc
OpenPGP_0x3936ABF753BC88CE.asc
Description: OpenPGP public key
OpenPGP_signature.asc
Description: OpenPGP digital signature
Hi,
On 26.09.23 12:39, Marc Bennewitz wrote:
Hi internals
I'd like to put a new RFC under discussion:
https://wiki.php.net/rfc/integer-rounding
Best,
Marc
Based on the discussion I see two groups. The one that would like to
change this behavior without message (bug fix) and others tha
not outweigh it's overhead. On the same
time the results can be improved without adding overhead.
Regards
Jakub
Best,
Marc
OpenPGP_0x3936ABF753BC88CE.asc
Description: OpenPGP public key
OpenPGP_signature.asc
Description: OpenPGP digital signature
gister all functions? Also
what would happen in this case with functions included later? Would they
also be callable or only the functions known at the point of registering?
Best regards
Tim Düsterhus
Cheers
Niels
Best,
Marc
Hi Robert,
On 13.10.23 13:44, Robert Landers wrote:
On Fri, Oct 13, 2023 at 1:26 PM Jakub Zelenka wrote:
On Tue, Sep 26, 2023 at 11:39 AM Marc Bennewitz wrote:
Hi internals
I'd like to put a new RFC under discussion:
https://wiki.php.net/rfc/integer-rounding
I would personally pre
Hi Jakub,
On 13.10.23 13:25, Jakub Zelenka wrote:
On Tue, Sep 26, 2023 at 11:39 AM Marc Bennewitz wrote:
Hi internals
I'd like to put a new RFC under discussion:
https://wiki.php.net/rfc/integer-rounding
I would personally prefer a new function for rounding integers if anyone
wan
Hi Tim,
On 05.10.23 21:57, Tim Düsterhus wrote:
Hi
On 10/4/23 08:35, Marc Bennewitz wrote:
As far as I understand you are in favor of option 1. (considering it a
bugfix) but how do you make sure this will not lead to different
application behavior overlooked on upgrading? Also there is no way
Hi George,
On 05.10.23 14:12, G. P. B. wrote:
On Thu, 5 Oct 2023 at 07:40, Marc Bennewitz wrote:
I don't see a bug or broken behavior here as these functions were
processing floating point numbers since forever.
https://3v4l.org/PrrmO
That's not my point, the point is
On 05.10.23 01:38, G. P. B. wrote:
On Tue, 26 Sept 2023 at 11:39, Marc Bennewitz wrote:
Hi internals
I'd like to put a new RFC under discussion:
https://wiki.php.net/rfc/integer-rounding
I don't understand the point of the deprecation phase at all.
Frankly, I consider this RFC
Hi,
On 03.10.23 14:41, Tim Düsterhus wrote:
Hi
On 9/30/23 08:26, Marc Bennewitz wrote:
The deprecation would act as an information for upcoming behavior
change, not classical deprecation of future removal. If the new behavior
is what you want, than you don't need to change anything
om 2013 : https://wiki.php.net/rfc/gmp_number (never
put to vote).
Also I think to remember about a proposal to have GMP natively supported
for numbers in PHP but I can't find it anymore.
Kind regards,
Jorg
Best,
Marc
Hi,
On 26.09.23 12:39, Marc Bennewitz wrote:
I'd like to put a new RFC under discussion:
https://wiki.php.net/rfc/integer-rounding
I tried to make the RFC text a bit more clear.
As I'm not a native English speaker I would be very welcome for wording
suggestions and/or gra
Hi Tim,
On 29.09.23 17:28, Tim Düsterhus wrote:
Hi
On 9/26/23 12:39, Marc Bennewitz wrote:
I'd like to put a new RFC under discussion:
https://wiki.php.net/rfc/integer-rounding
I find the proposal reasonable, but I don't like the deprecation
proposal, because it does not allow
rom the content of the passed source but what happens is the
source does not contain any information about the encoding?. E.g. you
load an XML/HTML document over HTTP, the encoding is defined via HTTP
header but the content itself doesn't contain it.
Kind regard
Hi Saki,
On 27.09.23 02:18, Saki Takamachi wrote:
Hi, Marc.
There is one additional case to consider.
It's backwards compatible.
If `strict_types` is not `1`, the code currently out there may be passing `int`
to these functions.
Therefore, it is better to be aware that such code can
Hi Larry,
On 26.09.23 20:41, Larry Garfield wrote:
On Tue, Sep 26, 2023, at 10:39 AM, Marc Bennewitz wrote:
Hi internals
I'd like to put a new RFC under discussion:
https://wiki.php.net/rfc/integer-rounding
Best,
Marc
I'm honestly kind of confused by this. The basic con
Hi internals
I'd like to put a new RFC under discussion:
https://wiki.php.net/rfc/integer-rounding
Best,
Marc
OpenPGP_0x3936ABF753BC88CE.asc
Description: OpenPGP public key
OpenPGP_signature
Description: OpenPGP digital signature
ndpwd
Please could you help me what I have to do to back login.
Thanks,
Marc
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php
ether?
Anyway even without ":+" or chaining it would be a very good addition :+1:
Thanks,
Marc
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php
Hi internals,
As commented in thread of "rounding integers" [1], I have opened a PR
[2] for fully supporting formatting integers using "number_format"
without any precision loss.
Additionally, on working on it, I noticed a possible integer overflow on
|$decimals |argument of the current func
Hi,
I noticed a deprecation of passing invalid characters to bindec since
PHP 7.4 which is still deprecated and does not result in an error.
Haven't checked the other affected functions of this RFC.
https://3v4l.org/Bqj5B
Is anyone taking care to remove this in 9.0?
Thanks,
Marc
-
after rounding.
Thanks,
Marc
[1]
https://github.com/php/php-src/compare/master...marc-mabe:php-src:integer_rounding
if there are no objections, Ilija has agreed to merge this for master.
We will of course document this accordingly.
Thanks,
Marc
OpenPGP_0x3936ABF753BC88CE.asc
Description: OpenPGP public key
OpenPGP_signature
Description: OpenPGP digital signature
On 08.06.23 13:16, G. P. B. wrote:
On Thu, 8 Jun 2023 at 07:35, Marc wrote:
sorry for speaking up so late but I think the following change is a
mistake and unexpected:
> Calls to range() that have integer boundaries but a float step that
is compatible as an integer will now return
value of the step.
range(1, 5, 2.0) // list range(1, 5, 2.1) // list
In my opinion, no matter, if start, end or step is a float the result
should be a list.
Thanks,
Marc
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php
On 21.05.23 17:20, Larry Garfield wrote:
On Sun, May 21, 2023, at 7:18 AM, Rowan Tommins wrote:
On 21 May 2023 13:00:30 BST, Dan Ackroyd wrote:
On Sun, 21 May 2023 at 06:16, Marc wrote:
Do you think this could be an acceptable BC-break
No. Suggesting changing a 30 year old maths
the given type
and proper handle integers as well:
> round — Rounds a number
/** @template T of int|float */
round(T $num, int $precision = 0, int $mode = PHP_ROUND_HALF_UP): T
Do you think this could be an acceptable BC-break or should this be a
different function?
Thanks,
Marc
as constant value as well.
enum IdPrefix:string
{
case USER_ID = 'u-';
// ...
}
class UserId extends AbstractPrefixedUid
{
public const PREFIX = IdPrefix::USER_ID->value;
}
Greetings,
Marc
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php
but as we already have
`quote` it would be preferable to name it `quoteIdentifier` or how would
you explain the difference between `quote` and `escapeIdentifier`?
Thanks
Marc
cheers
Dan
Ack
s there is no type for it and the issue of converting an
empty array from/to JSON (is it a list or a map?).
The big difference, of course, is the by-ref vs. by-value.
Hope that's not stupid questions?
Greetings,
Marc
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php
ry to me to pass min/max arguments if you are just interested
in a random integer or passing max as well if you are interested in a
positive integer only.
Thanks for the nice RFC!
Regards,
Go Kudo
Marc
On 8/13/21 4:56 PM, Nikita Popov wrote:
On Thu, Aug 12, 2021 at 9:16 PM Marc wrote:
Hi,
As 8.1 adds readonly properties I wonder which build-in properties
should be defined readonly.
Currently I could find build-in readonly properties only on PDO and DOM.
Very incomplete list where
2;
var_dump($interval->days); // 0
3. Exception properties
Exception properties are protected but does it really make sense to be
able to modify an exception property after initialization?
I know this would be a BC break :(
Thanks for all the excellent work - Can't wait for 8.1
lizable nor do we
have generics to define an enum set of a specific type (ala EnumSet).
Marc
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php
On 18.06.21 08:00, Craig Francis wrote:
On Wed, 16 Jun 2021 at 18:24, Craig Francis
wrote:
On Sat, 12 Jun 2021 at 18:00, Craig Francis
wrote:
I'd like to start the discussion on the is_literal() RFC:
https://wiki.php.net/rfc/is_literal
Following up on the is_literal() RFC, thanks for th
On 17.03.21 09:36, Ilija Tovilo wrote:
Hi Marc
I think it would
be much clearer if there would be two different interfaces like:
``` interface IntEnum extends UnitEnum { public int $value; public
static function from(int$value): static; public static function
tryFrom(int$value): ?static
Hi Ilija - thanks for your answers
On 14.03.21 23:18, Ilija Tovilo wrote:
Hi Marc
Thanks for testing the enum feature.
Hi I'm trying out the new enumeration support for PHP 8.1 using
https://github.com/php/php-src/pull/6489 thought to implement a polyfill
based on class constant
s, Wordpress and so on) makes this a
potential future with wide adoption. If you'd get 2/3 votes for it is
another topic.
I can fully agree here - this would be very useful and I also thought in
trying out something similar to wrap expensive functions by a cache but
I don't have e
ching the string representation instead of
TypeError as it matches the defined argument types. Thoughts? Thanks, Marc
m
instead of two next/64 methods or limiting it?
Like:
* class MT19937(system depending)
* class MT19937_32 (32bit version)
* class MT19937_64 (64bit version - not available on 32bit)
This way the user can take the algorithm that matches best his requirements.
Marc
Regards,
Nikita
--
PH
Hi Ilija,
On 03.01.21 12:54, Ilija Tovilo wrote:
Hi Marc
I don't have a really good use-case for float values. It just seems
weird to me that a ScalarEnum doesn't support all scalars.
Using the enum value as array key for `cases()` works with your current
proposal but if we lat
On 03.01.21 11:56, Marc wrote:
> On 29.12.20 16:42, Larry Garfield wrote:
>> On Tue, Dec 29, 2020, at 2:48 AM, Marc wrote:
>>> On 28.12.20 21:21, Larry Garfield wrote:
>>>> Hello, Internalians!
>>>>
>>>> After considerable discussion and effor
On 29.12.20 16:42, Larry Garfield wrote:
> On Tue, Dec 29, 2020, at 2:48 AM, Marc wrote:
>> On 28.12.20 21:21, Larry Garfield wrote:
>>> Hello, Internalians!
>>>
>>> After considerable discussion and effort, Ilija and I are ready to offer
>>> you ro
On 01.01.21 20:22, Go Kudo wrote:
> Hi Marc, and sorry for the late reply. Email has been marked as spam...
>
>> I would expect the Random number generator to implement from Iterator
> using an integer for current() value
>> and providing utility functions (simple functions
Hi zeriyoshi,
On 23.12.20 14:41, zeriyoshi wrote:
> Thanks tyson.
>
>> This would also make it easier to use those generators in brand new
> algorithms that weren't in the initial RFC.
>> (or in algorithms written by users in PHP)
> This suggestion seems to make sense. Maybe the RNG should only fo
On 28.12.20 21:21, Larry Garfield wrote:
> Hello, Internalians!
>
> After considerable discussion and effort, Ilija and I are ready to offer you
> round 2 on enumerations. This is in the spirit of the previous discussion,
> but based on that discussion a great deal has been reworked. The main
On 28.12.20 21:23, Larry Garfield wrote:
> There's been a number of discussions of late around property visibility and
> how to make objects more immutable. Since it seems to have been
> well-received in the past, I decided to do a complete analysis and context of
> the various things that ha
Am 05.12.20, 16:21 schrieb "Rowan Tommins" :
(Apologies if this posts twice, I may have accidentally hit send before
I'd finished writing it)
On 05/12/2020 14:21, Marc Bennewitz wrote:
> * Do cases have a stable ordinal number / position and
Am 05.12.20, 16:08 schrieb "Larry Garfield" :
On Sat, Dec 5, 2020, at 8:21 AM, Marc Bennewitz wrote:
>
> * How can you access a defined case value?
> Something like `Suit::Spades->value()`
At the moment it's only accessible via the :
eof Enum`
This basically means that all enumerations would to based on a general enum.
This would be very helpful on providing functionalities especially for
enumerations thinking about a doctrine enumeration type or again an EnumSet /
EnumMap.
Thanks Marc
[1] https://github.com/marc-mabe/
Thank you all for explaining.
This helps a lot!
Marc
On 09.03.20 10:27, Rowan Tommins wrote:
On Mon, 9 Mar 2020 at 05:38, Marc wrote:
Does it make sense? -> I have read "self::" all time as a shortcut for
"MyClass::" until I noticed this is not the case and I exp
uot;static" reference?
Sorry for all these questions.
Sometimes the world could be so simple until it turns out it isn't for
no reason.
Thanks,
Marc
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
me why the result of
"self::method()" is different then "$self = self::class; $self::method();".
Thanks,
Marc
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
use these for bitsets.
But I have a note here that bit shifting currently does not work with
binary strings (tries to cast binary string to integer) and even if it
would shift the binary string the >> is designed to keep the first bit
as a positive/negative flag which of course does
On 04.03.19 10:08, Nikita Popov wrote:
On Mon, Mar 4, 2019 at 6:31 AM Marc wrote:
(sorry for top posting)
Hi Nikita,
as for the question about magic methods vs. interface.
I have the feeling that it could be done with both in a clean way to
make both parties happy.
1. Having
a solution for this as I have a
library which would benefit from it:
(https://github.com/marc-mabe/php-enum/blob/v3.1.1/src/EnumSerializableTrait.php#L46-L72)
Would it be possible to instead get the new instance as argument and
expect the instance to be returned but on the same time allow to
y_[key|value]_[first|last]($array)" is in my opinion not a good
option as it lacks the possibility to extract key/value from any position.
Something like "array_[key|value]_index($array, $index)" where $index
would be the index position or negative index position from right.
T
Am 13.06.2017 um 21:35 schrieb Davey Shafik:
Given that iPad (and iPhone) both run iOS which is based on Darwin, and
Apple just relaxed the rules on running interpreted code, and we are
already seeing IDEs spring up for the device, we should use "Darwin",
rather than "Mac". This also encompasse
rr); // no change
var_dump((stdClass)$arr); // object of class stdClass
var_dump((Foo)$arr); // object of class Foo
Thoughts?
Marc
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
rackets but using the
function keyword:
function($x => $arr[$x])
Thanks
Marc
Cheers
Stephen
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
1 - 100 of 296 matches
Mail list logo