Re: [PHP-DEV] Allowing class properties to remain Uninitialized as a default value.

2025-06-05 Thread Faizan Akram Dar
On Thu, 5 Jun 2025, 13:56 Bradley Hayes, wrote: > Here is another way to think about it, trying to make the arguments > optional not have a new value type. > > Optional arguments currently requires a default value. > > Assigning values to properties is truly optional but we cant reflect this > in

Re: [PHP-DEV] [RFC] [Discussion] Add WHATWG compliant URL parsing API

2025-02-27 Thread Faizan Akram Dar
Hi, On Thu, 27 Feb 2025, 20:55 Paul M. Jones, wrote: > > > On Feb 25, 2025, at 09:55, ignace nyamagana butera > wrote: > > > > The problem with your suggestion is that the specification from WHATWG > and RFC3986/3987 are so different and that the function you are proposing > won't be able to c

Re: [PHP-DEV] [DISCUSSION] Ternary nullcoalesce operator

2025-02-20 Thread Faizan Akram Dar
On Thu, 20 Feb 2025, 13:15 Mihail Liahimov, <91lia...@gmail.com> wrote: > Now we have nullcoalesca operator in PHP: > > $a = $a ?? $b; > > And nullcoalesce assignment operator: > > $a ??= $b; > > (which is equivalent of previous example with nullcoalesce operator). > > Also we have a short syntax

Re: [PHP-DEV] RFC: Not Null Assertion Operator

2025-02-11 Thread Faizan Akram Dar
On Tue, 11 Feb 2025, 17:07 Valentin Udaltsov, wrote: > > > Static analysis already complain about it > > That's exactly where `!` is helpful. If at a certain point I am sure that > a property must not be null and I want to make that explicit (to both > developer and static analyzer), I can use >

Re: [PHP-DEV] [RFC] Pipe Operator (again)

2025-02-07 Thread Faizan Akram Dar
On Fri, 7 Feb 2025, 21:27 Thomas Hruska, wrote: > The repeated assignment to $temp in your second example is _not_ > actually equal to the earlier example as you claim. The second example > with all of the $temp variables should, IMO, just be: > > $temp = "Hello World"; > $result = array_filter(

Re: [PHP-DEV] RFC: Not Null Assertion Operator

2025-02-06 Thread Faizan Akram Dar
On Fri, 7 Feb 2025, 08:30 Mihail Liahimov, <91lia...@gmail.com> wrote: > Thank you for your answer. Now I will give examples for better > understanding. > > Simple examples from Typescript: > > let foo = ... > foo!.bar() > foo!.someProperty.baz() > > Examples of potentially using in PHP: > Without

Re: [PHP-DEV] [GitHub #7913] Vulnerability due to insecure default values for session.cookie_secure and session.cookie_httponly

2024-09-13 Thread Faizan Akram Dar
On Fri, Sep 13, 2024 at 9:51 PM Claude Pache wrote: > > Le 13 sept. 2024 à 16:13, etkaar a écrit : > > Hi! > > I've created this issue in January 2022 but it seems it wasn't noticed yet > (since you probably do watch the mailing lists more than > GitHub):https://github.com/php/php-src/issues/7

Re: [PHP-DEV] [Concept] Flip relative function lookup order (global, then local)

2024-08-21 Thread Faizan Akram Dar
On Wed, Aug 21, 2024, 9:34 AM Christian Schneider wrote: > Am 20.08.2024 um 17:14 schrieb Levi Morrison >: > > Keep in mind that qualifying > > every global function is annoying but probably can be somewhat > > automated, and will bring better performance. So again, this improves > > the existin

Re: [PHP-DEV] [Concept] Flip relative function lookup order (global, then local)

2024-08-20 Thread Faizan Akram Dar
On Tue, Aug 20, 2024 at 11:34 PM Ilija Tovilo wrote: > Hi Levi > > On Tue, Aug 20, 2024 at 5:14 PM Levi Morrison > wrote: > > > > I have long been in favor of a larger BC break with better language > > consistency. Class lookup and function lookup with respect to > > namespaces should be treated

Re: [PHP-DEV] String enums & __toString()

2024-08-16 Thread Faizan Akram Dar
On Fri, Aug 16, 2024, 11:22 PM Bilge wrote: > > > On Fri, 16 Aug 2024, 20:57 John Coggeshall, wrote: > >> >> I'm not seeing an obvious upside to forbidding straight out __toString() >> > > I tend to agree, but Crell will drive by in a minute to drop some > philosophical nonsense about why we're

Re: [PHP-DEV] Optional constructor body

2024-07-18 Thread Faizan Akram Dar
On Fri, Jul 19, 2024 at 1:34 AM Oliver Nybroe wrote: > Hello internals. > > I am looking into making the constructor body optional in classes, > essentially allowing you to write > > ``` > class User { > public function __construct( > private string $name, > ) > } > ``` > > Curren

Re: [PHP-DEV] RFC Concept: "Import" of simplied string manipulation and other instructions from ASP Classic

2021-09-25 Thread Faizan Akram Dar
Hi Daniele, I think many of these functions might already be part of popular userland libraries like Symfony String component https://symfony.com/doc/current/components/string.html#methods-added-by-bytestring It might be worthwhile to add missing functions to such userland libraries. Imho, PHP s

Re: [PHP-DEV] Guidelines for RFC post feature-freeze

2021-08-23 Thread Faizan Akram Dar
On Tue, 24 Aug 2021, 4:27 am Tobias Nyholm, wrote: > Thank you. > I appriciate you bring up this issue. > > Situations like this often requires a judgement call rather than something > that could be defined as a policy. > I suggest the release managers always should be in agreement before a RFC >

Re: [PHP-DEV] [RFC] Never For Argument Types

2021-08-16 Thread Faizan Akram Dar
On Aug 16 2021, at 1:21 pm, Nikita Popov wrote: > On Sat, Aug 14, 2021 at 3:44 PM Jordan LeDoux > wrote: > > > > > > > On Sat, Aug 14, 2021 at 6:25 AM Nikita Popov wrote: > > > >> > >> function addMultiple(CollectionInterface $collection, mixed ...$inputs): > >> void { > >> foreach ($inputs as $