Re: [PHP-DEV] What to do with opaque GMP objects which allows instantiation

2023-01-01 Thread Larry Garfield
On Fri, Dec 30, 2022, at 2:36 PM, Tim Düsterhus wrote: > Hi > > On 12/30/22 18:36, G. P. B. wrote: >> - Add a proper constructor that does the same as gmp_init() in master/8.2.1 > > My preference would be this (without any target branch preference): > > If there is no technical reason to disallow

Re: [PHP-DEV] What to do with opaque GMP objects which allows instantiation

2022-12-30 Thread Hans Henrik Bergan
Why isn't that generating an ArgumentCountError? On Fri, Dec 30, 2022, 21:36 Tim Düsterhus wrote: > Hi > > On 12/30/22 18:36, G. P. B. wrote: > > - Add a proper constructor that does the same as gmp_init() in > master/8.2.1 > > My preference would be this (without any target branch preference)

Re: [PHP-DEV] What to do with opaque GMP objects which allows instantiation

2022-12-30 Thread Tim Düsterhus
Hi On 12/30/22 18:36, G. P. B. wrote: - Add a proper constructor that does the same as gmp_init() in master/8.2.1 My preference would be this (without any target branch preference): If there is no technical reason to disallow creating new GMP objects via 'new', then I believe that making t

[PHP-DEV] What to do with opaque GMP objects which allows instantiation

2022-12-30 Thread G. P. B.
Hello internals, While working on something, I was using GMP for a test case and creating it by doing akin to $o = new GMP(5); However, this does *not* create a GMP object initialized to 5, rather it creates and sets the value to 0. This is because it does not define a constructor, and the proper