Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60229 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76418 invoked from network); 20 Apr 2012 10:35:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Apr 2012 10:35:37 -0000 Authentication-Results: pb1.pair.com header.from=patrick.allaert@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=patrick.allaert@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.210.45 as permitted sender) X-PHP-List-Original-Sender: patrick.allaert@gmail.com X-Host-Fingerprint: 209.85.210.45 mail-pz0-f45.google.com Received: from [209.85.210.45] ([209.85.210.45:34025] helo=mail-pz0-f45.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E5/A1-63732-8FB319F4 for ; Fri, 20 Apr 2012 06:35:36 -0400 Received: by dacx6 with SMTP id x6so12562017dac.18 for ; Fri, 20 Apr 2012 03:35:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=KJUX942uNYMiSGnp9hWcHOL8JAztYtzsKSHt/59+G9g=; b=dNE1R8Ag7TwKdzt9GtzgYMmG0/PjBD41aagHvQQtPt7I2xdYn9Tt3L4fEmcya25itp Cs512tFaEfeDS4zS/ml0xgW0c+lBc3HQRgpxAZnbd79BxXLw7/f7Cq34g1mttNiosDf5 CwytjL30whUXxjwvEQZNOS3GgqEvGSSXoNyCQKRiAS4B3Vkt1/9CO1tvUN5a5/xUL+2R rphsENVA4e1aBULR7L0ufHCoRhjwu3Oibn8vt/xkyQFgaxmm+UeOv0t7jPC/5+W+5bek BdEGU1Q1vBoVJhfTQTUe/HwGPcwDkXppAtBZbMsw3N7d2CHX3UflV4MUL/6HL2P4QunC zVeQ== MIME-Version: 1.0 Received: by 10.68.192.10 with SMTP id hc10mr12262334pbc.31.1334918132992; Fri, 20 Apr 2012 03:35:32 -0700 (PDT) Sender: patrick.allaert@gmail.com Received: by 10.68.31.165 with HTTP; Fri, 20 Apr 2012 03:35:32 -0700 (PDT) In-Reply-To: <4F910311.7040406@sugarcrm.com> References: <9570D903A3BECE4092E924C2985CE485546B0737@MBX202.domain.local> <4F910311.7040406@sugarcrm.com> Date: Fri, 20 Apr 2012 12:35:32 +0200 X-Google-Sender-Auth: GrC2nbqT8WSpb6BQC5l8wdym8JY Message-ID: To: Stas Malyshev Cc: Clint M Priest , "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] RFC: Property get/set syntax From: patrickallaert@php.net (Patrick ALLAERT) 2012/4/20 Stas Malyshev : > How these would work with isset - what !empty($this->Hours) return? What > would happen if you do unset($this->Hours)? What happens if you do > $this->Hours++ or sort($this->Hours) (assuming $Hours is an array)? > These things need to be defined in the RFC too. My suggestion is to support the same methods for properties as we do for magic class methods: __set, __get, __isset and __unset. All the other operations (sort, ++, <<,...) should behave exactly as if it was be implemented with current magic class methods with a usual switch/case statement.