Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95543 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 21750 invoked from network); 1 Sep 2016 19:05:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Sep 2016 19:05:03 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@fleshgrinder.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=php@fleshgrinder.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fleshgrinder.com from 77.244.243.84 cause and error) X-PHP-List-Original-Sender: php@fleshgrinder.com X-Host-Fingerprint: 77.244.243.84 mx103.easyname.com Received: from [77.244.243.84] ([77.244.243.84:50853] helo=mx202.easyname.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 72/B5-47600-CDB78C75 for ; Thu, 01 Sep 2016 15:05:02 -0400 Received: from cable-81-173-132-156.netcologne.de ([81.173.132.156] helo=[192.168.178.20]) by mx.easyname.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1bfXIG-0004Bi-Nr; Thu, 01 Sep 2016 19:04:56 +0000 Reply-To: internals@lists.php.net References: To: Davey Shafik , "internals@lists.php.net" Message-ID: <483bc944-22eb-7256-2687-e9607ffcba6c@fleshgrinder.com> Date: Thu, 1 Sep 2016 21:04:31 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Oles33kXL2wdxcbbP0QG2ridUcrllJjUf" Subject: Re: [PHP-DEV] [PREVOTE] PHP Engine Constants From: php@fleshgrinder.com (Fleshgrinder) --Oles33kXL2wdxcbbP0QG2ridUcrllJjUf Content-Type: multipart/mixed; boundary="DWwIINJmHrXaiKF4uKsUPErrm3Nwg19L9"; protected-headers="v1" From: Fleshgrinder Reply-To: internals@lists.php.net To: Davey Shafik , "internals@lists.php.net" Message-ID: <483bc944-22eb-7256-2687-e9607ffcba6c@fleshgrinder.com> Subject: Re: [PHP-DEV] [PREVOTE] PHP Engine Constants References: In-Reply-To: --DWwIINJmHrXaiKF4uKsUPErrm3Nwg19L9 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 9/1/2016 8:02 PM, Davey Shafik wrote: > Hey all, >=20 > A while back I brought a small RFC to internals, that proposed a set of= > constants that were specifically for alternative implementations to > identify themselves as such if they want to conform to the spec. >=20 > https://wiki.php.net/rfc/php_engine_constant >=20 > There were some folks who didn't like it, but nobody suggested differen= t > implementations, just didn't feel it was necessary. As such, I'm planni= ng to > bring it to a vote next week - this is simply a heads up as it's been a= > while > and I want to give a chance for any objections other than not wanting i= t to > be voiced before I open it up for voting. >=20 > The vote will be a straight 50%+1 yes/no vote. >=20 > - Davey >=20 +1 from my side. What do you think about including a platform and architecture identifier too? const string PHP_ENGINE_PLATFORM =3D ''; WINDOWS LINUX MACOS CYGWIN FREEBSD SOLARIS =2E.. This would solve all the tricks we see in various code bases that try to determine what platform the current PHP installation is running on, e.g.: if (DIRECTORY_SEPARATOR =3D=3D=3D '\\') could be replaced with a mo= re readable if (PHP_ENGINE_PLATFORM =3D=3D=3D 'WINDOWS'). const string PHP_ENGINE_ARCHITECTURE =3D ''; x86 x64 ia64 arm =2E.. This is not required as often but still needed at some places. This would allow to replace checks like if (PHP_INT_SIZE =3D=3D=3D 8) with if (PHP_ENGINE_ARCHITECTURE =3D=3D=3D 'x64'). --=20 Richard "Fleshgrinder" Fussenegger --DWwIINJmHrXaiKF4uKsUPErrm3Nwg19L9-- --Oles33kXL2wdxcbbP0QG2ridUcrllJjUf Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXyHvUAAoJEOKkKcqFPVVrlEkQAIZ8xx9ydXYn9u3JoKawQ0ZH R90k1lPbH5uB031Nc+sVfDBo2vGVXROwp6cnX7njp+XTC8LiR4qEM3i1Rr4ciqnK LhvPuYvxLBbtx1i9iIG4J5iaEHh4szXpZhxFOzCsSHkL8vx1I5V7QH8h5ouHCTPf rnXGrM5B4y8ng9Z1IdfOzmWQeVSqpBHVzO4R9IxDk1FzJvjgISeVax75aAxY/xBL +qZxMRCOSCpl4NBHraMuwAqV2KcASnG418ooxqFmWWpUgW9KAn3qP2Fp7I0YA/0r lZNouj3Y3IVyP9EtUO0kIazrJ5ePmeVpPJGeMJSeyq/wSv0h+vI14C4WK02RLbOx fR6Nn4ban05vZqx+PvSY/pxDUPUDHwr6MJ9aDCUJDqqwj6VOvHziMT7S6TXVSYts fH22Dp175fFc+Ggy0ov0pzwR39jl6AA02i4FzlphaTHzvREzlaQ7D/c2+QzVPMnH 76JrE5o/kqbaXaiPgLi4ZsVVO+FgxOyT2uznOWb9RATplDP2x22liN1tcqdXc2rm SRKiiiMjtggXFj0g104lR93wTFznZe2d0bRmvH8mcAWVRm7Zi+9++65NiDxEy+dH fzWAjVOsuTjMljTjSnOFjozxe4I7D+hvMocZJnp450Ii3OAZQbILAQk948MpUeYN ciNPTQA60GeY1tpAZXu0 =+a0b -----END PGP SIGNATURE----- --Oles33kXL2wdxcbbP0QG2ridUcrllJjUf--