Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98794 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 65633 invoked from network); 14 Apr 2017 04:30:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Apr 2017 04:30:08 -0000 Received: from [127.0.0.1] ([127.0.0.1:19231]) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ECSTREAM id 7A/03-31410-05050F85 for ; Fri, 14 Apr 2017 00:30:08 -0400 Authentication-Results: pb1.pair.com smtp.mail=ktd_@hotmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ktd_@hotmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain hotmail.com designates 40.92.0.17 as permitted sender) X-PHP-List-Original-Sender: ktd_@hotmail.com X-Host-Fingerprint: 40.92.0.17 mail-oln040092000017.outbound.protection.outlook.com Received: from [40.92.0.17] ([40.92.0.17:61024] helo=NAM01-BN3-obe.outbound.protection.outlook.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8F/D2-31410-68820F85 for ; Thu, 13 Apr 2017 21:40:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=BbRpE3XNjYyMLs3X1NjJHPOuPgi0mSmz5+5K5qV4zMA=; b=tQRDMBVLg7VZa9nJppB2Z093oUIS9dlVbzF8beZO5yb3cAqxqfZlpfo73dn9w23tnvvlnZWpkRHdCJKIYvFpdqpUwLBTXMBf0IvD3KFeuJSU9D0J2mnA3kPyWKUl6fDkLrvJhmPk9gypAP8msVCM7lkqCPm34HfCiwfNiB23rlt/H5pXFfGKXJim+FHNgL97JF6/dCFP5e3SH4pnBbMPr/lYl7Vbm1/8RhBLksiRRWLIcuiy9W6QRPeSIexX9c8KRUNe07y36ksSfShwyuS5f/DAKbC2PXulTbT5t1gxzDoaE0qHa2huFOovgTcdBoRGsFd+PgGWDwOPyoiwiPT7Lw== Received: from SN1NAM01FT036.eop-nam01.prod.protection.outlook.com (10.152.64.51) by SN1NAM01HT056.eop-nam01.prod.protection.outlook.com (10.152.65.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1019.14; Fri, 14 Apr 2017 01:40:18 +0000 Received: from MWHPR01MB2557.prod.exchangelabs.com (10.152.64.57) by SN1NAM01FT036.mail.protection.outlook.com (10.152.64.120) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1019.14 via Frontend Transport; Fri, 14 Apr 2017 01:40:18 +0000 Received: from MWHPR01MB2557.prod.exchangelabs.com ([10.168.203.139]) by MWHPR01MB2557.prod.exchangelabs.com ([10.168.203.139]) with mapi id 15.01.1034.012; Fri, 14 Apr 2017 01:40:18 +0000 To: "internals@lists.php.net" Thread-Topic: rfc concepts Thread-Index: AQHStL3+Brzz83VxLkqew5w68wRXOA== Date: Fri, 14 Apr 2017 01:40:18 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: lists.php.net; dkim=none (message not signed) header.d=none;lists.php.net; dmarc=none action=none header.from=hotmail.com; x-incomingtopheadermarker: OriginalChecksum:496A2E028B4B4383D2656529C9DFD64C131BA43EE17FA51F071CE77F57D213C7;UpperCasedChecksum:2A02237823CBB2FBD3F5F811FB49C2D8D8ED6AA075BE33A81C52A67DEF292840;SizeAsReceived:7779;Count:40 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [ks09eqW1A+UVGAVL2mG9/AWYeLT5WJSP] x-microsoft-exchange-diagnostics: 1;SN1NAM01HT056;5:1nTLb1ARVkpzsnT/KKBPYHNEuJYX+RixgwHlhKvP/3bfn+e+VYdS11mlSs4DwqKxtmrXbKDyWYlRhCQvuT9+7/y2QLtorcqC8P4AAIULbqWm9/zAbYj/Bx8fgofukR4y1P7k5rPxW/8OC1DLkgkvuGYRUB3V3KSrz3hE1iYqfMQ=;24:xIJlOaY2ahUtYRKZ80ArEtGiRhSp0ljBE2/LJ41tADUtpC8lH1N2Ir6PXo6CFVoc3wL6bO0ZYE2fEOCMNP+ckDZzl7ZaZ4WUQ54uy2L/ir8=;7:L0quOfEXSNWhBLyDzE/3copiZ9DCl3K1BVlPIUABkMAt4c7G7qoGw7favlTi20kVt24WMI6Ic6hqlLc8lOGTHgCZJGpHv99kAAl1nnd36K5ypfvwOiGMEgsp2yxAknf1ZUIJ5VnKjzFoUeaqBLNWc4yTR7dAa5D2J6WlZIMyST7Kh5b0j/ZfffPIJpBgxO7VDQowamnDplXPXvnLvvXIxCFBoAhmPjo7CRmOodZvKpsxc5Sc6J3W5uAKk3EwFZNgAFUhiQfT9Bcpxck1VbBSKG+gDjM+004X5JDSouCwOxmIhogWHqMLcXQtZdHbYNLd x-incomingheadercount: 40 x-eopattributedmessage: 0 x-forefront-antispam-report: EFV:NLI;SFV:NSPM;SFS:(7070007)(98901004);DIR:OUT;SFP:1901;SCL:1;SRVR:SN1NAM01HT056;H:MWHPR01MB2557.prod.exchangelabs.com;FPR:;SPF:None;LANG:en; x-ms-office365-filtering-correlation-id: ff83f60a-aaae-4926-5804-08d482d734ff x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(201702061074)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031322274)(1603101448)(1601125374)(1701031045);SRVR:SN1NAM01HT056; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(444000031);SRVR:SN1NAM01HT056;BCL:0;PCL:0;RULEID:;SRVR:SN1NAM01HT056; x-forefront-prvs: 02778BF158 spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: multipart/alternative; boundary="_000_MWHPR01MB25575AB32DF5D1D9C443A306EB050MWHPR01MB2557prod_" MIME-Version: 1.0 X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Apr 2017 01:40:18.3100 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1NAM01HT056 Subject: rfc concepts From: ktd_@hotmail.com (Kelt Dockins) --_000_MWHPR01MB25575AB32DF5D1D9C443A306EB050MWHPR01MB2557prod_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi everybody, I've been using php for many years now and it really is a great language. M= y friend and I were talking about additional things we would want in php - = sort of like a wishlist. I came up with 3 things that I think would make ph= p even more awesome and I wanted to share these concepts with this list and= I'd love to get feedback. I haven't done any c programming in years but I'= d be open to working on these concepts if enough people wanted them. 1. use strict mode ``` class Bar { } class Foo { use strict; } $bar =3D new Bar; $bar->thing =3D 1; // no problem $foo =3D new Foo; $foo->thing =3D 1; // throws error because thing attribute does not exi= sts ``` 2. type hinting class properties ``` class Foo { public $thing : int; } $foo =3D new Foo; $foo->thing =3D 1; // works fine $foo->thing =3D 'string'; // throws Typehint ``` 3. auto properties ``` class Foo { private $thing1 { get, set }; private $thing2 { get }; private $thing3 { set }; } $foo =3D new Foo; $foo->thing1 =3D 'asdf'; echo $foo->thing1; // echos 'asdf' $foo->thing2 =3D 'asdf'; // throws error because no setter $foo->thing3 =3D ''asdf'; // sets thing3 echo $foo->thing3; // throws error because no getter ``` I'd love to hear what you all have to say about these things. Thanks in adv= ance for your feedback and time! - Kelt --_000_MWHPR01MB25575AB32DF5D1D9C443A306EB050MWHPR01MB2557prod_--