Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86326 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57191 invoked from network); 20 May 2015 15:41:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 May 2015 15:41:03 -0000 Authentication-Results: pb1.pair.com smtp.mail=mvcbox.org@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=mvcbox.org@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.179 as permitted sender) X-PHP-List-Original-Sender: mvcbox.org@gmail.com X-Host-Fingerprint: 209.85.213.179 mail-ig0-f179.google.com Received: from [209.85.213.179] ([209.85.213.179:38635] helo=mail-ig0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DB/48-13816-E0BAC555 for ; Wed, 20 May 2015 11:41:03 -0400 Received: by igcau1 with SMTP id au1so42794912igc.1 for ; Wed, 20 May 2015 08:41:00 -0700 (PDT) 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=Wrp2B5GDHHVJUf2SHtAXDCkiqKTiyIg3l/+QnfkofUU=; b=AV1ABHUkPOXZ4K66OVG31278NLtlsP6Gb1rI1+DRNXO1yKFfHKlLyuk1XJq5m71+L4 5YC+xDAXC2qme4NmaoG/5foBwRgBtqFbC0VfGe8bIKhNOCMQyfA3xkYokicqMvhDLAY4 mMS4gqUnjh2HzZ3CQJ/0olKYKIQfKNgIrPFpKxU5RVAVbV0pwkVRAcGav8pJSKdJOdwj PohzoZckVPB4t2N6rlUBzE1gNLh6FkF9SeFXSXY9GxZcDU6An1kRzGxs3XlpCmH7847w axGsVSoqA/6iNGb7aZE2PnSpC8IaMHTt3AT6tQqy3vL0FKU7ctn35Rz94LBhPit+cCC3 MAFA== MIME-Version: 1.0 X-Received: by 10.107.138.31 with SMTP id m31mr34772047iod.75.1432136460246; Wed, 20 May 2015 08:41:00 -0700 (PDT) Received: by 10.64.122.227 with HTTP; Wed, 20 May 2015 08:41:00 -0700 (PDT) Date: Wed, 20 May 2015 18:41:00 +0300 Message-ID: To: internals@lists.php.net Content-Type: multipart/alternative; boundary=001a113e8aa4fbc07505168540ff Subject: Proposal for developers From: mvcbox.org@gmail.com (Mvc Box) --001a113e8aa4fbc07505168540ff Content-Type: text/plain; charset=UTF-8 I apologize for my bad English, I used Google translate. I would propose developers to add the ability to use the classes in the type conversion, adding in class a new magical method, for example, __converting() For example: myProperty = $value; } public function show() { echo $this->myProperty; } // magical method public function __converting($value) { return new self($value); } } // Example of use $value = 123; $value = (ClassName)$value; $value->show(); // Result: 123 ?> Similarly, for the classes in the namespace: show(); // Result: 123 ?> Thank you for your attention. --001a113e8aa4fbc07505168540ff--