Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123675 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 8B0B11A009C for ; Wed, 19 Jun 2024 12:34:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1718800546; bh=ub59O8/+iKb+LV6fT2l78MHubja9Z9VrSL9AQ4u3wTA=; h=From:Date:Subject:To:From; b=n/oBqK1knyScA/TCJO4C/sj9RjLdSWwyQf6dX9DtBgqNfzvOeHVZk92eWi/Goe9GR fPPcRtqGZX82tzlBNZ9obtut66kYziYdp+wb3Kj+orRgLCwvyqlybyEeGfGx+0RnZe CTeZ0Cr9ZMUN/RhRU1EQFzcHYN2poY0tcSIdf5nzHdYTXjCxkcc3loJLiezYTz+5qg HDfnp6RdZGMGHIpycqvgIYcuHQzlBFvIIuk2/I/dkVdhM8P4mx/q+EWnZB3Z9zNHpm HFUoh5gIdBXq4X4UcFm2mvjJm8A7GEw2T0EKVN/8Cia9oWFei19qBdHVtUwcZzrw/6 SAOWHERjzr0Ew== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E30A5180690 for ; Wed, 19 Jun 2024 12:35:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from mail-ua1-f53.google.com (mail-ua1-f53.google.com [209.85.222.53]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 19 Jun 2024 12:35:45 +0000 (UTC) Received: by mail-ua1-f53.google.com with SMTP id a1e0cc1a2514c-80d68861bf9so2282431241.2 for ; Wed, 19 Jun 2024 05:34:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718800471; x=1719405271; darn=lists.php.net; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=wOBrHG1vnZcgJm+LIkQG8ykAvlWC9Nom1iFwdYJlX6I=; b=YQNOgoDcZeDF5QDl0wcl+BojcmPn4L4P31sK6zG/asG6IMRNfQfGjQ9zR01WPyC//s kuN7lOxkbiRqM2DRFxSAlmsZd7Xw0A8q7tZF2oM6lxqgsnfWNLks3y72ySshO+7j3EnZ fqLHqCg72H4QsQqgZELZNIHfQLupVrhXaKHjlG330mBcoqRvd8x1c36G9/k9/qVahV5E SPuK3rgKwEO2xyDwoTFqgko0A7RAyunWZq/fFh145TU/9X0kf8csWnJeIwcTd7bhEPR9 KklDKo1hF29XT4dUq+45xPLBgjc0vkO+IqfVAPKttV495X3Km3aocpK8Qwf8oG69I3DO VHJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718800471; x=1719405271; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=wOBrHG1vnZcgJm+LIkQG8ykAvlWC9Nom1iFwdYJlX6I=; b=GypOSj4oJXcL9yLXJdB30PWcuaqb4zIl5MBeasWLdlsMfszv2FZgbjKchCT1hWZZfh pNRIhYYo1440Rkd520T8AXod/pKrEpCQ+CcMR1v57H6B4tnC0Ux309hE0c+hlqk4+v5R 4T+DKGB3zAmXvCOmEZupBYxyUQ/d4eivnIYV/W/7Cl9XUK03UXiEJ5Y2s18GAmpwgg6X BIBt+KNM4EREeA70J+ilQ6whXKIyFSXUoyv2pMrsBJW+CBQmKGF3Pc1UwpWIjgopcFEf B49zZc9Tj8iazoF+xCI9LuSVX8OTE++tgiCD4+ZNt3INesJzykwXBAJ2exlWPwPGhJAk uzsg== X-Gm-Message-State: AOJu0YxKxUD8h5OlmehEDOGqItYOMlhEfT2hOff+QXCBG+1Znk92TvH4 A67PVfs/DNxCpNQ5oKcOZkI+Zp+qsWx/t+pMDoj1B9GCl62WphbnbgArak4ZiQ8pf4FQQurul0d Y8pruw5kIdBGdu44+H06dUCktspTNhA== X-Google-Smtp-Source: AGHT+IHsr2zX36kFeNWKdHYjSOVEeiRwzjznlAQwdw84V9IIXs6kQNnFDkByJ+JnoH0+rRMbkh198MezD73zd/4/gF0= X-Received: by 2002:a05:6122:181f:b0:4ec:f7c4:fe25 with SMTP id 71dfb90a1353d-4ef277db683mr2692701e0c.15.1718800471411; Wed, 19 Jun 2024 05:34:31 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Date: Wed, 19 Jun 2024 09:33:55 -0300 Message-ID: Subject: [PHP-DEV] [RFC] Static Constructor To: php internals Content-Type: multipart/alternative; boundary="00000000000089d2d4061b3d6b6a" From: ericklima.comp@gmail.com (Erick de Azevedo Lima) --00000000000089d2d4061b3d6b6a Content-Type: text/plain; charset="UTF-8" Hello everybody. I found myself wanting this feature (that I first encountered when programming in C#) for removing a workaround from a codebase I work from time to time. I searched internals and found a discussion from almost a decade ago. That discussion did not end well, mostly because of insulting accusations. I then decided to do some research on this subject and found out that it's a pretty common feature in other OOP languages. Also, as I started studying the php-src (and missed the days when I used to program in C in my main job), I decided to do an implementation myself even before presenting the RFC. The implementation link can also be found at the RFC. You can read the RFC here: https://wiki.php.net/rfc/static_constructor Regards, Erick --00000000000089d2d4061b3d6b6a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello everybody.

I found myself wanting this f= eature (that I first encountered when programming in C#) for removing a wor= karound from a codebase I work from time to time.
I searched = internals and found a discussion from almost a decade ago. That discussion = did not end well, mostly because of insulting accusations.
I then= decided to do some research on this subject and found out that it's a = pretty common feature in other OOP languages.
Also, as I started = studying the php-src=C2=A0=C2=A0(and missed the days when I used to program= in C in my main job), I decided to do an implementation myself even before= presenting the RFC.
The implementation link can also be found at= the RFC.

You can read the RFC here:
https://wiki.php.net/rf= c/static_constructor

Regards,

Eric= k
--00000000000089d2d4061b3d6b6a--