Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73403 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71568 invoked from network); 25 Mar 2014 02:00:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Mar 2014 02:00:10 -0000 Authentication-Results: pb1.pair.com smtp.mail=garyamort@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=garyamort@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.182 as permitted sender) X-PHP-List-Original-Sender: garyamort@gmail.com X-Host-Fingerprint: 209.85.216.182 mail-qc0-f182.google.com Received: from [209.85.216.182] ([209.85.216.182:60736] helo=mail-qc0-f182.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D7/E1-60997-723E0335 for ; Mon, 24 Mar 2014 21:00:09 -0500 Received: by mail-qc0-f182.google.com with SMTP id e16so7116852qcx.27 for ; Mon, 24 Mar 2014 19:00:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=XV2dgJeOpwYAwVh7hZZ84gEVURBqjTqWNhfcenF1gSQ=; b=HLXzJRdB/zdqVIo2upb3R/Pzv5aXf9aRb9YoQRrXXtV3+QvikWx8AMuKonWB3ZNBki KisnBewgmV5+x1Br5FEczbxzVlu7rbX708CidR2W4ewqjPAVRmldNiSYg3RummTPFoBD PVzfbh+khal7DgO3EbJ8oZqUZVAACatRfRvsHFALfX+7SO+tIkWEYKCEcK+RN0qmdeTr RCTTiyyvjRGJT820xyLdd/nBidamNzbnmMp29V4iqZJ270+6Nb9iUaoEghQQcO+sAjDG u+jN5oHQoS/N+ud2Ht17870So1s66Elh+n1DeodWYN1DMBhovmpGAIkF2zq5/SGNcbs9 d5KA== X-Received: by 10.140.91.105 with SMTP id y96mr75952264qgd.3.1395712803962; Mon, 24 Mar 2014 19:00:03 -0700 (PDT) Received: from ?IPv6:2604:2000:1118:4036:62a4:4cff:fea8:603d? ([2604:2000:1118:4036:62a4:4cff:fea8:603d]) by mx.google.com with ESMTPSA id f48sm19367091qge.5.2014.03.24.19.00.03 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 24 Mar 2014 19:00:03 -0700 (PDT) Message-ID: <5330E321.50109@gmail.com> Date: Mon, 24 Mar 2014 22:00:01 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: internals@lists.php.net References: <532FF7B9.5040700@hoa-project.net> In-Reply-To: <532FF7B9.5040700@hoa-project.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: PHP Specification From: garyamort@gmail.com (Gary Mort) On 03/24/2014 05:15 AM, Ivan Enderlin @ Hoa wrote: > Hello :-), > > We see more and more PHP interpreters or compilers out there: > > * the historical interpreter [1], > * interpreter from Facebook [2], > * interpreter written for .NET [3], > * interpreter written for JVM [4], > * maybe I forgot some of them. > Google App Engine's PHP Interpreter has a few modifications from the core standard. At least one that I know of is that the mail() function is replaced with a dummy function which does not send anything[since your not allowed to make outgoing socket connections]. Deploying an app on GAE, as well as digging into HHVM was the reason for my proposal to add functionality so that the mail() function can be handled as elegantly as opening a stream or storing session data. Rather then having to code in ugly checks for what php platform your using and what PHP platform your using, it is much simpler to just use the mail() function and leave it up to PHP to allow different types of delivery based on what mail handler is currently active. Beyond that, I agree that it would be good to generate specs for the system in a better manner. One thing I ran into when trying out HHVM a while back was that it could not handle some non-documented 'features' For example, under PHP it is[or at least was under 5.4] possible to pass a private method for a class to spl_autoload_register. Since the manual specifies that the method passed must be public, that is how HHVM was initially designed - it matched the public spec. Registering a private method for spl_autoload_register will cause weird and difficult to debug errors is the private method throws an exception. So that would be a good item to decide on precisely what functions and methods can be registered as an autoloader - if private ones should be allowed, then the exception handling has to be fixed. If they should not be allowed, then at some point this "feature" should be removed from the PHP interpreter.