Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:72226 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 84035 invoked from network); 5 Feb 2014 00:25:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Feb 2014 00:25:00 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.48 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.215.48 mail-la0-f48.google.com Received: from [209.85.215.48] ([209.85.215.48:39279] helo=mail-la0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F6/80-12415-AD481F25 for ; Tue, 04 Feb 2014 19:24:59 -0500 Received: by mail-la0-f48.google.com with SMTP id mc6so6950482lab.7 for ; Tue, 04 Feb 2014 16:24:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=RKbwfCeHsI9FKGriwPNkxnPjh665gJrApPF2hJ9o2v4=; b=YF4srRjzqYxpKxzR7BPm9U2DKUBqFRbucODnaAt88/X57GjI7io8DIabKK/f5CXxsk N4jd6WWM/cg1jfC8IyACU+QlPkgQo2Z78IRT49hxDeIneAInh8aOk/shvj37/NZgWcuG 4CcMwnAFJEeXxyiL6lIbZjFJrprFshP02xj8L6e2j7VC0a5YWi8wD12TjKZE1CYOaQop cyRVo8t4T9osI6ABWUZLqThn6ZBORZlbNZnI7qJWKQFnY1YmD0NdpyWhLkDXSTb11kRk Ld1B6DoXyXB9NCBw+uZ3z+Y3X27GmiLyt5tBDEqiQwzhPBo6ymGkCdW+sUJS6FnrUQaM 9ong== X-Received: by 10.112.180.72 with SMTP id dm8mr18911997lbc.28.1391559895646; Tue, 04 Feb 2014 16:24:55 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.112.199.37 with HTTP; Tue, 4 Feb 2014 16:24:15 -0800 (PST) In-Reply-To: References: <52F00437.7010903@googlemail.com> <52F005E6.6090702@googlemail.com> <52F0D36B.7010905@googlemail.com> Date: Wed, 5 Feb 2014 09:24:15 +0900 X-Google-Sender-Auth: U970NBOCj7wm6e-Lin_WZwUl0yU Message-ID: To: Tjerk Meesters Cc: Crypto Compress , Sara Golemon , PHP Developers Mailing List Content-Type: multipart/alternative; boundary=089e011836be43888b04f19dc9d9 Subject: Re: [PHP-DEV] [RFC] [VOTE] __debugInfo() From: yohgaki@ohgaki.net (Yasuo Ohgaki) --089e011836be43888b04f19dc9d9 Content-Type: text/plain; charset=UTF-8 Hi all, On Tue, Feb 4, 2014 at 10:16 PM, Tjerk Meesters wrote: > > some more questions: > > > > 1. Can this hook be bypassed or disabled (global/temporary)? > > e.g. real_var_dump(), ini setting, some other flag? > > > > 2. What will be affected by this hook beside "var_dump"? > > e.g. xdebug output, var_export, ... > > > > 3. How would this behave (segfault?): > > public function __debugInfo() { var_dump($this); return []; } > > > > Yeah, there doesn't seem to be any recursion protection, just like: > > public function __toString() { return (string)$this; } It is the same as function f() { f(); } User may do that, but it's a documentation problem. It would be not obvious as function call recursion. and must be documented, probably. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --089e011836be43888b04f19dc9d9--