<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.php.devel">
    <title>gmane.comp.php.devel</title>
    <link>http://blog.gmane.org/gmane.comp.php.devel</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.php.devel/80349"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.php.devel/80346"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.php.devel/80343"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.php.devel/80338"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.php.devel/80337"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.php.devel/80336"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.php.devel/80327"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.php.devel/80326"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.php.devel/80325"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.php.devel/80324"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.php.devel/80320"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.php.devel/80316"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.php.devel/80298"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.php.devel/80291"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.php.devel/80277"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.php.devel/80272"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.php.devel/80270"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.php.devel/80269"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.php.devel/80264"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.php.devel/80230"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.comp.php.devel/80349">
    <title>[PHP-DEV] ZEND_NS_NAMED_FE is clearly a frequently used macro</title>
    <link>http://comments.gmane.org/gmane.comp.php.devel/80349</link>
    <description>&lt;pre&gt;It's time to play "Spot the double quoting!"

#define ZEND_NS_FENTRY(ns, zend_name, name, arg_info, flags)
 ZEND_RAW_FENTRY(ZEND_NS_NAME(ns, #zend_name), name, arg_info, flags)

#define ZEND_NS_NAMED_FE(ns, zend_name, name, arg_info) ZEND_NS_FENTRY(ns,
#zend_name, name, arg_info, 0)


ZEND_NS_NAMED_FE("foo", bar, ...)

Gets exported to userspace as: foo\"bar" which is obviously fail.

Any objections to my fixing ZEND_NS_NAMED_FE as: s/#zend/zend/ ?

-Sara
&lt;/pre&gt;</description>
    <dc:creator>Sara Golemon</dc:creator>
    <dc:date>2013-05-21T17:45:57</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.php.devel/80346">
    <title>[PHP-DEV] [Proposal] Add method to shmop ext to retrieve OS shmid</title>
    <link>http://comments.gmane.org/gmane.comp.php.devel/80346</link>
    <description>&lt;pre&gt;This grew out of a question I answered on StackOverflow.com:
http://stackoverflow.com/questions/16501707/working-with-shared-memory-in-php/

The gist is that a user was converting a C program to PHP and wanted
the shmid as reported by ipcs. The user assumed that the id returned
by shmop_open would be the shmid, and was confused by the shmop
resource identifier. (I explained to him what the return actually was)

I suggested he use his own unique key to be able to identify the
shared memory created for his script, but he said that it had to be
0x0.

I've added a function to retrieve shmop-&amp;gt;shmid in my own fork of PHP.
You can see the changes here and the commit message contains a quick
usage/test script:
https://github.com/nedwidek/php-src/commit/832e77fce15de926b562b6dcc28d1864bb7c348b

So I guess the questions are:
Is there a particular reason that the shmid is hidden from PHP scripts?
Is there any reason not to move this to a formal RFC?
Should similar methods be added to the sysv* extensions where applicable?
Assuming this is an acceptable change to consider, anyone have a
better function name than shmop_sys_shmid?

Regards,
Erik Nedwidek
&lt;/pre&gt;</description>
    <dc:creator>Erik Nedwidek</dc:creator>
    <dc:date>2013-05-18T14:50:17</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.php.devel/80343">
    <title>[PHP-DEV] hash_pbkdf2 vs openssl_pbkdf2</title>
    <link>http://comments.gmane.org/gmane.comp.php.devel/80343</link>
    <description>&lt;pre&gt;Hi internals!

I just noticed that we added the PBKDF2 algorithm two times in PHP 5.5.
Once in the hash extension, once in the OpenSSL extension.

The hash_pbkdf2 function was added via this RFC:
https://wiki.php.net/rfc/hash_pbkdf2

The openssl_pbkdf2 function probably was not noticed at that time because
it was just commited, but not mentioned anywhere else (NEWS, UPGRADING,
etc). Only saw it in vrana's documentation updates just now. The relevant
commit is here: https://github.com/php/php-src/commit/f4847ef

It would be nice if we could have only one of those functions. I'm
currently tending towards the hash_ variant because of the commit message
of the openssl_ function:

support optional
has it already
parameter so it can be

It seems that the author already would have preferred it in the hash
extension and that the openssl variant only works with sha1 (or was only
tested with it? not sure).

Nikita
&lt;/pre&gt;</description>
    <dc:creator>Nikita Popov</dc:creator>
    <dc:date>2013-05-18T09:48:58</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.php.devel/80338">
    <title>[PHP-DEV] Stand alone GD status?</title>
    <link>http://comments.gmane.org/gmane.comp.php.devel/80338</link>
    <description>&lt;pre&gt;Hi Folks,

I tried to post this note via the web interace, but I don't think it made
it, so here it is again. I finally figured out how to subscribe to the list
properly.

(side NOTE: how to subscribe to the lists is very poorly documented --
there is nice whole page about all the php lists, but no links or docs
about how to subscribe. Elsewhere, I found how to subscribe to php-general,
and extrapolated from that -- however, it took a bunch of failed attempts,
and much frustration, before I figured out that list list is called
"internals" rather than "php.internals" or "php-internals", or ???. But I
guess that weeds out the less-persistent!)

Sorry if it's a repeat.

I'm interesting in the status of the GD lib as a stand-alone library. I'd
like to use it on it's own, and perhaps write some new python bindings for
it.

But as we all know the state of libGD's web presence is confusing (though
recently improved). I have found it hard to:

1) know which source code I should use
2) find the docs
3) figure out where to ask questions, perhaps post patches, etc. (why I'm
posting to this list)

So;

a) is there a mailing list or something that I missed?
b) is there interest (probably from Pierre or Tom) to continue to maintain
it, clean up its web presence, etc.? (note -- there really isn'ta ll that
much to do to improve the situation a lot -- simply putting all the code,
docs, and a small info page all in one place, and having a mailing list)

I like GD, as it is simple, fast, and does what I need it to do. I'd rather
not get into the mess of Cairo, or AGG, or skia (though skia does look
pretty promising...). But I do need to know that there's some support
before committing much effort to it.

-Chris

&lt;/pre&gt;</description>
    <dc:creator>Chris Barker - NOAA Federal</dc:creator>
    <dc:date>2013-05-17T16:55:04</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.php.devel/80337">
    <title>[PHP-DEV] php-fpm and systemd integration</title>
    <link>http://comments.gmane.org/gmane.comp.php.devel/80337</link>
    <description>&lt;pre&gt;Hi,

I plan to allow php-fpm to be aware of systemd and so, use the
type=notify mode.

I'd like to apply to attached patch to 5.4 and 5.5, as this change have
no impact on standard build (need new --with-fpm-systemd build option).

Any feedback before I process ?


Remi.
diff -up ../sapi/fpm/config.m4.systemd ../sapi/fpm/config.m4
--- ../sapi/fpm/config.m4.systemd2013-05-08 18:45:31.000000000 +0200
+++ ../sapi/fpm/config.m42013-05-17 12:20:19.199841304 +0200
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -563,6 +563,26 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; if test "$PHP_FPM" != "no"; then
   [  --with-fpm-group[=GRP]  Set the group for php-fpm to run as. For a system user, this 
                   should usually be set to match the fpm username (default: nobody)], nobody, no)
 
+  PHP_ARG_WITH(fpm-systemd,,
+  [  --with-fpm-systemd      Activate systemd integration], no, no)
+
+  if test "$PHP_FPM_SYSTEMD" != "no" ; then
+    AC_CHECK_LIB(systemd-daemon, sd_notify, SYSTEMD_LIBS="-lsystemd-daemon")
+    AC_CHECK_HEADERS(systemd/sd-daemon.h, [HAVE_SD_DAEMON_H="yes"], [HAVE_SD_DAEMON_H="no"])
+    if test $HAVE_SD_DAEMON_H = "no" || test -z "${SYSTEMD_LIBS}"; then
+      AC_MSG_ERROR([Your system does not support systemd.])
+    else
+      AC_DEFINE(HAVE_SYSTEMD, 1, [FPM use systemd integration])
+      PHP_FPM_SD_FILES="fpm/fpm_systemd.c"
+      PHP_ADD_LIBRARY(systemd-daemon)
+      php_fpm_systemd=notify
+    fi
+  else
+    php_fpm_systemd=simple
+  fi
+  PHP_SUBST_OLD(php_fpm_systemd)
+  AC_DEFINE_UNQUOTED(PHP_FPM_SYSTEMD, "$php_fpm_systemd", [fpm systemd service type])
+
   if test -z "$PHP_FPM_USER" -o "$PHP_FPM_USER" = "yes" -o "$PHP_FPM_USER" = "no"; then
     php_fpm_user="nobody"
   else
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -631,7 +651,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; if test "$PHP_FPM" != "no"; then
 fpm/events/port.c \
   "
 
-  PHP_SELECT_SAPI(fpm, program, $PHP_FPM_FILES $PHP_FPM_TRACE_FILES, $PHP_FPM_CFLAGS, '$(SAPI_FPM_PATH)')
+  PHP_SELECT_SAPI(fpm, program, $PHP_FPM_FILES $PHP_FPM_TRACE_FILES $PHP_FPM_SD_FILES, $PHP_FPM_CFLAGS, '$(SAPI_FPM_PATH)')
 
   case $host_alias in
       *aix*)
diff -up ../sapi/fpm/fpm/fpm_events.c.systemd ../sapi/fpm/fpm/fpm_events.c
--- ../sapi/fpm/fpm/fpm_events.c.systemd2013-05-08 18:45:31.000000000 +0200
+++ ../sapi/fpm/fpm/fpm_events.c2013-05-17 13:13:10.854896820 +0200
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -29,6 +29,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "events/port.h"
 #include "events/kqueue.h"
 
+#ifdef HAVE_SYSTEMD
+#include "fpm_systemd.h"
+#endif
+
 #define fpm_event_set_timeout(ev, now) timeradd(&amp;amp;(now), &amp;amp;(ev)-&amp;gt;frequency, &amp;amp;(ev)-&amp;gt;timeout);
 
 static void fpm_event_cleanup(int which, void *arg);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -361,6 +365,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void fpm_event_loop(int err) /* {{{ */
 
 zlog(ZLOG_DEBUG, "%zu bytes have been reserved in SHM", fpm_shm_get_size_allocated());
 zlog(ZLOG_NOTICE, "ready to handle connections");
+
+#ifdef HAVE_SYSTEMD
+fpm_systemd_heartbeat(NULL, 0, NULL);
+#endif
 }
 
 while (1) {
diff -up ../sapi/fpm/fpm/fpm_systemd.c.systemd ../sapi/fpm/fpm/fpm_systemd.c
--- ../sapi/fpm/fpm/fpm_systemd.c.systemd2013-05-17 12:20:19.200841309 +0200
+++ ../sapi/fpm/fpm/fpm_systemd.c2013-05-17 14:18:36.851079208 +0200
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,74 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+#include "fpm_config.h"
+
+#include &amp;lt;sys/types.h&amp;gt;
+#include &amp;lt;systemd/sd-daemon.h&amp;gt;
+
+#include "fpm.h"
+#include "fpm_clock.h"
+#include "fpm_worker_pool.h"
+#include "fpm_scoreboard.h"
+#include "zlog.h"
+#include "fpm_systemd.h"
+
+
+static void fpm_systemd() /* {{{ */
+{
+static unsigned long int last=0;
+struct fpm_worker_pool_s *wp;
+unsigned long int requests=0, slow_req=0;
+int active=0, idle=0, rv;
+
+
+for (wp = fpm_worker_all_pools; wp; wp = wp-&amp;gt;next) {
+if (wp-&amp;gt;scoreboard) {
+active   += wp-&amp;gt;scoreboard-&amp;gt;active;
+idle     += wp-&amp;gt;scoreboard-&amp;gt;idle;
+requests += wp-&amp;gt;scoreboard-&amp;gt;requests;
+slow_req += wp-&amp;gt;scoreboard-&amp;gt;slow_rq;
+}
+}
+/*
+zlog(ZLOG_DEBUG, "systemd heartbeat (Processes active:%d, idle:%d, Requests:%lu, slow:%lu, Traffic:%.3greq/sec)", 
+active, idle, requests, slow_req, ((float)requests - last) * 1000.0 / FPM_SYSTEMD_HEARTBEAT);
+*/
+rv = sd_notifyf(0, "READY=1\n"
+"STATUS=Processes active: %d, idle: %d, Requests: %lu, slow: %lu, Traffic: %.3greq/sec",
+active, idle, requests, slow_req, ((float)requests - last) * 1000.0 / FPM_SYSTEMD_HEARTBEAT);
+
+if (rv &amp;lt; 0) {
+zlog(ZLOG_NOTICE, "failed to notify systemd");
+}
+
+last = requests;
+}
+/* }}} */
+
+void fpm_systemd_heartbeat(struct fpm_event_s *ev, short which, void *arg) /* {{{ */
+{
+static struct fpm_event_s heartbeat;
+
+if (fpm_globals.parent_pid != getpid()) {
+return; /* sanity check */
+}
+
+if (which == FPM_EV_TIMEOUT) {
+fpm_systemd();
+
+return;
+}
+
+if (sd_notifyf(0, "READY=1\n"
+          "STATUS=ready to handle connections\n"
+          "MAINPID=%lu",
+          (unsigned long) getpid()) &amp;lt; 0) {
+zlog(ZLOG_WARNING, "failed to notify systemd");
+} else {
+zlog(ZLOG_DEBUG, "have notify systemd");
+}
+
+/* first call without setting which to initialize the timer */
+fpm_event_set_timer(&amp;amp;heartbeat, FPM_EV_PERSIST, &amp;amp;fpm_systemd_heartbeat, NULL);
+fpm_event_add(&amp;amp;heartbeat, FPM_SYSTEMD_HEARTBEAT);
+}
+/* }}} */
+
diff -up ../sapi/fpm/fpm/fpm_systemd.h.systemd ../sapi/fpm/fpm/fpm_systemd.h
--- ../sapi/fpm/fpm/fpm_systemd.h.systemd2013-05-17 12:20:19.200841309 +0200
+++ ../sapi/fpm/fpm/fpm_systemd.h2013-05-17 14:02:37.400247799 +0200
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+#ifndef FPM_SYSTEMD_H
+#define FPM_SYSTEMD_H 1
+
+#include "fpm_events.h"
+
+/* 10s (in ms) heartbeat for systemd status */
+#define FPM_SYSTEMD_HEARTBEAT (10000)
+
+void fpm_systemd_heartbeat(struct fpm_event_s *ev, short which, void *arg);
+
+#endif
+
diff -up ../sapi/fpm/php-fpm.service.in.systemd ../sapi/fpm/php-fpm.service.in
--- ../sapi/fpm/php-fpm.service.in.systemd2013-05-08 18:45:31.000000000 +0200
+++ ../sapi/fpm/php-fpm.service.in2013-05-17 12:20:19.201841314 +0200
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -3,6 +3,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; Description=The PHP FastCGI Process Mana
 After=syslog.target network.target
 
 [Service]
+Type=&amp;lt; at &amp;gt;php_fpm_systemd&amp;lt; at &amp;gt;
 PIDFile=&amp;lt; at &amp;gt;localstatedir&amp;lt; at &amp;gt;/run/php-fpm.pid
 ExecStart=&amp;lt; at &amp;gt;sbindir&amp;lt; at &amp;gt;/php-fpm --nodaemonize --fpm-config &amp;lt; at &amp;gt;sysconfdir&amp;lt; at &amp;gt;/php-fpm.conf
 ExecReload=/bin/kill -USR2 $MAINPID
&lt;/pre&gt;</description>
    <dc:creator>Remi Collet</dc:creator>
    <dc:date>2013-05-17T16:44:01</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.php.devel/80336">
    <title>[PHP-DEV] Firebird PDO Fixes</title>
    <link>http://comments.gmane.org/gmane.comp.php.devel/80336</link>
    <description>&lt;pre&gt;Hello,

I have some fixes for pdo-firebird I sent as pull requests on github. I
contacted the php developer Mariuz, but he's currently busy and is unable
to review and commit the changes to master.

Could someone please review them for inclusion in the next php release?

Thanks.

&lt;/pre&gt;</description>
    <dc:creator>Matheus Degiovani</dc:creator>
    <dc:date>2013-05-17T10:41:11</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.php.devel/80327">
    <title>[PHP-DEV] Memory leak in include()/require() ?</title>
    <link>http://comments.gmane.org/gmane.comp.php.devel/80327</link>
    <description>&lt;pre&gt;hi, did anyone come across the memory leak of require()/include(),
I just saw this bug report: https://bugs.php.net/bug.php?id=47038, 
but it was closed with nothing explained.


the php version I used:

php --version
PHP 5.3.6-13ubuntu3.9 with Suhosin-Patch (cli) (built: Sep 12 2012 19:00:27)
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies




&lt;/pre&gt;</description>
    <dc:creator>peter wang</dc:creator>
    <dc:date>2013-05-16T09:24:19</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.php.devel/80326">
    <title>[PHP-DEV] OPCache documentation</title>
    <link>http://comments.gmane.org/gmane.comp.php.devel/80326</link>
    <description>&lt;pre&gt;Hi all,

As you know, 5.5 final is coming soon.
We are in RC, so mainly stabilizing stuff and preparing the final release
for anyone to setup 5.5 on their servers.

I see the documentation migration guide has already been commited, that's a
good new.
I also see that new features we ship in 5.5 are online in the
documentation, great !

But a crucial feature is missing doc : OPCache.

As this feature is a very big step in PHP's life (we finally have a
recommanded, bundled opcode cache system, and I'm very proud of this
personnaly), I think it is crucial to have a good documentation about it.

Has anyone started to write some doc about OPCache ?

Another subject is APC. We have its doc on php.net, all right.
What I would like is we patch APC doc when 5.5 final gets released, to
clearly show our mind about it.
That way, any people using 5.5 should be able to read in the doc that APC
has support has been interrupted, that APC should never be used together
with OPCache, and that OPCache is now the standard recommanded OPCode
caching solution for 5.5, 5.4 and 5.3.

It is crucial to communicate one this point for our users.

Then will come the "User cache" debate

Thank you.

Julien.Pauli
&lt;/pre&gt;</description>
    <dc:creator>Julien Pauli</dc:creator>
    <dc:date>2013-05-15T13:54:38</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.php.devel/80325">
    <title>[PHP-DEV] [PROPOSAL] apparmor change_hat functionality in fpm</title>
    <link>http://comments.gmane.org/gmane.comp.php.devel/80325</link>
    <description>&lt;pre&gt;Hi!

The basic idea behind this is to get a better seperation of different php
pools (so e.g. php scripts from one pool can't access the other and vice
versa).

I did a small patch (https://github.com/php/php-src/pull/343) that adds a
configuration parameter to pools (apparmor_hat). If this is set, workers of
the pool try to change the apparmor hat to the specified value.
The patch only touches fpm. Only thing that's needed is libapparmor - if it
is not there the functionality just gets left out.

To keep things simple this version is very coarse - meaning it is not
possible to change the hat back, or change to a different hat according to
the executed script.


Any thoughts on this?

Cheers,
Gernot
&lt;/pre&gt;</description>
    <dc:creator>Gernot Vormayr</dc:creator>
    <dc:date>2013-05-15T13:02:39</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.php.devel/80324">
    <title>[PHP-DEV] [PROPOSAL] apparmor change_hat functionality in fpm</title>
    <link>http://comments.gmane.org/gmane.comp.php.devel/80324</link>
    <description>&lt;pre&gt;Hi!

The basic idea behind this is to get a better seperation of different php
pools (so e.g. php scripts from one pool can't access the other and vice
versa).

I did a small patch (https://github.com/php/php-src/pull/343) that adds a
configuration parameter to pools (apparmor_hat). If this is set, workers of
the pool try to change the apparmor hat to the specified value.
The patch only touches fpm. Only thing that's needed is libapparmor - if it
is not there the functionality just gets left out.

To keep things simple this version is very coarse - meaning it is not
possible to change the hat back, or change to a different hat according to
the executed script.


Any thoughts on this?
&lt;/pre&gt;</description>
    <dc:creator>Gernot Vormayr</dc:creator>
    <dc:date>2013-05-15T12:52:48</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.php.devel/80320">
    <title>[PHP-DEV] MultipleIterator, add a default value</title>
    <link>http://comments.gmane.org/gmane.comp.php.devel/80320</link>
    <description>&lt;pre&gt;Hi internals,

I propose to ameliorate the MultipleIterator class.

When a MultipleIterator instance has the MIT_NEED_ANY flag, and when one 
of the attached iterators has reached its end, the returned value is 
NULL. I propose to change this behavior by allowing a different default 
value.

Example with no default value:

     $it = new \MultipleIterator(
         \MultipleIterator::MIT_NEED_ANY
       | \MultipleIterator::MIT_KEYS_ASSOC
     );
     $it-&amp;gt;attachIterator(new \ArrayIterator(['a', 'b', 'c']), 'foo');
     $it-&amp;gt;attachIterator(new \ArrayIterator(['x']),           'bar');

     foreach($it as $value)
         echo $value['foo'], ' =&amp;gt; ', $value['bar'], "\n";

     /**
      * Will output:
      *     a =&amp;gt; x
      *     b =&amp;gt;
      *     c =&amp;gt;
      */

Example with 42 as a default value (given as a third parameter of the 
MultipleIterator::attachIterator method):

     $it-&amp;gt;attachIterator(new \ArrayIterator(['a', 'b', 'c']), 'foo', 42);
     $it-&amp;gt;attachIterator(new \ArrayIterator(['x']),           'bar', 42);

     foreach($it as $value)
         echo $value['foo'], ' =&amp;gt; ', $value['bar'], "\n";

     /**
      * Will output:
      *     a =&amp;gt; x
      *     b =&amp;gt; 42
      *     c =&amp;gt; 42
      */

It is clearly useful when one of the iterators returns an array, used 
directly in a loop. To avoid a "NULL pointer exception", we can specify 
an empty array as a default value.

A PHP implementation is pretty easy to do. Naively, we are able to write 
https://github.com/hoaproject/Iterator/commit/59dcff7f331a7338644cf9a8965d2a934a38661e.

If you think it can be useful, I propose to write a RFC with a patch.

Thoughts?

&lt;/pre&gt;</description>
    <dc:creator>Ivan Enderlin &lt; at &gt; Hoa</dc:creator>
    <dc:date>2013-05-14T08:35:48</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.php.devel/80316">
    <title>[PHP-DEV] Heads up - PECL ZendOptimizerPlus repository moved to github.com/zendtech/ZendOptimizerPlus</title>
    <link>http://comments.gmane.org/gmane.comp.php.devel/80316</link>
    <description>&lt;pre&gt;For those of you with direct clones of ZendOptimizerPlus, you’d have to run:

git remote set-url origin git&amp;lt; at &amp;gt;github.com:zendtech/ZendOptimizerPlus.git

on your clones for them to continue working.  This is not related to the
code that’s already inside the PHP tree.



Zeev
&lt;/pre&gt;</description>
    <dc:creator>Zeev Suraski</dc:creator>
    <dc:date>2013-05-13T12:28:02</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.php.devel/80298">
    <title>[PHP-DEV] [RFC] Internal operator overloading and GMP improvements</title>
    <link>http://comments.gmane.org/gmane.comp.php.devel/80298</link>
    <description>&lt;pre&gt;Hi internals!

https://wiki.php.net/rfc/operator_overloading_gmp

This RFC proposes to add operator overloading for INTERNAL classes.
Furthermore it exemplarily implements the new API for GMP.

Thanks,
Nikita
&lt;/pre&gt;</description>
    <dc:creator>Nikita Popov</dc:creator>
    <dc:date>2013-05-12T15:25:11</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.php.devel/80291">
    <title>[PHP-DEV] How about make php php-cgi php-fpm to use a common shared library.</title>
    <link>http://comments.gmane.org/gmane.comp.php.devel/80291</link>
    <description>&lt;pre&gt;This is my ugly patch for this.

&lt;/pre&gt;</description>
    <dc:creator>xinglp</dc:creator>
    <dc:date>2013-05-11T00:59:29</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.php.devel/80277">
    <title>[PHP-DEV] exceptions during __toString()</title>
    <link>http://comments.gmane.org/gmane.comp.php.devel/80277</link>
    <description>&lt;pre&gt;I just ran into this issue again:

http://stackoverflow.com/questions/2429642/why-its-impossible-to-throw-exception-from-tostring

Instead of throwing some nonsense "you're not allowed to throw from here"
error-message, how about actually unwinding the stack and passing the
exception to the global exception-handler?

I understand there's a technical limitation making it difficult/impossible
to handle exceptions during __toString() - and it looks like you can still
try {...} catch (Exception $e) in __toString() just fine, but then what?
You have the exception, but you have no way to pass it to the standard
global exception-handler.

If the script has to terminate either way, why not terminate the same way
an unhandled exception would normally cause the script to terminate?

E.g. output the actual error-message, or pass it to whatever was registered
with register_exception_handler() so it can be output or handled in the
usual way?
&lt;/pre&gt;</description>
    <dc:creator>Rasmus Schultz</dc:creator>
    <dc:date>2013-05-09T22:00:23</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.php.devel/80272">
    <title>[PHP-DEV] list() inside a foreach()</title>
    <link>http://comments.gmane.org/gmane.comp.php.devel/80272</link>
    <description>&lt;pre&gt;Hi,

trying out the following source I was astonished to see that using
list() does not work directly in a foreach() but works fine if used
through a temporary variable.

Would allowing using list() inside the foreach()-statement be desired
behaviour? Or is it just me? :-)


  $a = array(
        array(5, 'A'),
        array(3, 'B'),
  );
  foreach($a as list($k, $v)) {
        echo $k;
  }

Expected output: 53

Result: syntax error, unexpected 'list' (T_LIST) in ...


Works:
  foreach($a as $b) {
list($k, $v) = $b;
        echo $k;
  }


Kind regards,
 Stefan

&lt;/pre&gt;</description>
    <dc:creator>Stefan Neufeind</dc:creator>
    <dc:date>2013-05-09T16:39:03</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.php.devel/80270">
    <title>[PHP-DEV] PHP 5.5 and APC user cache upgrade path</title>
    <link>http://comments.gmane.org/gmane.comp.php.devel/80270</link>
    <description>&lt;pre&gt;Hi,

I am testing PHP 5.5 atm and how we can package it for Arch Linux and
provide an upgrade path for users. The RC1 looks pretty solid so far.

As the new opcache does not provide a user cache to store custom
variables, I would be glad if you could clarify what the best migration
from 5.4 would be.
* Is APC basically dead and wont support PHP 5.5?
* Should APC users switch to opcache and APCu? (with APCu replacing the
APC package)

For PHP application developers:
* Regarding APCu: it provides the old PHP interface function as well as
their own apcu_* functions. They are aliases right now. Should
application developers think about switching to the apcu_-API as new
features will be available only here?

Bonus question:
* Right now very similar functionality is provided by APCu, XCache,
WinCache, YAC etc.. Are there plans to include such functionality inside
PHP in future to make application developers life a little easier? At
least a common API would be great. There were several bugs in
applications as these modules behave a little different regarding return
values etc..

Greetings,

Pierre

&lt;/pre&gt;</description>
    <dc:creator>Pierre Schmitz</dc:creator>
    <dc:date>2013-05-09T12:02:58</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.php.devel/80269">
    <title>[PHP-DEV] First RC of PHP5.5 available</title>
    <link>http://comments.gmane.org/gmane.comp.php.devel/80269</link>
    <description>&lt;pre&gt;Hi Internals,

Our RC1 of PHP 5.5.0 has been released for testing. It fixes some bugs and
possible memleaks against last beta.
You'll find details in the NEWS file.

The packages can be found at:

  http://downloads.php.net/dsp

and windows packages at

  http://windows.php.net/qa

Please test the release carefully and report any bugs.

We are now RC, this means stability only.
Next RC is expected for May 23h.

Thanks you all contributors.

Regards
  Julien and David
&lt;/pre&gt;</description>
    <dc:creator>Julien Pauli</dc:creator>
    <dc:date>2013-05-09T08:53:31</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.php.devel/80264">
    <title>[PHP-DEV] [PATCH] faster and safer fpm config reading</title>
    <link>http://comments.gmane.org/gmane.comp.php.devel/80264</link>
    <description>&lt;pre&gt;commit edae18ccf5c51ae0bcc0e9655ead7540fd42dd9f
Author: Martin Pelikan &amp;lt;pelikan&amp;lt; at &amp;gt;storkhole.cz&amp;gt;
Date:   Wed May 8 02:06:09 2013 +0200

    Faster and safer parsing of fpm configuration.
    
    The current fpm config parser did a read(2) syscall per character,
    which obfuscated debugging strace/ktrace output somewhat.  This also
    makes the 1024 characters per line limit more explicit, so the users
    will know what were they hitting.
    
    It might improve performance during php-fpm load (.03 vs .00 seconds
    on my laptop) but primarily serves to help observing fpm system call
    traces during deployment (in chroot for example).
    
    Signed-off-by: Martin Pelikan &amp;lt;martin.pelikan&amp;lt; at &amp;gt;gmail.com&amp;gt;

diff --git a/sapi/fpm/fpm/fpm_conf.c b/sapi/fpm/fpm/fpm_conf.c
index 0a8a0e3..e004934 100644
--- a/sapi/fpm/fpm/fpm_conf.c
+++ b/sapi/fpm/fpm/fpm_conf.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1447,11 +1447,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void fpm_conf_ini_parser(zval *arg1, zval *arg2, zval *arg3, int callback
 
 int fpm_conf_load_ini_file(char *filename TSRMLS_DC) /* {{{ */
 {
+const int bufsize = 1024;
 int error = 0;
-char buf[1024+1];
-int fd, n;
+char buf[bufsize], *newl;
+int fd, pos = 0;
 int nb_read = 1;
-char c = '*';
 
 int ret = 1;
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1473,36 +1473,48 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int fpm_conf_load_ini_file(char *filename TSRMLS_DC) /* {{{ */
 }
 
 ini_lineno = 0;
+memset(buf, 0, sizeof buf);
 while (nb_read &amp;gt; 0) {
 int tmp;
-memset(buf, 0, sizeof(char) * (1024 + 1));
-for (n = 0; n &amp;lt; 1024 &amp;amp;&amp;amp; (nb_read = read(fd, &amp;amp;c, sizeof(char))) == sizeof(char) &amp;amp;&amp;amp; c != '\n'; n++) {
-buf[n] = c;
-}
-buf[n++] = '\n';
-ini_lineno++;
-ini_filename = filename;
-tmp = zend_parse_ini_string(buf, 1, ZEND_INI_SCANNER_NORMAL, (zend_ini_parser_cb_t)fpm_conf_ini_parser, &amp;amp;error TSRMLS_CC);
-ini_filename = filename;
-if (error || tmp == FAILURE) {
-if (ini_include) free(ini_include);
-ini_recursion--;
-close(fd);
-return -1;
-}
-if (ini_include) {
-char *tmp = ini_include;
-ini_include = NULL;
-fpm_evaluate_full_path(&amp;amp;tmp, NULL, NULL, 0);
-fpm_conf_ini_parser_include(tmp, &amp;amp;error TSRMLS_CC);
-if (error) {
-free(tmp);
+
+nb_read = read(fd, buf + pos, sizeof buf - pos);
+pos = 0;
+
+while ((newl = strchr(buf + pos, '\n')) != NULL) {
+newl[0] = '\0';
+ini_lineno++;
+ini_filename = filename;
+tmp = zend_parse_ini_string(buf + pos, 1, ZEND_INI_SCANNER_NORMAL, (zend_ini_parser_cb_t)fpm_conf_ini_parser, &amp;amp;error TSRMLS_CC);
+ini_filename = filename;
+if (error || tmp == FAILURE) {
+if (ini_include) free(ini_include);
 ini_recursion--;
 close(fd);
 return -1;
 }
-free(tmp);
+if (ini_include) {
+char *tmp = ini_include;
+ini_include = NULL;
+fpm_evaluate_full_path(&amp;amp;tmp, NULL, NULL, 0);
+fpm_conf_ini_parser_include(tmp, &amp;amp;error TSRMLS_CC);
+if (error) {
+free(tmp);
+ini_recursion--;
+close(fd);
+return -1;
+}
+free(tmp);
+}
+
+pos = newl - buf + 1;
+}
+if (nb_read &amp;gt; 0 &amp;amp;&amp;amp; pos == 0) {
+zlog(ZLOG_ERROR, "line %u too long", ini_lineno + 1);
+close(fd);
+return -1;
 }
+memmove(buf, buf + pos, sizeof buf - pos);
+pos = sizeof buf - pos;
 }
 
 ini_recursion--;


&lt;/pre&gt;</description>
    <dc:creator>Martin Pelikan</dc:creator>
    <dc:date>2013-05-08T00:26:45</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.php.devel/80230">
    <title>[PHP-DEV] idea: implement a Comparable interface</title>
    <link>http://comments.gmane.org/gmane.comp.php.devel/80230</link>
    <description>&lt;pre&gt;It'd be nice if, when doing $objA &amp;gt; $objB, that that'd invoke
$objA-&amp;gt;__compareTo($objB) or something, much like Java's Comparable
interface.
&lt;/pre&gt;</description>
    <dc:creator>Thomas Anderson</dc:creator>
    <dc:date>2013-05-07T16:17:20</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.php.devel/80229">
    <title>[PHP-DEV] idea: letting the line number and file name be set via user_error</title>
    <link>http://comments.gmane.org/gmane.comp.php.devel/80229</link>
    <description>&lt;pre&gt;If you do user_error('whatever') it'll show, as the line number for that
error, the line number on which that user_error() call is made.  It'd be
nice if you could control the line number and file name that was displayed.
eg.

&amp;lt;?php
function test() {
    user_error('whatever');
}

test();
?&amp;gt;

That'll say "Notice: whatever in ... on line 4" (ie. the line that the
user_error is on) instead of "Notice: whatever in ... on line 7" (ie. the
line that the call to the test() function is made).

If the displayed line numbers could be controlled by user_error then
debug_backtrace could be used to get the desired line number / file name to
display.
&lt;/pre&gt;</description>
    <dc:creator>Thomas Anderson</dc:creator>
    <dc:date>2013-05-07T16:09:01</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.php.devel">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.php.devel</link>
  </textinput>
</rdf:RDF>
