Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73913 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 72456 invoked from network); 5 May 2014 19:31:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 May 2014 19:31:33 -0000 Authentication-Results: pb1.pair.com header.from=php@thekid.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=php@thekid.de; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain thekid.de from 212.227.17.24 cause and error) X-PHP-List-Original-Sender: php@thekid.de X-Host-Fingerprint: 212.227.17.24 mout.kundenserver.de Received: from [212.227.17.24] ([212.227.17.24:54513] helo=mout.kundenserver.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D2/32-44049-317E7635 for ; Mon, 05 May 2014 15:31:32 -0400 Received: from oxbsltgw03.schlund.de (oxbsltgw03.schlund.de [172.19.249.20]) by mrelayeu.kundenserver.de (node=mreue102) with ESMTP (Nemesis) id 0LxfAZ-1Wvkk02hxL-017IFZ; Mon, 05 May 2014 21:31:27 +0200 Date: Mon, 5 May 2014 21:31:27 +0200 (CEST) Reply-To: Timm Friebe To: "internals@lists.php.net" , Dmitry Stogov Message-ID: <751759711.302828.1399318287637.open-xchange@email.1und1.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Priority: 3 Importance: Medium X-Mailer: Open-Xchange Mailer v7.4.2-Rev18 X-Provags-ID: V02:K0:g3u+9fgiXvSZuNAK81cyq+O+OFhFoKRSsA18ewoS/q9 A660p52fd2WFa1gTtyfU1kzbb5Z+y6wpzAB4uemDh1qe6vKdH7 oxvfek9AnsrSoO1azaWbtCzZyNK6drpas2chdFK/UcYdSTi3kO JsUsP+nIFI9hPKKLwnjI/Ya+wPxFZDuh2H6bIZ2QEvLC7mesH0 YFRggNUk/vSF/BxN6Sn48EujV677cEDLqLVP6C0E6exm2cq450 f/SPP6uC2xD/uv7eIyROTj7J4+6z38TyS2R/9IjXGLWH5yosyo RJEfdkk8uCAZ//vuFUz8cdlyTU1470rTGtENEvsMk0gR2g6k7v Gi5pViejE82wzWtuz/RRHlIYQm6Vj7y/QTW+uNfKCj4lD65Ee3 dNupuMK4coelLY4GrHVzS0iPns0pL7lMJM= Subject: Re: phpng: Refactored PHP Engine with Big Performance Improvement From: php@thekid.de (Timm Friebe) Hi again, > ... It's been brought to my attention that in my previous comparison, there wer= e also two skipped tests I'd overlooked, I've commented them so we're actuall= y comparing apples with apples. Also, I got a couple more tests working, so h= ere we go: 5.5 OK: 2987/3013 run (26 skipped), 2987 succeeded, 0 failed Memory used: 37065.45 kB (37350.91 kB peak) Time taken: 2.133 seconds phpng OK: 2987/3013 run (26 skipped), 2987 succeeded, 0 failed Memory used: 29315.42 kB (29583.73 kB peak) Time taken: 1.603 seconds > (I=E2=80=99ll have a look into these and try to figure out what=E2=80=99s= going on) Here's my summary of why there are failing tests (all of these work fine wi= th 5.4, 5.6-beta2, 5.7-dev-master). I've tried fixing them but haven't succeed= ed, but I thought I'd tell you anyways. 1) Process control functions =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D proc_close() seems to always return exit code 1 regardless of the actual ex= it code: $ ./sapi/cli/php -r '$p=3D proc_open("ls -al buildconf", [0 =3D> ["pipe", "= r"], 1 =3D> ["pipe", "w"], 2 =3D> ["pipe", "w"]], $pipes); var_dump(fread($pipes[1], 10= 24)); foreach ($pipes as $pipe) { fclose($pipe); } var_dump(proc_close($p));' string(54) "-rwxr-xr-x 1 friebe friebe 772 Apr 18 16:21 buildconf " int(1) (should be: 0) $ ./sapi/cli/php -r '$p=3D proc_open("ls -=C3=BC", [0 =3D> ["pipe", "r"], 1= =3D> ["pipe", "w"], 2 =3D> ["pipe", "w"]], $pipes); var_dump(fread($pipes[1], 1024)); for= each ($pipes as $pipe) { fclose($pipe); } var_dump(proc_close($p));' string(0) "" int(1) (should be: 2) It works fine in both situations if I don't explicitely fclose() all the pi= pes. 2) Fatal error with DateTime =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D DateTime::date_timezone_set() must be derived from Date::date_timezone_set = in Unknown on line 0 DateTimeInterface::date_format() must be derived from Date::date_format in Unknown on line 0 Unfortunately I can't exactly produce a small script to reproduce, but the `Date` class mentioned above basically does this: class Date extends Object { =C2=A0 public function __construct($in) { =C2=A0 =C2=A0 $this->value=3D date_create($in, timezone_open(...)); =C2=A0 } } These errors are both produced by zend_parse_method_parameters(), where thi= s_ptr points to the class `Date` and not to `DateTime`. I've only seen them with = the date extension, nowhere else so far. Maybe that helps you. 3) Fatal error: Can only throw objects =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D References cause this. The ensure() function prevents uninitialized variabl= e warnings: $ ./sapi/cli/php -r 'function ensure(&$e) { if ($e) return true; $e=3D null= ; return false; } $e=3D new Exception(""); if (ensure($e)) { throw $e; }' Fatal error: Can only throw objects in Command line code on line 1 Expected outcome: PHP Fatal error:=C2=A0 Uncaught exception 'Exception' in Command line code:= 1 # ... Adding a var_dump($e) right before the `throw` will actually dump the excep= tion, so I guess this some refcount issue. -Timm