Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70466 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 73130 invoked from network); 2 Dec 2013 12:19:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Dec 2013 12:19:57 -0000 Authentication-Results: pb1.pair.com smtp.mail=mrtreinis@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=mrtreinis@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.181 as permitted sender) X-PHP-List-Original-Sender: mrtreinis@gmail.com X-Host-Fingerprint: 209.85.212.181 mail-wi0-f181.google.com Received: from [209.85.212.181] ([209.85.212.181:33759] helo=mail-wi0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 64/43-52529-BEA7C925 for ; Mon, 02 Dec 2013 07:19:56 -0500 Received: by mail-wi0-f181.google.com with SMTP id hq4so4676026wib.14 for ; Mon, 02 Dec 2013 04:19:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=v8/Z6WJ4PPt0zwV1QIE/hQnuLFDKMzvw7PBy0wTf2u8=; b=BlFeHpXysSjqNNmgmoDdHJmjpxKlZ1lnZZ4zjpIz6SpW4UDkcQsqqHC6tCtNTNBGQ9 Rz0RQszJCHCm8XrIIU2vwS149vE0R4q9b1dOW7Xmq2tLczRZ08bV/EIJHvSU86aTpqtk +KKHV48M+U4RXxEWA2Epu6larwgIGlAHi2q6EC6TDYmpnihCFT6jGBTGbAIOMeXkUIeG Ff/KTN13Qh/7R7VhP2agvg++KP/lHxYQiCMeFrubRgLvVrU1GCIzW7xjZmWV0f7EqagM tN2qQUl5Oz/v1JhHMJ6jq2cCwkID+fLT8LY3OXf7wbhXWZJav7gW9r5N5eHKTDc7pZer Cutw== MIME-Version: 1.0 X-Received: by 10.180.13.142 with SMTP id h14mr18032141wic.3.1385986793063; Mon, 02 Dec 2013 04:19:53 -0800 (PST) Received: by 10.194.205.197 with HTTP; Mon, 2 Dec 2013 04:19:52 -0800 (PST) Date: Mon, 2 Dec 2013 14:19:52 +0200 Message-ID: To: PHP Internals Content-Type: multipart/alternative; boundary=001a11c23dc276cd5104ec8c32c3 Subject: Regarding object casting From: mrtreinis@gmail.com (=?UTF-8?Q?Mat=C4=ABss_Roberts_Treinis?=) --001a11c23dc276cd5104ec8c32c3 Content-Type: text/plain; charset=UTF-8 Good day, PHP internals folks. As we all know, objects in PHP casts to true by default, except one particular class - SimpleXML objects created from empty tag. Many people in the community has had a problem with this limitation (or lack of functionality) to be able to set cast value of the object and are exploiting the SimpleXML to achieve the ability to control object casting. The question would be, why this exception - SimpleXML? Could we have a magic method or other way to control how object is being casted? Thoughts? Thanks. --001a11c23dc276cd5104ec8c32c3--