Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60528 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25476 invoked from network); 10 May 2012 22:34:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 May 2012 22:34:16 -0000 Authentication-Results: pb1.pair.com smtp.mail=devis@oracolo.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=devis@oracolo.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain oracolo.com designates 209.85.214.42 as permitted sender) X-PHP-List-Original-Sender: devis@oracolo.com X-Host-Fingerprint: 209.85.214.42 mail-bk0-f42.google.com Received: from [209.85.214.42] ([209.85.214.42:45734] helo=mail-bk0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0B/DD-45982-6624CAF4 for ; Thu, 10 May 2012 18:34:16 -0400 Received: by bkcik5 with SMTP id ik5so1874504bkc.29 for ; Thu, 10 May 2012 15:34:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=0JjWdznxdU88qvV6ynUGvcvnGTxsBUsWYngLwp+dHVQ=; b=lLfDOs1jaYCHuNa0yzaXzqkImtW/+cfs4rOHw5394nq4Yg8YuOpuu4LqQtuJRHg0tQ AEsNl3t3hMJ6xqaMCJ7CmEsOqehhxQOCBv6cuyHJQ2UaZBeQHRVuwmkefZASMVVaolyZ 3JsJoBYrwUf1AF2aY3R6e+4bA3D1Ztsf1ckhAILsED3CN3oODVGbDsBPvy/h1D/ePGdF vRiKK87UhV2N8+92K+Q5cLjqDLk8g45v5TEcV2SyZW4RaKmBsWVPOi0mcnHuJezRJ4Lm 8mRGuVCPM+qQ1MYlj6LpkJTvUsXmMUk3S/KywcwiqTePU/QQSr7zRX8EJjf6/UBTyb/7 sbWg== Received: by 10.204.152.196 with SMTP id h4mr3945695bkw.131.1336689251414; Thu, 10 May 2012 15:34:11 -0700 (PDT) MIME-Version: 1.0 Sender: devis@oracolo.com Received: by 10.204.139.138 with HTTP; Thu, 10 May 2012 15:33:29 -0700 (PDT) In-Reply-To: <4FAC2671.8020008@hoa-project.net> References: <4FAC2671.8020008@hoa-project.net> Date: Thu, 10 May 2012 23:33:29 +0100 X-Google-Sender-Auth: LLx7wwMlSlLCjE_K_oApZkILE2Q Message-ID: To: ivan.enderlin@hoa-project.net Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary=0015175cbab20171f004bfb63893 X-Gm-Message-State: ALoCoQmXC19rLizdk0uOILzHdBFsEDKRO0/ll3ACxNBfMjFhGFHxuqPq8p1iY5HYndwppFS0EeYo Subject: Re: [PHP-DEV] Implicit Reference From: devis@lucato.it (Devis Lucato) --0015175cbab20171f004bfb63893 Content-Type: text/plain; charset=UTF-8 Hi, I had a possible use case while working with an application registry. Any model could "get a copy" of it to read application settings or retrieve a resource. However if a model by mistake changed a property, it would modify the original object without going through proper setters... A quick solution was to use "clone" whenever returning the registry. Best regards On 10 May 2012 21:34, Ivan Enderlin @ Hoa wrote: > Hi Mathias, > > > On 10/05/12 21:38, Mathias Grimm wrote: > >> There is a suching extension to handle (intercepts) implicit (or no) >> reference. >> >> Ex.: >> >> $a = new A(): >> $b = $a; >> >> I want something like __clone(), something like __reference() to be >> invoked >> in the second line of the given example. >> > Do you have a usecase? > > Best regards. > > -- > Ivan Enderlin > Developer of Hoa > http://hoa.42/ or http://hoa-project.net/ > > PhD. student at DISC/Femto-ST (Vesontio) and INRIA (Cassis) > http://disc.univ-fcomte.fr/ and http://www.inria.fr/ > > Member of HTML and WebApps Working Group of W3C > http://w3.org/ > > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --0015175cbab20171f004bfb63893--