[PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING

2012-03-04 Thread Pierre Joye
pajoye   Sun, 04 Mar 2012 17:02:55 +

Revision: http://svn.php.net/viewvc?view=revision&revision=323886

Log:
- notes about xp&2003 drop

Changed paths:
U   php/php-src/trunk/NEWS
U   php/php-src/trunk/UPGRADING

Modified: php/php-src/trunk/NEWS
===
--- php/php-src/trunk/NEWS  2012-03-04 17:00:40 UTC (rev 323885)
+++ php/php-src/trunk/NEWS  2012-03-04 17:02:55 UTC (rev 323886)
@@ -3,6 +3,7 @@
 ?? ??? 201?, PHP 5.5.0

 - General improvements:
+  . Drop Windows XP and 2003 support. (Pierre)
   . World domination

 - cURL:

Modified: php/php-src/trunk/UPGRADING
===
--- php/php-src/trunk/UPGRADING 2012-03-04 17:00:40 UTC (rev 323885)
+++ php/php-src/trunk/UPGRADING 2012-03-04 17:02:55 UTC (rev 323886)
@@ -137,7 +137,7 @@
 13. Windows support
 ===

--
+- Drop Windows XP and 2003 support. (Pierre)

 ===
 14. New in PHP X.Y:

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING

2012-03-04 Thread Nikita Popov
nikicSun, 04 Mar 2012 16:32:01 +

Revision: http://svn.php.net/viewvc?view=revision&revision=323881

Log:
NEWS and UPGRADING for r323862

Changed paths:
U   php/php-src/trunk/NEWS
U   php/php-src/trunk/UPGRADING

Modified: php/php-src/trunk/NEWS
===
--- php/php-src/trunk/NEWS  2012-03-04 16:20:55 UTC (rev 323880)
+++ php/php-src/trunk/NEWS  2012-03-04 16:32:01 UTC (rev 323881)
@@ -28,6 +28,10 @@
still exists for backward compatibility but is doing nothing). 
(Pierrick)
   . Fixed bug #54995 (Missing CURLINFO_RESPONSE_CODE support). (Pierrick)

+- PCRE:
+  . Deprecated the /e modifier
+(https://wiki.php.net/rfc/remove_preg_replace_eval_modifier). (Nikita 
Popov)
+
 - pgsql
   . Added pg_escape_literal() and pg_escape_identifier() (Yasuo)


Modified: php/php-src/trunk/UPGRADING
===
--- php/php-src/trunk/UPGRADING 2012-03-04 16:20:55 UTC (rev 323880)
+++ php/php-src/trunk/UPGRADING 2012-03-04 16:32:01 UTC (rev 323881)
@@ -72,7 +72,8 @@
 7. Deprecated
 =

--
+- The preg_replace /e modifier is now deprecated.
+  You should use preg_replace_callback instead.

 ==
 8. Removed

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING ext/snmp/snmp.c ext/snmp/tests/snmp_get_valueretrieval.phpt ext/snmp/tests/snmp_getvalue.phpt

2011-07-17 Thread Boris Lytochkin
lytboris Sun, 17 Jul 2011 17:27:00 +

Revision: http://svn.php.net/viewvc?view=revision&revision=31

Log:
fix FR #54502: allow user to change OID value output mode when 
SNMP_VALUE_OBJECT is used.

Bug: https://bugs.php.net/54502 (Feedback) Add support for the "BITS" datatype
  
Changed paths:
U   php/php-src/trunk/NEWS
U   php/php-src/trunk/UPGRADING
U   php/php-src/trunk/ext/snmp/snmp.c
U   php/php-src/trunk/ext/snmp/tests/snmp_get_valueretrieval.phpt
U   php/php-src/trunk/ext/snmp/tests/snmp_getvalue.phpt

Modified: php/php-src/trunk/NEWS
===
--- php/php-src/trunk/NEWS	2011-07-17 17:21:54 UTC (rev 313332)
+++ php/php-src/trunk/NEWS	2011-07-17 17:27:00 UTC (rev 31)
@@ -221,6 +221,9 @@
   . Allow ~infinite OIDs in GET/GETNEXT/SET queries. Autochunk them to max_oids
 upon request.
   . Introducing unit tests for extension with ~full coverage.
+  . Way of representing OID value can now be changed when SNMP_VALUE_OBJECT
+is used for value output mode. Use or'ed SNMP_VALUE_LIBRARY(default if
+not specified) or SNMP_VALUE_PLAIN. (FR #54502)
   . Fixed bugs
 . #44193 (snmp v3 noAuthNoPriv doesn't work)
 . #45893 (Snmp buffer limited to 2048 char)

Modified: php/php-src/trunk/UPGRADING
===
--- php/php-src/trunk/UPGRADING	2011-07-17 17:21:54 UTC (rev 313332)
+++ php/php-src/trunk/UPGRADING	2011-07-17 17:27:00 UTC (rev 31)
@@ -283,6 +283,13 @@
  - Multi OID get/getnext/set queries are now supported.
  - New constants added for use in snmp_set_oid_output_format()
function.
+ - Function snmp_set_valueretrieval() changed it's behaviour:
+SNMP_VALUE_OBJECT can be combined with one of
+SNMP_VALUE_PLAIN or SNMP_VALUE_LIBRARY resulting OID value
+changes. When no SNMP_VALUE_PLAIN or SNMP_VALUE_LIBRARY
+is supplied with SNMP_VALUE_OBJECT, SNMP_VALUE_LIBRARY is used.
+Prior to 5.4.0 when no SNMP_VALUE_PLAIN or SNMP_VALUE_LIBRARY
+was supplied with SNMP_VALUE_OBJECT, SNMP_VALUE_PLAIN was used.
  - Added feature-rich OO API (SNMP class)
  - Dropped UCD-SNMP compatibility code. Consider upgrading to
net-snmp v5.3+. Net-SNMP v5.4+ is required for Windows version.

Modified: php/php-src/trunk/ext/snmp/snmp.c
===
--- php/php-src/trunk/ext/snmp/snmp.c	2011-07-17 17:21:54 UTC (rev 313332)
+++ php/php-src/trunk/ext/snmp/snmp.c	2011-07-17 17:27:00 UTC (rev 31)
@@ -94,9 +94,9 @@
 	}
 #endif

-#define SNMP_VALUE_LIBRARY	0
-#define SNMP_VALUE_PLAIN	1
-#define SNMP_VALUE_OBJECT	2
+#define SNMP_VALUE_LIBRARY	(0 << 0)
+#define SNMP_VALUE_PLAIN	(1 << 0)
+#define SNMP_VALUE_OBJECT	(1 << 1)

 typedef struct snmp_session php_snmp_session;
 #define PHP_SNMP_SESSION_RES_NAME "SNMP session"
@@ -559,7 +559,7 @@
 	int buflen = sizeof(sbuf) - 1;
 	int val_len = vars->val_len;

-	if (valueretrieval == SNMP_VALUE_LIBRARY) {
+	if ((valueretrieval & SNMP_VALUE_PLAIN) == 0) {
 		val_len += 32; /* snprint_value will add type info into value, make some space for it */
 	}

@@ -575,96 +575,92 @@

 	*buf = 0;

-	if (valueretrieval == SNMP_VALUE_LIBRARY) {
-		snprint_value(buf, buflen, vars->name, vars->name_length, vars);
-		ZVAL_STRING(snmpval, buf, 1);
-		if(dbuf){ /* malloc was used to store value */
-			efree(dbuf);
-		}
-		return;
-	}
-
 	MAKE_STD_ZVAL(val);

-	switch (vars->type) {
-	case ASN_BIT_STR:		/* 0x03, asn1.h */
-		ZVAL_STRINGL(val, (char *)vars->val.bitstring, vars->val_len, 1);
-		break;
+	if (valueretrieval & SNMP_VALUE_PLAIN) {
+		switch (vars->type) {
+		case ASN_BIT_STR:		/* 0x03, asn1.h */
+			ZVAL_STRINGL(val, (char *)vars->val.bitstring, vars->val_len, 1);
+			break;

-	case ASN_OCTET_STR:		/* 0x04, asn1.h */
-	case ASN_OPAQUE:		/* 0x44, snmp_impl.h */
-		ZVAL_STRINGL(val, (char *)vars->val.string, vars->val_len, 1);
-		break;
+		case ASN_OCTET_STR:		/* 0x04, asn1.h */
+		case ASN_OPAQUE:		/* 0x44, snmp_impl.h */
+			ZVAL_STRINGL(val, (char *)vars->val.string, vars->val_len, 1);
+			break;

-	case ASN_NULL:			/* 0x05, asn1.h */
-		ZVAL_NULL(val);
-		break;
+		case ASN_NULL:			/* 0x05, asn1.h */
+			ZVAL_NULL(val);
+			break;

-	case ASN_OBJECT_ID:		/* 0x06, asn1.h */
-		snprint_objid(buf, buflen, vars->val.objid, vars->val_len / sizeof(oid));
-		ZVAL_STRING(val, buf, 1);
-		break;
+		case ASN_OBJECT_ID:		/* 0x06, asn1.h */
+			snprint_objid(buf, buflen, vars->val.objid, vars->val_len / sizeof(oid));
+			ZVAL_STRING(val, buf, 1);
+			break;

-	case ASN_IPADDRESS:		/* 0x40, snmp_impl.h */
-		snprintf(buf, buflen, "%d.%d.%d.%d",
-			 (vars->val.string)[0], (vars->val.string)[1],
-			 (vars->val.string)[2], (vars->val.string)[3]);
-		buf[buflen]=0

Re: [PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING ext/xsl/php_xsl.c ext/xsl/php_xsl.h ext/xsl/xsl_fe.h ext/xsl/xsltprocessor.c

2011-07-11 Thread Christian Stocker
Hi

I fixed all the things mentioned by Hanned, but my C and PHP-src skills
are a little bit rusty, so could anyone have a quick look at my latest
patch and check if that's ok/better?

https://gist.github.com/7cc9a6263401cd87367f

(if you prefer the whole file, it's here
https://gist.github.com/55d957fc3265699b7d17 )

thanks

chregu


On 11.07.11 13:29, Hannes Magnusson wrote:
> On Mon, Jul 11, 2011 at 13:16, Christian Stocker  wrote:
>> chregu   Mon, 11 Jul 2011 11:16:22 +
>>
>> Revision: http://svn.php.net/viewvc?view=revision&revision=313131
>>
>> Log:
>> Added XsltProcessor::setSecurityPrefs($options) and getSecurityPrefs()
>> to define forbidden operations within XSLT stylesheets, default is not to
>> enable any write operations from XSLT anymore. Bug #54446
>>
> 
> 
> Any reason not to merge it to 5.4?
> 
> + if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET,
> ZEND_NUM_ARGS() TSRMLS_CC, "l", &securityPrefs) == SUCCESS) {
> [..]
> + } else {
> + WRONG_PARAM_COUNT;
> + }
> 
> Thats a freaky way of doing if (zend_parse_parameter(...) == FAILURE)
> { return; } ...
> and won't produce as good errormsg.
> 
> 
> + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Can't set 
> libxslt
> security properties");
> 
> Can be printed out up to 5 times in a row.. shouldn't it say which
> property it was trying to set? And if one of these calls fail, won't
> they all fail?
> 
> 
> -Hannes

-- 
Liip AG  //  Feldstrasse 133 //  CH-8004 Zurich
Tel +41 43 500 39 81 // Mobile +41 76 561 88 60
www.liip.ch // blog.liip.ch // GnuPG 0x0748D5FE


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING ext/xsl/php_xsl.c ext/xsl/php_xsl.h ext/xsl/xsl_fe.h ext/xsl/xsltprocessor.c

2011-07-11 Thread Christian Stocker


On 11.07.11 13:29, Hannes Magnusson wrote:
> On Mon, Jul 11, 2011 at 13:16, Christian Stocker  wrote:
>> chregu   Mon, 11 Jul 2011 11:16:22 +
>>
>> Revision: http://svn.php.net/viewvc?view=revision&revision=313131
>>
>> Log:
>> Added XsltProcessor::setSecurityPrefs($options) and getSecurityPrefs()
>> to define forbidden operations within XSLT stylesheets, default is not to
>> enable any write operations from XSLT anymore. Bug #54446
>>
> 
> 
> Any reason not to merge it to 5.4?

Sure, didn't realise that it was already branched.

> 
> + if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET,
> ZEND_NUM_ARGS() TSRMLS_CC, "l", &securityPrefs) == SUCCESS) {
> [..]
> + } else {
> + WRONG_PARAM_COUNT;
> + }
> 
> Thats a freaky way of doing if (zend_parse_parameter(...) == FAILURE)
> { return; } ...
> and won't produce as good errormsg.

copy&paste ;) I'll fix it.

> + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Can't set 
> libxslt
> security properties");
> 
> Can be printed out up to 5 times in a row.. shouldn't it say which
> property it was trying to set? And if one of these calls fail, won't
> they all fail?

yes, not sure how it can fail at all, but again, I'll try to come up
with a better solution.

Thanks for the feedback, much appreciated

chregu

> 
> 
> -Hannes

-- 
Liip AG  //  Feldstrasse 133 //  CH-8004 Zurich
Tel +41 43 500 39 81 // Mobile +41 76 561 88 60
www.liip.ch // blog.liip.ch // GnuPG 0x0748D5FE


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING ext/xsl/php_xsl.c ext/xsl/php_xsl.h ext/xsl/xsl_fe.h ext/xsl/xsltprocessor.c

2011-07-11 Thread Hannes Magnusson
On Mon, Jul 11, 2011 at 13:16, Christian Stocker  wrote:
> chregu                                   Mon, 11 Jul 2011 11:16:22 +
>
> Revision: http://svn.php.net/viewvc?view=revision&revision=313131
>
> Log:
> Added XsltProcessor::setSecurityPrefs($options) and getSecurityPrefs()
> to define forbidden operations within XSLT stylesheets, default is not to
> enable any write operations from XSLT anymore. Bug #54446
>


Any reason not to merge it to 5.4?

+   if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET,
ZEND_NUM_ARGS() TSRMLS_CC, "l", &securityPrefs) == SUCCESS) {
[..]
+   } else {
+   WRONG_PARAM_COUNT;
+   }

Thats a freaky way of doing if (zend_parse_parameter(...) == FAILURE)
{ return; } ...
and won't produce as good errormsg.


+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Can't set 
libxslt
security properties");

Can be printed out up to 5 times in a row.. shouldn't it say which
property it was trying to set? And if one of these calls fail, won't
they all fail?


-Hannes

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING ext/xsl/php_xsl.c ext/xsl/php_xsl.h ext/xsl/xsl_fe.h ext/xsl/xsltprocessor.c

2011-07-11 Thread Christian Stocker
chregu   Mon, 11 Jul 2011 11:16:22 +

Revision: http://svn.php.net/viewvc?view=revision&revision=313131

Log:
Added XsltProcessor::setSecurityPrefs($options) and getSecurityPrefs()
to define forbidden operations within XSLT stylesheets, default is not to
enable any write operations from XSLT anymore. Bug #54446

Bug: https://bugs.php.net/54446 (error getting bug information)
  
Changed paths:
U   php/php-src/trunk/NEWS
U   php/php-src/trunk/UPGRADING
U   php/php-src/trunk/ext/xsl/php_xsl.c
U   php/php-src/trunk/ext/xsl/php_xsl.h
U   php/php-src/trunk/ext/xsl/xsl_fe.h
U   php/php-src/trunk/ext/xsl/xsltprocessor.c

Modified: php/php-src/trunk/NEWS
===
--- php/php-src/trunk/NEWS	2011-07-11 11:10:09 UTC (rev 313130)
+++ php/php-src/trunk/NEWS	2011-07-11 11:16:22 UTC (rev 313131)
@@ -203,6 +203,11 @@
   . Added SplObjectStorage::getHash() hook. (Etienne)
   . Added CallbackFilterIterator and RecursiveCallbackFilterIterator (Arnaud)

+- Improved XSL extension:
+  . Added XsltProcessor::setSecurityPrefs($options) and getSecurityPrefs() to
+define forbidden operations within XSLT stylesheets, default is not to
+enable any write operations from XSLT anymore. Bug #54446
+
 - Improved ZLIB extension:
   . Re-implemented non-file related functionality. (Mike)


Modified: php/php-src/trunk/UPGRADING
===
--- php/php-src/trunk/UPGRADING	2011-07-11 11:10:09 UTC (rev 313130)
+++ php/php-src/trunk/UPGRADING	2011-07-11 11:16:22 UTC (rev 313131)
@@ -174,6 +174,9 @@
   just the first matching node.
 - All SimpleXMLElement children are now always printed when using var_dump(),
   var_export(), and print_r().
+- Write operations within XSLT (for example with the extension sax:output) are
+  disabled by default. You can define what is forbidden with the method
+  XsltProcess::setSecurityPrefs($options)

 ===
 5. Changes made to existing methods

Modified: php/php-src/trunk/ext/xsl/php_xsl.c
===
--- php/php-src/trunk/ext/xsl/php_xsl.c	2011-07-11 11:10:09 UTC (rev 313130)
+++ php/php-src/trunk/ext/xsl/php_xsl.c	2011-07-11 11:16:22 UTC (rev 313131)
@@ -126,6 +126,7 @@
 	intern->node_list = NULL;
 	intern->doc = NULL;
 	intern->profiling = NULL;
+	intern->securityPrefs = XSL_SECPREF_WRITE_FILE |  XSL_SECPREF_WRITE_NETWORK | XSL_SECPREF_CREATE_DIRECTORY;

 	zend_object_std_init(&intern->std, class_type TSRMLS_CC);
 	object_properties_init(&intern->std, class_type);
@@ -166,6 +167,13 @@
 	REGISTER_LONG_CONSTANT("XSL_CLONE_NEVER",-1, CONST_CS | CONST_PERSISTENT);
 	REGISTER_LONG_CONSTANT("XSL_CLONE_ALWAYS",1, CONST_CS | CONST_PERSISTENT);

+	REGISTER_LONG_CONSTANT("XSL_SECPREF_NONE", XSL_SECPREF_NONE, CONST_CS | CONST_PERSISTENT);
+	REGISTER_LONG_CONSTANT("XSL_SECPREF_READ_FILE",XSL_SECPREF_READ_FILE,CONST_CS | CONST_PERSISTENT);
+	REGISTER_LONG_CONSTANT("XSL_SECPREF_WRITE_FILE",   XSL_SECPREF_WRITE_FILE,   CONST_CS | CONST_PERSISTENT);
+	REGISTER_LONG_CONSTANT("XSL_SECPREF_CREATE_DIRECTORY", XSL_SECPREF_CREATE_DIRECTORY, CONST_CS | CONST_PERSISTENT);
+	REGISTER_LONG_CONSTANT("XSL_SECPREF_READ_NETWORK", XSL_SECPREF_READ_NETWORK, CONST_CS | CONST_PERSISTENT);
+	REGISTER_LONG_CONSTANT("XSL_SECPREF_WRITE_NETWORK",XSL_SECPREF_WRITE_NETWORK,CONST_CS | CONST_PERSISTENT);
+
 	REGISTER_LONG_CONSTANT("LIBXSLT_VERSION",   LIBXSLT_VERSION,CONST_CS | CONST_PERSISTENT);
 	REGISTER_STRING_CONSTANT("LIBXSLT_DOTTED_VERSION",  LIBXSLT_DOTTED_VERSION, CONST_CS | CONST_PERSISTENT);


Modified: php/php-src/trunk/ext/xsl/php_xsl.h
===
--- php/php-src/trunk/ext/xsl/php_xsl.h	2011-07-11 11:10:09 UTC (rev 313130)
+++ php/php-src/trunk/ext/xsl/php_xsl.h	2011-07-11 11:16:22 UTC (rev 313131)
@@ -32,6 +32,7 @@
 #include 
 #include 
 #include 
+#include 
 #if HAVE_XSL_EXSLT
 #include 
 #include 
@@ -43,6 +44,13 @@
 #include 
 #include 

+#define XSL_SECPREF_NONE 0
+#define XSL_SECPREF_READ_FILE 2
+#define XSL_SECPREF_WRITE_FILE 4
+#define XSL_SECPREF_CREATE_DIRECTORY 8
+#define XSL_SECPREF_READ_NETWORK 16
+#define XSL_SECPREF_WRITE_NETWORK 32
+
 typedef struct _xsl_object {
 	zend_object  std;
 	void *ptr;
@@ -55,6 +63,7 @@
 	HashTable *node_list;
 	php_libxml_node_object *doc;
 	char *profiling;
+	long securityPrefs;
 } xsl_object;

 void php_xsl_set_object(zval *wrapper, void *obj TSRMLS_DC);

Modified: php/php-src/trunk/ext/xsl/xsl_fe.h
===
--- php/php-src/trunk/ext/xsl/xsl_fe.h	2011-07-11 11:10:09 UTC (rev 313130)
+++ php/php-src/trunk/ext/xsl/xsl_fe.h	2011-07-11 11:16:22 UTC (rev 313131)
@@ -34,6 +34,9 @@
 PHP_FUNCTION(xsl_xsltprocessor_has_e

[PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING ext/mysqli/mysqli_api.c ext/mysqli/tests/047.phpt ext/mysqli/tests/mysqli_fetch_field.phpt ext/mysqli/tests/mysqli_fetch_field_direct.phpt ext/mysqli/

2011-01-17 Thread Kalle Sommer Nielsen
kalleMon, 17 Jan 2011 10:43:53 +

Revision: http://svn.php.net/viewvc?view=revision&revision=307532

Log:
Added 'catalog' to the field fetching functions in mysqli (Thanks to Johannes 
for the headsup)

Changed paths:
U   php/php-src/trunk/NEWS
U   php/php-src/trunk/UPGRADING
U   php/php-src/trunk/ext/mysqli/mysqli_api.c
U   php/php-src/trunk/ext/mysqli/tests/047.phpt
U   php/php-src/trunk/ext/mysqli/tests/mysqli_fetch_field.phpt
U   php/php-src/trunk/ext/mysqli/tests/mysqli_fetch_field_direct.phpt
U   php/php-src/trunk/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt
U   php/php-src/trunk/ext/mysqli/tests/mysqli_fetch_field_oo.phpt
U   php/php-src/trunk/ext/mysqli/tests/mysqli_fetch_fields.phpt
U   php/php-src/trunk/ext/mysqli/tests/mysqli_field_seek.phpt
U   php/php-src/trunk/ext/mysqli/tests/mysqli_field_tell.phpt
U   
php/php-src/trunk/ext/mysqli/tests/mysqli_stmt_get_result_metadata_fetch_field.phpt
U   php/php-src/trunk/ext/mysqli/tests/mysqli_stmt_result_metadata.phpt

Modified: php/php-src/trunk/NEWS
===
--- php/php-src/trunk/NEWS	2011-01-17 09:59:07 UTC (rev 307531)
+++ php/php-src/trunk/NEWS	2011-01-17 10:43:53 UTC (rev 307532)
@@ -162,8 +162,6 @@
   . mysqlnd: Added named pipes support. FR #48082. (Andrey)
   . MySQLi: Added iterator support in MySQLi. mysqli_result implements
 Traversable. (Andrey, Johannes)
-  . MySQLi: Implemented FR #39847 (mysqli_fetch_[field|fields|field_direct]
-need to return db). (Kalle)
   . PDO_mysql: Removed support for linking with MySQL client libraries older
 than 4.1. (Johannes)


Modified: php/php-src/trunk/UPGRADING
===
--- php/php-src/trunk/UPGRADING	2011-01-17 09:59:07 UTC (rev 307531)
+++ php/php-src/trunk/UPGRADING	2011-01-17 10:43:53 UTC (rev 307532)
@@ -161,8 +161,6 @@
   strings. This breaks code that iterated the resulting stream array using a
   numeric index, but makes easier to identify which of the passed streams are
   present in the result.
-- mysqli_fetch_[field|fields|field_direct] now returns an additional property
-  named 'db' that contains the database name of the associated result.


 ===

Modified: php/php-src/trunk/ext/mysqli/mysqli_api.c
===
--- php/php-src/trunk/ext/mysqli/mysqli_api.c	2011-01-17 09:59:07 UTC (rev 307531)
+++ php/php-src/trunk/ext/mysqli/mysqli_api.c	2011-01-17 10:43:53 UTC (rev 307532)
@@ -1057,6 +1057,7 @@
 	add_property_string(value, "orgtable",(field->org_table ? field->org_table : ""), 1);
 	add_property_string(value, "def",(field->def ? field->def : ""), 1);
 	add_property_string(value, "db",(field->db ? field->db : ""), 1);
+	add_property_string(value, "catalog",(field->catalog ? field->catalog : ""), 1);

 	add_property_long(value, "max_length", field->max_length);
 	add_property_long(value, "length", field->length);

Modified: php/php-src/trunk/ext/mysqli/tests/047.phpt
===
--- php/php-src/trunk/ext/mysqli/tests/047.phpt	2011-01-17 09:59:07 UTC (rev 307531)
+++ php/php-src/trunk/ext/mysqli/tests/047.phpt	2011-01-17 10:43:53 UTC (rev 307532)
@@ -60,7 +60,7 @@
 === fetch_fields ===
 array(2) {
   [0]=>
-  object(stdClass)#5 (12) {
+  object(stdClass)#5 (13) {
 [%u|b%"name"]=>
 %unicode|string%(3) "foo"
 [%u|b%"orgname"]=>
@@ -73,6 +73,8 @@
 %unicode|string%(0) ""
 [%u|b%"db"]=>
 %unicode|string%(4) "test"
+[%u|b%"catalog"]=>
+%unicode|string%(3) "def"
 [%u|b%"max_length"]=>
 int(0)
 [%u|b%"length"]=>
@@ -87,7 +89,7 @@
 int(0)
   }
   [1]=>
-  object(stdClass)#6 (12) {
+  object(stdClass)#6 (13) {
 [%u|b%"name"]=>
 %unicode|string%(3) "bar"
 [%u|b%"orgname"]=>
@@ -100,6 +102,8 @@
 %unicode|string%(0) ""
 [%u|b%"db"]=>
 %unicode|string%(4) "test"
+[%u|b%"catalog"]=>
+%unicode|string%(3) "def"
 [%u|b%"max_length"]=>
 int(0)
 [%u|b%"length"]=>
@@ -116,7 +120,7 @@
 }

 === fetch_field_direct ===
-object(stdClass)#6 (12) {
+object(stdClass)#6 (13) {
   [%u|b%"name"]=>
   %unicode|string%(3) "foo"
   [%u|b%"orgname"]=>
@@ -129,6 +133,8 @@
   %unicode|string%(0) ""
   [%u|b%"db"]=>
   %unicode|string%(4) "test"
+  [%u|b%"catalog"]=>
+  %unicode|string%(3) "def"
   [%u|b%"max_length"]=>
   int(0)
   [%u|b%"length"]=>
@@ -142,7 +148,7 @@
   [%u|b%"decimals"]=>
   int(0)
 }
-object(stdClass)#6 (12) {
+object(stdClass)#6 (13) {
   [%u|b%"name"]=>
   %unicode|string%(3) "bar"
   [%u|b%"orgname"]=>
@@ -155,6 +161,8 @@
   %unicode|string%(0) ""
   [%u|b%"db"]=>
   %unicode|string%(4) "test"
+  [%u|b%"catalog"]=>
+  %unicode|string%(3) "def"
   [%u|b%"max_length"]=>
   int(0)
   [%u|b%"length"]=>
@@ -170,7 +178,7 @@
 }

 === fetch_field ===
-object(std

[PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING ext/mysqli/mysqli_api.c ext/mysqli/tests/047.phpt ext/mysqli/tests/mysqli_fetch_field.phpt ext/mysqli/tests/mysqli_fetch_field_direct.phpt ext/mysqli/

2011-01-07 Thread Kalle Sommer Nielsen
kalleFri, 07 Jan 2011 18:25:55 +

Revision: http://svn.php.net/viewvc?view=revision&revision=307231

Log:
Implemented FR #39847 (mysqli_fetch_[field|fields|field_direct] need to return 
db)

Bug: http://bugs.php.net/39847 (Assigned) 
mysqli_fetch_[field|fields|field_direct] need to return db
  
Changed paths:
U   php/php-src/trunk/NEWS
U   php/php-src/trunk/UPGRADING
U   php/php-src/trunk/ext/mysqli/mysqli_api.c
U   php/php-src/trunk/ext/mysqli/tests/047.phpt
U   php/php-src/trunk/ext/mysqli/tests/mysqli_fetch_field.phpt
U   php/php-src/trunk/ext/mysqli/tests/mysqli_fetch_field_direct.phpt
U   php/php-src/trunk/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt
U   php/php-src/trunk/ext/mysqli/tests/mysqli_fetch_field_oo.phpt
U   php/php-src/trunk/ext/mysqli/tests/mysqli_fetch_fields.phpt
U   php/php-src/trunk/ext/mysqli/tests/mysqli_field_seek.phpt
U   php/php-src/trunk/ext/mysqli/tests/mysqli_field_tell.phpt
U   
php/php-src/trunk/ext/mysqli/tests/mysqli_stmt_get_result_metadata_fetch_field.phpt
U   php/php-src/trunk/ext/mysqli/tests/mysqli_stmt_result_metadata.phpt

Modified: php/php-src/trunk/NEWS
===
--- php/php-src/trunk/NEWS	2011-01-07 17:45:12 UTC (rev 307230)
+++ php/php-src/trunk/NEWS	2011-01-07 18:25:55 UTC (rev 307231)
@@ -158,6 +158,10 @@
   . mysqlnd: Added named pipes support. FR #48082. (Andrey)
   . MySQLi: Added iterator support in MySQLi. mysqli_result implements
 Traversable. (Andrey, Johannes)
+  . MySQLi: Implemented FR #39847 (mysqli_fetch_[field|fields|field_direct]
+need to return db). (Kalle)
+  . PDO_mysql: Implemented FR #47802 (Support for setting character sets in
+DSN strings). (Kalle)
   . PDO_mysql: Removed support for linking with MySQL client libraries older
 than 4.1. (Johannes)

@@ -170,10 +174,6 @@
   . Added nextRowset support.
   . Fixed bug #50755 (PDO DBLIB Fails with OOM).

-- Improved PDO MySQL:
-  . Implemented FR #47802 (Support for setting character sets in DSN strings).
-(Kalle)
-
 - Improved Reflection extension: (Johannes)
   . Added ReflectionExtension::isTemporary() and
 ReflectionExtension::isPersistent() methods.

Modified: php/php-src/trunk/UPGRADING
===
--- php/php-src/trunk/UPGRADING	2011-01-07 17:45:12 UTC (rev 307230)
+++ php/php-src/trunk/UPGRADING	2011-01-07 18:25:55 UTC (rev 307231)
@@ -163,6 +163,8 @@
   present in the result.
 - pdo_mysql now supports setting character sets when connecting in the DSN
   string.
+- mysqli_fetch_[field|fields|field_direct] now returns an additional property
+  named 'db' that contains the database name of the associated result.


 ===

Modified: php/php-src/trunk/ext/mysqli/mysqli_api.c
===
--- php/php-src/trunk/ext/mysqli/mysqli_api.c	2011-01-07 17:45:12 UTC (rev 307230)
+++ php/php-src/trunk/ext/mysqli/mysqli_api.c	2011-01-07 18:25:55 UTC (rev 307231)
@@ -1052,6 +1052,7 @@
 	add_property_string(value, "table",(field->table ? field->table : ""), 1);
 	add_property_string(value, "orgtable",(field->org_table ? field->org_table : ""), 1);
 	add_property_string(value, "def",(field->def ? field->def : ""), 1);
+	add_property_string(value, "db",(field->db ? field->db : ""), 1);

 	add_property_long(value, "max_length", field->max_length);
 	add_property_long(value, "length", field->length);

Modified: php/php-src/trunk/ext/mysqli/tests/047.phpt
===
--- php/php-src/trunk/ext/mysqli/tests/047.phpt	2011-01-07 17:45:12 UTC (rev 307230)
+++ php/php-src/trunk/ext/mysqli/tests/047.phpt	2011-01-07 18:25:55 UTC (rev 307231)
@@ -60,7 +60,7 @@
 === fetch_fields ===
 array(2) {
   [0]=>
-  object(stdClass)#5 (11) {
+  object(stdClass)#5 (12) {
 [%u|b%"name"]=>
 %unicode|string%(3) "foo"
 [%u|b%"orgname"]=>
@@ -71,6 +71,8 @@
 %unicode|string%(13) "test_affected"
 [%u|b%"def"]=>
 %unicode|string%(0) ""
+[%u|b%"db"]=>
+%unicode|string%(4) "test"
 [%u|b%"max_length"]=>
 int(0)
 [%u|b%"length"]=>
@@ -85,7 +87,7 @@
 int(0)
   }
   [1]=>
-  object(stdClass)#6 (11) {
+  object(stdClass)#6 (12) {
 [%u|b%"name"]=>
 %unicode|string%(3) "bar"
 [%u|b%"orgname"]=>
@@ -96,6 +98,8 @@
 %unicode|string%(13) "test_affected"
 [%u|b%"def"]=>
 %unicode|string%(0) ""
+[%u|b%"db"]=>
+%unicode|string%(4) "test"
 [%u|b%"max_length"]=>
 int(0)
 [%u|b%"length"]=>
@@ -112,7 +116,7 @@
 }

 === fetch_field_direct ===
-object(stdClass)#6 (11) {
+object(stdClass)#6 (12) {
   [%u|b%"name"]=>
   %unicode|string%(3) "foo"
   [%u|b%"orgname"]=>
@@ -123,6 +127,8 @@
   %unicode|string%(13) "test_affected"
   [%u|b%"def"]=>
   %unicode|string%(0) ""
+  [%u|b%"db"]=>
+  %unicode

Re: [PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING ext/pdo_mysql/mysql_driver.c ext/pdo_mysql/php_pdo_mysql_int.h

2011-01-07 Thread Kalle Sommer Nielsen
Hi Andrey

2011/1/7 Andrey Hristov :
> On 01/07/2011 03:39 PM, Kalle Sommer Nielsen wrote:
>
> this fix is inefficient. Implies a query to the server. Much efficient
> is using mysql_options() on a MYSQL handle after mysql_init() but before
> mysql_real_connect() (which sets the charset during the handshake).
>
> http://dev.mysql.com/doc/refman/5.5/en/mysql-options.html
> MYSQL_SET_CHARSET_NAME (argument type: char *)
>
> The name of the character set to use as the default character set.
>
> Could you change it?

I changed it to use mysql_options() prior to the connection as
suggested. Should I merge it to the 5.3 branch?
>
> Thanks!
> Andrey
>



-- 
regards,

Kalle Sommer Nielsen
ka...@php.net

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING ext/pdo_mysql/mysql_driver.c ext/pdo_mysql/php_pdo_mysql_int.h

2011-01-07 Thread Andrey Hristov
On 01/07/2011 03:39 PM, Kalle Sommer Nielsen wrote:
> kalleFri, 07 Jan 2011 14:39:56 +
> 
> Revision: http://svn.php.net/viewvc?view=revision&revision=307224
> 
> Log:
> Implemented FR #47802, support for character sets in DSN strings for PDO_MYSQL
> 
> Bug: http://bugs.php.net/47802 (Open) PDO_MYSQL doesn't use the charset 
> parameter
>   
> Changed paths:
> U   php/php-src/trunk/NEWS
> U   php/php-src/trunk/UPGRADING
> U   php/php-src/trunk/ext/pdo_mysql/mysql_driver.c
> U   php/php-src/trunk/ext/pdo_mysql/php_pdo_mysql_int.h
> 
> Modified: php/php-src/trunk/NEWS
> ===
> --- php/php-src/trunk/NEWS2011-01-07 14:22:30 UTC (rev 307223)
> +++ php/php-src/trunk/NEWS2011-01-07 14:39:56 UTC (rev 307224)
> @@ -170,6 +170,10 @@
>. Added nextRowset support.
>. Fixed bug #50755 (PDO DBLIB Fails with OOM).
> 
> +- Improved PDO MySQL:
> +  . Implemented FR #47802 (Support for setting character sets in DSN 
> strings).
> +(Kalle)
> +
>  - Improved Reflection extension: (Johannes)
>. Added ReflectionExtension::isTemporary() and
>  ReflectionExtension::isPersistent() methods.
> 
> Modified: php/php-src/trunk/UPGRADING
> ===
> --- php/php-src/trunk/UPGRADING   2011-01-07 14:22:30 UTC (rev 307223)
> +++ php/php-src/trunk/UPGRADING   2011-01-07 14:39:56 UTC (rev 307224)
> @@ -161,6 +161,8 @@
>strings. This breaks code that iterated the resulting stream array using a
>numeric index, but makes easier to identify which of the passed streams are
>present in the result.
> +- pdo_mysql now supports setting character sets when connecting in the DSN
> +  string.
> 
> 
>  ===
> 
> Modified: php/php-src/trunk/ext/pdo_mysql/mysql_driver.c
> ===
> --- php/php-src/trunk/ext/pdo_mysql/mysql_driver.c2011-01-07 14:22:30 UTC 
> (rev 307223)
> +++ php/php-src/trunk/ext/pdo_mysql/mysql_driver.c2011-01-07 14:39:56 UTC 
> (rev 307224)
> @@ -711,6 +711,13 @@
>   goto cleanup;
>   }
> 
> +#ifdef PDO_MYSQL_HAS_CHARSET
> + if (vars[0].optval && mysql_set_character_set(H->server, 
> vars[0].optval)) {
> + pdo_mysql_error(dbh);
> + goto cleanup;
> + }
> +#endif
> +
>   if (!dbh->auto_commit) {
>   mysql_handle_autocommit(dbh TSRMLS_CC);
>   }
> 
> Modified: php/php-src/trunk/ext/pdo_mysql/php_pdo_mysql_int.h
> ===
> --- php/php-src/trunk/ext/pdo_mysql/php_pdo_mysql_int.h   2011-01-07 
> 14:22:30 UTC (rev 307223)
> +++ php/php-src/trunk/ext/pdo_mysql/php_pdo_mysql_int.h   2011-01-07 
> 14:39:56 UTC (rev 307224)
> @@ -33,6 +33,10 @@
>  #define PDO_MYSQL_PARAM_BIND MYSQL_BIND
>  #endif
> 
> +#if (MYSQL_VERSION_ID >= 40113 && MYSQL_VERSION_ID < 5) || 
> MYSQL_VERSION_ID >= 50007 || defined(MYSQL_USE_MYSQLND)
> +# define PDO_MYSQL_HAS_CHARSET
> +#endif
> +
>  #if defined(PDO_USE_MYSQLND) && PHP_DEBUG && !defined(PHP_WIN32)
>  #define PDO_DBG_ENABLED 1
> 
> 
> 

this fix is inefficient. Implies a query to the server. Much efficient
is using mysql_options() on a MYSQL handle after mysql_init() but before
mysql_real_connect() (which sets the charset during the handshake).

http://dev.mysql.com/doc/refman/5.5/en/mysql-options.html
MYSQL_SET_CHARSET_NAME (argument type: char *)

The name of the character set to use as the default character set.

Could you change it?

Thanks!
Andrey

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING ext/pdo_mysql/mysql_driver.c ext/pdo_mysql/php_pdo_mysql_int.h

2011-01-07 Thread Kalle Sommer Nielsen
kalleFri, 07 Jan 2011 14:39:56 +

Revision: http://svn.php.net/viewvc?view=revision&revision=307224

Log:
Implemented FR #47802, support for character sets in DSN strings for PDO_MYSQL

Bug: http://bugs.php.net/47802 (Open) PDO_MYSQL doesn't use the charset 
parameter
  
Changed paths:
U   php/php-src/trunk/NEWS
U   php/php-src/trunk/UPGRADING
U   php/php-src/trunk/ext/pdo_mysql/mysql_driver.c
U   php/php-src/trunk/ext/pdo_mysql/php_pdo_mysql_int.h

Modified: php/php-src/trunk/NEWS
===
--- php/php-src/trunk/NEWS  2011-01-07 14:22:30 UTC (rev 307223)
+++ php/php-src/trunk/NEWS  2011-01-07 14:39:56 UTC (rev 307224)
@@ -170,6 +170,10 @@
   . Added nextRowset support.
   . Fixed bug #50755 (PDO DBLIB Fails with OOM).

+- Improved PDO MySQL:
+  . Implemented FR #47802 (Support for setting character sets in DSN strings).
+(Kalle)
+
 - Improved Reflection extension: (Johannes)
   . Added ReflectionExtension::isTemporary() and
 ReflectionExtension::isPersistent() methods.

Modified: php/php-src/trunk/UPGRADING
===
--- php/php-src/trunk/UPGRADING 2011-01-07 14:22:30 UTC (rev 307223)
+++ php/php-src/trunk/UPGRADING 2011-01-07 14:39:56 UTC (rev 307224)
@@ -161,6 +161,8 @@
   strings. This breaks code that iterated the resulting stream array using a
   numeric index, but makes easier to identify which of the passed streams are
   present in the result.
+- pdo_mysql now supports setting character sets when connecting in the DSN
+  string.


 ===

Modified: php/php-src/trunk/ext/pdo_mysql/mysql_driver.c
===
--- php/php-src/trunk/ext/pdo_mysql/mysql_driver.c  2011-01-07 14:22:30 UTC 
(rev 307223)
+++ php/php-src/trunk/ext/pdo_mysql/mysql_driver.c  2011-01-07 14:39:56 UTC 
(rev 307224)
@@ -711,6 +711,13 @@
goto cleanup;
}

+#ifdef PDO_MYSQL_HAS_CHARSET
+   if (vars[0].optval && mysql_set_character_set(H->server, 
vars[0].optval)) {
+   pdo_mysql_error(dbh);
+   goto cleanup;
+   }
+#endif
+
if (!dbh->auto_commit) {
mysql_handle_autocommit(dbh TSRMLS_CC);
}

Modified: php/php-src/trunk/ext/pdo_mysql/php_pdo_mysql_int.h
===
--- php/php-src/trunk/ext/pdo_mysql/php_pdo_mysql_int.h 2011-01-07 14:22:30 UTC 
(rev 307223)
+++ php/php-src/trunk/ext/pdo_mysql/php_pdo_mysql_int.h 2011-01-07 14:39:56 UTC 
(rev 307224)
@@ -33,6 +33,10 @@
 #  define PDO_MYSQL_PARAM_BIND MYSQL_BIND
 #endif

+#if (MYSQL_VERSION_ID >= 40113 && MYSQL_VERSION_ID < 5) || 
MYSQL_VERSION_ID >= 50007 || defined(MYSQL_USE_MYSQLND)
+# define PDO_MYSQL_HAS_CHARSET
+#endif
+
 #if defined(PDO_USE_MYSQLND) && PHP_DEBUG && !defined(PHP_WIN32)
 #define PDO_DBG_ENABLED 1


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING ext/spl/internal/regexiterator.inc ext/spl/spl_iterators.c ext/spl/spl_iterators.h ext/spl/tests/regexiterator_getregex.phpt

2011-01-05 Thread Adam Harvey
aharvey  Thu, 06 Jan 2011 02:32:02 +

Revision: http://svn.php.net/viewvc?view=revision&revision=307147

Log:
Implement request #53659 (Implementing RegexIterator::getRegex() method). Patch
by Joshua Thijssen.

Bug: http://bugs.php.net/53659 (Assigned) Implementing 
RegexIterator::getRegex() method
  
Changed paths:
U   php/php-src/trunk/NEWS
U   php/php-src/trunk/UPGRADING
U   php/php-src/trunk/ext/spl/internal/regexiterator.inc
U   php/php-src/trunk/ext/spl/spl_iterators.c
U   php/php-src/trunk/ext/spl/spl_iterators.h
A   php/php-src/trunk/ext/spl/tests/regexiterator_getregex.phpt

Modified: php/php-src/trunk/NEWS
===
--- php/php-src/trunk/NEWS  2011-01-06 02:24:49 UTC (rev 307146)
+++ php/php-src/trunk/NEWS  2011-01-06 02:32:02 UTC (rev 307147)
@@ -182,6 +182,7 @@
 either is present at compile time. (Rasmus)

 - Improved SPL extension:
+  . Added RegexIterator::getRegex() method. (Joshua Thijssen)
   . Added SplObjectStorage::getHash() hook. (Etienne)
   . Added SplFileInfo::getExtension(). FR #48767. (Peter Cowburn)


Modified: php/php-src/trunk/UPGRADING
===
--- php/php-src/trunk/UPGRADING 2011-01-06 02:24:49 UTC (rev 307146)
+++ php/php-src/trunk/UPGRADING 2011-01-06 02:32:02 UTC (rev 307147)
@@ -353,6 +353,9 @@
  - ReflectionClass::getTraitAliases()
  - ReflectionParameter::canBePassedByValue()

+   - RegexIterator
+ - RegexIterator::getRegex()
+
- PDO_dblib
  - PDO::newRowset()


Modified: php/php-src/trunk/ext/spl/internal/regexiterator.inc
===
--- php/php-src/trunk/ext/spl/internal/regexiterator.inc2011-01-06 
02:24:49 UTC (rev 307146)
+++ php/php-src/trunk/ext/spl/internal/regexiterator.inc2011-01-06 
02:32:02 UTC (rev 307147)
@@ -158,6 +158,13 @@
{
$this->preg_flags = $preg_flags;
}
+
+   /** @return current regular expression
+   */
+   function getRegex()
+   {
+   return $this->regex;
+   }
 }

 ?>

Modified: php/php-src/trunk/ext/spl/spl_iterators.c
===
--- php/php-src/trunk/ext/spl/spl_iterators.c   2011-01-06 02:24:49 UTC (rev 
307146)
+++ php/php-src/trunk/ext/spl/spl_iterators.c   2011-01-06 02:32:02 UTC (rev 
307147)
@@ -1465,6 +1465,7 @@
}
intern->u.regex.mode = mode;
intern->u.regex.regex = estrndup(regex, regex_len);
+   intern->u.regex.regex_len = regex_len;
intern->u.regex.pce = 
pcre_get_compiled_regex_cache(regex, regex_len TSRMLS_CC);
if (intern->u.regex.pce == NULL) {
/* pcre_get_compiled_regex_cache has already 
sent error */
@@ -1941,6 +1942,19 @@
}
 } /* }}} */

+/* {{{ proto string RegexIterator::getRegex()
+   Returns current regular expression */
+SPL_METHOD(RegexIterator, getRegex)
+{
+   spl_dual_it_object *intern = 
(spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
+
+   if (zend_parse_parameters_none() == FAILURE) {
+   return;
+   }
+
+   RETURN_STRINGL(intern->u.regex.regex, intern->u.regex.regex_len, 1);
+} /* }}} */
+
 /* {{{ proto bool RegexIterator::getMode()
Returns current operation mode */
 SPL_METHOD(RegexIterator, getMode)
@@ -2205,6 +2219,7 @@
SPL_ME(RegexIterator,   setFlags, arginfo_regex_it_set_flags,   
   ZEND_ACC_PUBLIC)
SPL_ME(RegexIterator,   getPregFlags, arginfo_recursive_it_void,
   ZEND_ACC_PUBLIC)
SPL_ME(RegexIterator,   setPregFlags, 
arginfo_regex_it_set_preg_flags, ZEND_ACC_PUBLIC)
+   SPL_ME(RegexIterator,   getRegex, arginfo_recursive_it_void,
   ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
 };


Modified: php/php-src/trunk/ext/spl/spl_iterators.h
===
--- php/php-src/trunk/ext/spl/spl_iterators.h   2011-01-06 02:24:49 UTC (rev 
307146)
+++ php/php-src/trunk/ext/spl/spl_iterators.h   2011-01-06 02:32:02 UTC (rev 
307147)
@@ -154,6 +154,7 @@
long preg_flags;
pcre_cache_entry *pce;
char *regex;
+   uint regex_len;
} regex;
 #endif
} u;

Added: php/php-src/trunk/ext/spl/tests/regexiterator_getregex.phpt
===
--- php/php-src/trunk/ext/spl/tests/regexiterator_getregex.phpt 
(rev 0)
+++ php/php-src/trunk/ext/spl/tests/regexiterator_getregex.phpt 2011-01-06 
02:32:02 UTC (rev 307147)
@@ -0,0 +1,29 @@
+--TEST--
+SP

[PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING Zend/tests/026.phpt Zend/tests/033.phpt Zend/tests/bug52041.phpt Zend/tests/bug52614.phpt Zend/zend_execute.c ext/dom/tests/bug47430.phpt ext/reflecti

2010-12-31 Thread Scott MacVicar
scottmac Fri, 31 Dec 2010 16:57:45 +

Revision: http://svn.php.net/viewvc?view=revision&revision=306931

Log:
Silently casting an empty string, null or false into an object by adding a 
property
is pretty non-intuitive. If the same value was 1 or true you get a warning and 
it halts.

Since we can't break BC completely (yet) lets bump this from E_STRICT.

Also added a new section to UPGRADING for engine changes.

baz = 1;
var_dump($x);

$y = 1;
$y->baz = 1;
var_dump($y);

Changed paths:
U   php/php-src/trunk/NEWS
U   php/php-src/trunk/UPGRADING
U   php/php-src/trunk/Zend/tests/026.phpt
U   php/php-src/trunk/Zend/tests/033.phpt
U   php/php-src/trunk/Zend/tests/bug52041.phpt
U   php/php-src/trunk/Zend/tests/bug52614.phpt
U   php/php-src/trunk/Zend/zend_execute.c
U   php/php-src/trunk/ext/dom/tests/bug47430.phpt
U   php/php-src/trunk/ext/reflection/tests/bug40431.phpt
U   php/php-src/trunk/tests/classes/implicit_instantiation_001.phpt

Modified: php/php-src/trunk/NEWS
===
--- php/php-src/trunk/NEWS	2010-12-31 16:37:12 UTC (rev 306930)
+++ php/php-src/trunk/NEWS	2010-12-31 16:57:45 UTC (rev 306931)
@@ -27,6 +27,8 @@
 - Changed array_combine() to return empty array instead of FALSE when both
   parameter arrays are empty. FR #34857. (joel.per...@gmail.com)
 - Changed third parameter of preg_match_all() to optional. FR #53238. (Adam)
+- Changed silent casting of null/''/false into an Object when adding
+  a property into a warning. (Scott)

 - General improvements:
   . Added multibyte suppport by default. Previosly php had to be compiled

Modified: php/php-src/trunk/UPGRADING
===
--- php/php-src/trunk/UPGRADING	2010-12-31 16:37:12 UTC (rev 306930)
+++ php/php-src/trunk/UPGRADING	2010-12-31 16:57:45 UTC (rev 306931)
@@ -4,19 +4,19 @@

 1. Changes made to default configuration
 2. Reserved words and classes
-3. Changes made to existing functions
-4. Changes made to existing methods
-5. Changes made to existing classes
-6. Deprecated
-7. Removed
-8. Extensions:
+3. Changes made to engine behaviour
+4. Changes made to existing functions
+5. Changes made to existing methods
+6. Changes made to existing classes
+7. Deprecated
+8. Removed
+9. Extensions:
  a. moved out to PECL and actively maintained there
  b. no longer maintained
  c. with changed behaviour
  d. no longer possible to disable
-9. Changes in SAPI support
-10. Changes in INI directives
-11. Syntax additions
+10. Changes in SAPI support
+11. Changes in INI directives
 12. Syntax additions
 13. Windows support
 14. New in PHP X.Y:
@@ -87,8 +87,22 @@

 -

+=
+3. Changes made to engine behaviour
+=
+
+- Turning null, false or empty string into an object by adding a property
+  will now emit a warning instead of an E_STRICT error.
+
+  $test = null;
+  $test->baz = 1;
+
+  To create a generic object you can use StdClass:
+  $test = new StdClass;
+  $text->baz = 1;
+
 =
-3. Changes made to existing functions
+4. Changes made to existing functions
 =

 - array_combine now returns array() instead of FALSE when two empty arrays are
@@ -150,23 +164,23 @@


 ===
-4. Changes made to existing methods
+5. Changes made to existing methods
 ===

 -

 ===
-5. Changes made to existing classes
+6. Changes made to existing classes
 ===

 -

 =
-6. Deprecated
+7. Deprecated
 =

 ==
-7. Removed
+8. Removed
 ==

 a. removed features
@@ -215,7 +229,7 @@
- continue $var;

 =
-8. Extensions
+9. Extensions
 =

  a. moved out to PECL and actively maintained there
@@ -237,7 +251,7 @@
 -

 ==
-9. Changes in SAPI support
+10. Changes in SAPI support
 ==

 - The REQUEST_TIME value inside server now returns a floating point number
@@ -245,7 +259,7 @@
   value should be returning float and not time_t.

 =
-10. Changes in INI directives
+11. Changes in INI directives
 =

 - Added session.upload_progress.enabled, session.upload_progress.cleanup,
@@ -264,7 +278,7 @@
   three times.

 
-11. Syntax additions
+12. Syntax additions
 

 - Array dereferencing.
@@ -273,14 +287,14 @@
 $foo->bar()[0]

 ===
-12. Windows support
+13. Windows support
 ===

 - is_link now works properly for symbolic links on Windows Vista
   or later. Earlier systems do not support symbolic links.

 ===
-13. New in PHP X.Y:
+14. New in PHP X.Y:
 ===

  

[PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING ext/standard/math.c ext/standard/php_math.h ext/standard/tests/math/number_format_multichar.phpt

2010-12-03 Thread Adam Harvey
aharvey  Fri, 03 Dec 2010 10:10:08 +

Revision: http://svn.php.net/viewvc?view=revision&revision=305937

Log:
Implement FR #53457 (number_format must support more than one character for
thousands separator).

Bug: http://bugs.php.net/53457 (Assigned) number_format must support more than 
one character for thousands separator
  
Changed paths:
U   php/php-src/trunk/NEWS
U   php/php-src/trunk/UPGRADING
U   php/php-src/trunk/ext/standard/math.c
U   php/php-src/trunk/ext/standard/php_math.h
A   php/php-src/trunk/ext/standard/tests/math/number_format_multichar.phpt

Modified: php/php-src/trunk/NEWS
===
--- php/php-src/trunk/NEWS  2010-12-03 09:34:35 UTC (rev 305936)
+++ php/php-src/trunk/NEWS  2010-12-03 10:10:08 UTC (rev 305937)
@@ -112,6 +112,10 @@
 getallheaders(), apache_request_headers() and apache_response_headers()
   . Improved performance of FastCGI request parsing.

+- Improved core functions:
+  . number_format() no longer truncates multibyte decimal points and thousand
+separators to the first byte. FR #53457. (Adam)
+
 - Improved CURL extension:
   . Added support for CURLOPT_MAX_RECV_SPEED_LARGE and
 CURLOPT_MAX_SEND_SPEED_LARGE. FR #51815. (Pierrick)

Modified: php/php-src/trunk/UPGRADING
===
--- php/php-src/trunk/UPGRADING 2010-12-03 09:34:35 UTC (rev 305936)
+++ php/php-src/trunk/UPGRADING 2010-12-03 10:10:08 UTC (rev 305937)
@@ -133,6 +133,8 @@
   behavior follows the recommendations of Unicode Technical Report #36.
 - htmlspecialchars_decode/html_entity_decode now decode ' if the document
   type is ENT_XML1, ENT_XHTML, or ENT_HTML5.
+- number_format() no longer truncates multibyte decimal points and thousand
+  separators to the first byte.
 - The third parameter ($matches) to preg_match_all() is now optional. If
   omitted, the function will simply return the number of times the pattern was
   matched in the subject and will have no other side effects.

Modified: php/php-src/trunk/ext/standard/math.c
===
--- php/php-src/trunk/ext/standard/math.c   2010-12-03 09:34:35 UTC (rev 
305936)
+++ php/php-src/trunk/ext/standard/math.c   2010-12-03 10:10:08 UTC (rev 
305937)
@@ -1082,6 +1082,11 @@
 */
 PHPAPI char *_php_math_number_format(double d, int dec, char dec_point, char 
thousand_sep)
 {
+   return _php_math_number_format_ex(d, dec, &dec_point, 1, &thousand_sep, 
1);
+}
+
+PHPAPI char *_php_math_number_format_ex(double d, int dec, char *dec_point, 
size_t dec_point_len, char *thousand_sep, size_t thousand_sep_len)
+{
char *tmpbuf = NULL, *resbuf;
char *s, *t;  /* source, target */
char *dp;
@@ -1121,7 +1126,7 @@

/* allow for thousand separators */
if (thousand_sep) {
-   integral += (integral-1) / 3;
+   integral += thousand_sep_len * ((integral-1) / 3);
}

reslen = integral;
@@ -1130,7 +1135,7 @@
reslen += dec;

if (dec_point) {
-   reslen++;
+   reslen += dec_point_len;
}
}

@@ -1166,7 +1171,8 @@

/* add decimal point */
if (dec_point) {
-   *t-- = dec_point;
+   t -= dec_point_len;
+   memcpy(t + 1, dec_point, dec_point_len);
}
}

@@ -1175,7 +1181,8 @@
while(s >= tmpbuf) {
*t-- = *s--;
if (thousand_sep && (++count%3)==0 && s>=tmpbuf) {
-   *t-- = thousand_sep;
+   t -= thousand_sep_len;
+   memcpy(t + 1, thousand_sep, thousand_sep_len);
}
}

@@ -1212,21 +1219,17 @@
RETURN_STRING(_php_math_number_format(num, dec, dec_point_chr, 
thousand_sep_chr), 0);
break;
case 4:
-   if (dec_point != NULL) {
-   if (dec_point_len) {
-   dec_point_chr = dec_point[0];
-   } else {
-   dec_point_chr = 0;
-   }
+   if (dec_point == NULL) {
+   dec_point = &dec_point_chr;
+   dec_point_len = 1;
}
-   if (thousand_sep != NULL) {
-   if (thousand_sep_len) {
-   thousand_sep_chr = thousand_sep[0];
-   } else {
-   thousand_sep_chr = 0;
-   }
+
+   if (thousand_sep == NULL) {
+   thousand_sep = &thousand_sep_chr;
+   thousand_sep_len = 1;
}
-   RETURN_STRING(_php_math_number_format(num, dec

[PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING ext/standard/dir.c ext/standard/php_dir.h ext/standard/tests/dir/scandir_basic.phpt ext/standard/tests/dir/scandir_variation10.phpt ext/standard/tests

2010-11-26 Thread Adam Harvey
aharvey  Fri, 26 Nov 2010 09:52:28 +

Revision: http://svn.php.net/viewvc?view=revision&revision=305765

Log:
Implemented FR #53407 (make scandir()'s directory sorting optional).

Bug: http://bugs.php.net/53407 (Assigned) make scandir()'s directory sorting 
optional
  
Changed paths:
U   php/php-src/trunk/NEWS
U   php/php-src/trunk/UPGRADING
U   php/php-src/trunk/ext/standard/dir.c
U   php/php-src/trunk/ext/standard/php_dir.h
U   php/php-src/trunk/ext/standard/tests/dir/scandir_basic.phpt
A   php/php-src/trunk/ext/standard/tests/dir/scandir_variation10.phpt
U   php/php-src/trunk/ext/standard/tests/dir/scandir_variation3.phpt

Modified: php/php-src/trunk/NEWS
===
--- php/php-src/trunk/NEWS  2010-11-26 09:19:16 UTC (rev 305764)
+++ php/php-src/trunk/NEWS  2010-11-26 09:52:28 UTC (rev 305765)
@@ -128,6 +128,10 @@
   . PDO_mysql: Removed support for linking with MySQL client libraries older
 than 4.1. (Johannes)

+- Improved filesystem functions:
+  . scandir() now accepts SCANDIR_SORT_NONE as a possible sorting_order value.
+FR #53407. (Adam)
+
 - Improved HASH extension:
   . Added Jenkins's one-at-a-time hash support. (Martin Jansen)
   . Added FNV-1 hash support. (Michael Maclean)

Modified: php/php-src/trunk/UPGRADING
===
--- php/php-src/trunk/UPGRADING 2010-11-26 09:19:16 UTC (rev 305764)
+++ php/php-src/trunk/UPGRADING 2010-11-26 09:52:28 UTC (rev 305765)
@@ -136,6 +136,10 @@
 - The third parameter ($matches) to preg_match_all() is now optional. If
   omitted, the function will simply return the number of times the pattern was
   matched in the subject and will have no other side effects.
+- The second argument of scandir() now accepts SCANDIR_SORT_NONE (2) as a
+  possible value. This value results in scandir() performing no sorting: on
+  local filesystems, this allows files to be returned in native filesystem
+  order.


 ===
@@ -298,6 +302,9 @@
- ENT_XML1
- ENT_XHTML
- ENT_HTML5
+   - SCANDIR_SORT_ASCENDING
+   - SCANDIR_SORT_DESCENDING
+   - SCANDIR_SORT_NONE

  g. New classes


Modified: php/php-src/trunk/ext/standard/dir.c
===
--- php/php-src/trunk/ext/standard/dir.c2010-11-26 09:19:16 UTC (rev 
305764)
+++ php/php-src/trunk/ext/standard/dir.c2010-11-26 09:52:28 UTC (rev 
305765)
@@ -148,6 +148,10 @@
pathsep_str[1] = '\0';
REGISTER_STRING_CONSTANT("PATH_SEPARATOR", pathsep_str, 
CONST_CS|CONST_PERSISTENT);

+   REGISTER_LONG_CONSTANT("SCANDIR_SORT_ASCENDING",  
PHP_SCANDIR_SORT_ASCENDING,  CONST_CS | CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT("SCANDIR_SORT_DESCENDING", 
PHP_SCANDIR_SORT_DESCENDING, CONST_CS | CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT("SCANDIR_SORT_NONE",   
PHP_SCANDIR_SORT_NONE,   CONST_CS | CONST_PERSISTENT);
+
 #ifdef HAVE_GLOB

 #ifdef GLOB_BRACE
@@ -563,8 +567,10 @@
context = php_stream_context_from_zval(zcontext, 0);
}

-   if (!flags) {
+   if (flags == PHP_SCANDIR_SORT_ASCENDING) {
n = php_stream_scandir(dirn, &namelist, context, (void *) 
php_stream_dirent_alphasort);
+   } else if (flags == PHP_SCANDIR_SORT_NONE) {
+   n = php_stream_scandir(dirn, &namelist, context, NULL);
} else {
n = php_stream_scandir(dirn, &namelist, context, (void *) 
php_stream_dirent_alphasortr);
}

Modified: php/php-src/trunk/ext/standard/php_dir.h
===
--- php/php-src/trunk/ext/standard/php_dir.h2010-11-26 09:19:16 UTC (rev 
305764)
+++ php/php-src/trunk/ext/standard/php_dir.h2010-11-26 09:52:28 UTC (rev 
305765)
@@ -37,4 +37,8 @@
 PHP_FUNCTION(glob);
 PHP_FUNCTION(scandir);

+#define PHP_SCANDIR_SORT_ASCENDING 0
+#define PHP_SCANDIR_SORT_DESCENDING 1
+#define PHP_SCANDIR_SORT_NONE 2
+
 #endif /* PHP_DIR_H */

Modified: php/php-src/trunk/ext/standard/tests/dir/scandir_basic.phpt
===
--- php/php-src/trunk/ext/standard/tests/dir/scandir_basic.phpt 2010-11-26 
09:19:16 UTC (rev 305764)
+++ php/php-src/trunk/ext/standard/tests/dir/scandir_basic.phpt 2010-11-26 
09:52:28 UTC (rev 305765)
@@ -25,7 +25,7 @@
 var_dump(scandir($directory));

 echo "\n-- scandir() with all arguments --\n";
-$sorting_order = 1;
+$sorting_order = SCANDIR_SORT_DESCENDING;
 $context = stream_context_create();
 var_dump(scandir($directory, $sorting_order, $context));


Added: php/php-src/trunk/ext/standard/tests/dir/scandir_variation10.phpt
===
--- php/php-src/trunk/ext/standard/tests/dir/scandir_variation10.phpt   

[PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING Zend/Zend.m4 Zend/tests/declare_001.phpt Zend/tests/declare_002.phpt Zend/tests/multibyte/multibyte_encoding_001.phpt Zend/tests/multibyte/multibyte_e

2010-11-23 Thread Dmitry Stogov
dmitry   Wed, 24 Nov 2010 05:41:23 +

Revision: http://svn.php.net/viewvc?view=revision&revision=305711

Log:
Added multibyte suppport by default. Previosly php had to be compiled with 
--enable-zend-multibyte. Now it can be enabled or disabled throug 
zend.multibyte directive in php.ini

Changed paths:
U   php/php-src/trunk/NEWS
U   php/php-src/trunk/UPGRADING
U   php/php-src/trunk/Zend/Zend.m4
U   php/php-src/trunk/Zend/tests/declare_001.phpt
A   php/php-src/trunk/Zend/tests/declare_002.phpt
U   php/php-src/trunk/Zend/tests/multibyte/multibyte_encoding_001.phpt
U   php/php-src/trunk/Zend/tests/multibyte/multibyte_encoding_002.phpt
U   php/php-src/trunk/Zend/tests/multibyte/multibyte_encoding_003.phpt
U   php/php-src/trunk/Zend/tests/multibyte/multibyte_encoding_004.phpt
U   php/php-src/trunk/Zend/tests/multibyte/multibyte_encoding_005.phpt
U   php/php-src/trunk/Zend/tests/multibyte/multibyte_encoding_006.phpt
U   php/php-src/trunk/Zend/zend.c
U   php/php-src/trunk/Zend/zend_compile.c
U   php/php-src/trunk/Zend/zend_globals.h
U   php/php-src/trunk/Zend/zend_highlight.c
U   php/php-src/trunk/Zend/zend_language_scanner.h
U   php/php-src/trunk/Zend/zend_language_scanner.l
U   php/php-src/trunk/Zend/zend_multibyte.c
U   php/php-src/trunk/Zend/zend_multibyte.h
U   php/php-src/trunk/ext/mbstring/mbstring.c
U   php/php-src/trunk/ext/mbstring/mbstring.h
U   php/php-src/trunk/ext/mbstring/tests/zend_multibyte-10.phpt
U   php/php-src/trunk/ext/mbstring/tests/zend_multibyte-11.phpt
U   php/php-src/trunk/ext/phar/tests/zip/notphar.phpt
U   php/php-src/trunk/ext/standard/info.c
U   php/php-src/trunk/main/main.c
U   php/php-src/trunk/win32/build/config.w32

Modified: php/php-src/trunk/NEWS
===
--- php/php-src/trunk/NEWS	2010-11-24 05:16:40 UTC (rev 305710)
+++ php/php-src/trunk/NEWS	2010-11-24 05:41:23 UTC (rev 305711)
@@ -28,6 +28,9 @@
 - Changed third parameter of preg_match_all() to optional. FR #53238. (Adam)

 - General improvements:
+  . Added multibyte suppport by default. Previosly php had to be compiled
+with --enable-zend-multibyte. Now it can be enabled or disabled throug
+zend.multibyte directive in php.ini (Dmitry)
   . Added scalar typehints to the parser and the reflection API. (Ilia, Derick)
   . Added support for Traits. (Stefan)
   . Added closure $this support back. (Stas)

Modified: php/php-src/trunk/UPGRADING
===
--- php/php-src/trunk/UPGRADING	2010-11-24 05:16:40 UTC (rev 305710)
+++ php/php-src/trunk/UPGRADING	2010-11-24 05:41:23 UTC (rev 305711)
@@ -235,6 +235,11 @@
 - Added session.upload_progress.enabled, session.upload_progress.cleanup,
   session.upload_progress.prefix, session.upload_progress.name,
   session.upload_progress.freq, session.upload_progress.min_freq.
+- Added zend.multibyte directive as a replacement of PHP compile time
+  configuration option --enable-zend-multibyte. Now ZE always contains code for
+  multibyte support, but may enable or disable it by zend.multibyte. It doesn't
+  make a lot of sense to enable this option without ext/mbstring, because the
+  most functionality is implemented by mbstrings callbacks.

 
 11. Syntax additions

Modified: php/php-src/trunk/Zend/Zend.m4
===
--- php/php-src/trunk/Zend/Zend.m4	2010-11-24 05:16:40 UTC (rev 305710)
+++ php/php-src/trunk/Zend/Zend.m4	2010-11-24 05:41:23 UTC (rev 305711)
@@ -176,13 +176,6 @@
   ZEND_INLINE_OPTIMIZATION=yes
 ])

-AC_ARG_ENABLE(zend-multibyte,
-[  --enable-zend-multibyte Compile with zend multibyte support], [
-  ZEND_MULTIBYTE=$enableval
-],[
-  ZEND_MULTIBYTE=no
-])
-
 AC_MSG_CHECKING([virtual machine dispatch method])
 AC_MSG_RESULT($PHP_ZEND_VM)

@@ -195,9 +188,6 @@
 AC_MSG_CHECKING(whether to enable Zend debugging)
 AC_MSG_RESULT($ZEND_DEBUG)

-AC_MSG_CHECKING(whether to enable Zend multibyte)
-AC_MSG_RESULT($ZEND_MULTIBYTE)
-
 case $PHP_ZEND_VM in
   SWITCH)
 AC_DEFINE(ZEND_VM_KIND,ZEND_VM_KIND_SWITCH,[virtual machine dispatch method])
@@ -232,10 +222,6 @@
   LIBZEND_CPLUSPLUS_CHECKS
 fi

-if test "$ZEND_MULTIBYTE" = "yes"; then
-  AC_DEFINE(ZEND_MULTIBYTE, 1, [ ])
-fi
-
 changequote({,})
 if test -n "$GCC" && test "$ZEND_INLINE_OPTIMIZATION" != "yes"; then
   INLINE_CFLAGS=`echo $ac_n "$CFLAGS $ac_c" | sed s/-O[0-9s]*//`

Modified: php/php-src/trunk/Zend/tests/declare_001.phpt
===
--- php/php-src/trunk/Zend/tests/declare_001.phpt	2010-11-24 05:16:40 UTC (rev 305710)
+++ php/php-src/trunk/Zend/tests/declare_001.phpt	2010-11-24 05:41:23 UTC (rev 305711)
@@ -2,8 +2,8 @@
 Testing declare statement with several type values
 --SKIPIF--
 
 --FILE--

Added: php/php-src/trunk/Zend/tes

[PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING ext/pcre/php_pcre.c ext/pcre/tests/002.phpt ext/pcre/tests/preg_match_all_basic.phpt ext/pcre/tests/preg_match_all_error.phpt

2010-11-04 Thread Adam Harvey
aharvey  Fri, 05 Nov 2010 04:37:27 +

Revision: http://svn.php.net/viewvc?view=revision&revision=305097

Log:
Implemented FR #53238 (Make third parameter of preg_match_all optional).

Bug: http://bugs.php.net/53238 (Assigned) Make third parameter of 
preg_match_all optional
  
Changed paths:
U   php/php-src/trunk/NEWS
U   php/php-src/trunk/UPGRADING
U   php/php-src/trunk/ext/pcre/php_pcre.c
U   php/php-src/trunk/ext/pcre/tests/002.phpt
U   php/php-src/trunk/ext/pcre/tests/preg_match_all_basic.phpt
U   php/php-src/trunk/ext/pcre/tests/preg_match_all_error.phpt

Modified: php/php-src/trunk/NEWS
===
--- php/php-src/trunk/NEWS  2010-11-05 01:56:28 UTC (rev 305096)
+++ php/php-src/trunk/NEWS  2010-11-05 04:37:27 UTC (rev 305097)
@@ -121,6 +121,8 @@

 - Deprecated mysql_list_dbs() (Request #50667). (Andrey)

+- Implemented FR #53238 (Make third parameter of preg_match_all optional).
+  (Adam)
 - Implemented FR #52555 (Ability to get HTTP response code). (Paul Dragoonis)
 - Implemented FR #51295 (SQLite3::busyTimeout not existing). (Mark)
 - Implemented FR #49366 (Make slash escaping optional in json_encode()). (Adam)

Modified: php/php-src/trunk/UPGRADING
===
--- php/php-src/trunk/UPGRADING 2010-11-05 01:56:28 UTC (rev 305096)
+++ php/php-src/trunk/UPGRADING 2010-11-05 04:37:27 UTC (rev 305097)
@@ -133,6 +133,9 @@
   behavior follows the recommendations of Unicode Technical Report #36.
 - htmlspecialchars_decode/html_entity_decode now decode ' if the document
   type is ENT_XML1, ENT_XHTML, or ENT_HTML5.
+- The third parameter ($matches) to preg_match_all() is now optional. If
+  omitted, the function will simply return the number of times the pattern was
+  matched in the subject and will have no other side effects.


 ===

Modified: php/php-src/trunk/ext/pcre/php_pcre.c
===
--- php/php-src/trunk/ext/pcre/php_pcre.c   2010-11-05 01:56:28 UTC (rev 
305096)
+++ php/php-src/trunk/ext/pcre/php_pcre.c   2010-11-05 04:37:27 UTC (rev 
305097)
@@ -506,7 +506,7 @@
long  flags = 0;/* Match control flags 
*/
long  start_offset = 0; /* Where the new search 
starts */

-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ((global) ? 
"ssz|ll" : "ss|zll"), ®ex, ®ex_len,
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|zll", ®ex, 
®ex_len,
  &subject, 
&subject_len, &subpats, &flags, &start_offset) == FAILURE) {
RETURN_FALSE;
}
@@ -608,7 +608,7 @@
offsets = (int *)safe_emalloc(size_offsets, sizeof(int), 0);

/* Allocate match sets array and initialize the values. */
-   if (global && subpats_order == PREG_PATTERN_ORDER) {
+   if (global && subpats && subpats_order == PREG_PATTERN_ORDER) {
match_sets = (zval **)safe_emalloc(num_subpats, sizeof(zval *), 
0);
for (i=0; i
 --EXPECTF--
 int(1)
@@ -80,3 +86,7 @@
   array(0) {
   }
 }
+int(2)
+int(0)
+int(1)
+int(6)

Modified: php/php-src/trunk/ext/pcre/tests/preg_match_all_error.phpt
===
--- php/php-src/trunk/ext/pcre/tests/preg_match_all_error.phpt  2010-11-05 
01:56:28 UTC (rev 305096)
+++ php/php-src/trunk/ext/pcre/tests/preg_match_all_error.phpt  2010-11-05 
04:37:27 UTC (rev 305097)
@@ -21,8 +21,7 @@
 // Testing preg_match_all withone less than the expected number of arguments
 echo "\n-- Testing preg_match_all() function with less than expected no. of 
arguments --\n";
 $pattern = '/\w/';
-$subject = 'string_val';
-var_dump(preg_match_all($pattern, $subject));
+var_dump(preg_match_all($pattern));
 echo "Done"
 ?>
 --EXPECTF--
@@ -30,7 +29,7 @@

 -- Testing preg_match_all() function with Zero arguments --

-Warning: preg_match_all() expects at least 3 parameters, 0 given in 
%spreg_match_all_error.php on line %d
+Warning: preg_match_all() expects at least 2 parameters, 0 given in 
%spreg_match_all_error.php on line %d
 bool(false)

 -- Testing preg_match_all() function with more than expected no. of arguments 
--
@@ -40,6 +39,6 @@

 -- Testing preg_match_all() function with less than expected no. of arguments 
--

-Warning: preg_match_all() expects at least 3 parameters, 2 given in 
%spreg_match_all_error.php on line %d
+Warning: preg_match_all() expects at least 2 parameters, 1 given in 
%spreg_match_all_error.php on line %d
 bool(false)
 Done

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING ext/standard/basic_functions.c

2010-10-04 Thread Kalle Sommer Nielsen
kalleMon, 04 Oct 2010 20:26:50 +

Revision: http://svn.php.net/viewvc?view=revision&revision=304036

Log:
Revert for now

Changed paths:
U   php/php-src/trunk/NEWS
U   php/php-src/trunk/UPGRADING
U   php/php-src/trunk/ext/standard/basic_functions.c

Modified: php/php-src/trunk/NEWS
===
--- php/php-src/trunk/NEWS  2010-10-04 20:20:30 UTC (rev 304035)
+++ php/php-src/trunk/NEWS  2010-10-04 20:26:50 UTC (rev 304036)
@@ -101,9 +101,6 @@
 - Improved the performance of unserialize(). (galaxy dot mipt at gmail dot com,
   Kalle)

-- Added PHP_RAND_MAX & PHP_MT_RAND_MAX constants to get the maximum random
-  range instead of their counterpart functions. (Kalle)
-
 - Removed legacy features:
   . allow_call_time_pass_reference. (Pierrick)
   . define_syslog_variables ini option and its associated function. (Kalle)
@@ -122,7 +119,6 @@
   PDO_mysql. (Johannes)

 - Deprecated mysql_list_dbs() (Request #50667). (Andrey)
-- Deprecated getrandmax() & mt_getrandmax() in favour of constants. (Kalle)

 - Implemented FR #52555 (Ability to get HTTP response code). (Paul Dragoonis)
 - Implemented FR #51295 (SQLite3::busyTimeout not existing). (Mark)

Modified: php/php-src/trunk/UPGRADING
===
--- php/php-src/trunk/UPGRADING 2010-10-04 20:20:30 UTC (rev 304035)
+++ php/php-src/trunk/UPGRADING 2010-10-04 20:26:50 UTC (rev 304036)
@@ -8,7 +8,6 @@
 4. Changes made to existing methods
 5. Changes made to existing classes
 6. Deprecated
- a. deprecated functions
 7. Extensions:
  a. moved out to PECL and actively maintained there
  b. no longer maintained
@@ -110,11 +109,6 @@
 6. Deprecated
 =

-a. deprecated functions
-
-   - getrandmax()  -- use the PHP_RAND_MAX constant
-   - mt_getrandmax()   -- use the PHP_MT_RAND_MAX constant
-
 ==
 7. Removed
 ==
@@ -241,8 +235,6 @@

- JSON_PRETTY_PRINT
- JSON_UNESCAPED_SLASHES
-   - PHP_RAND_MAX
-   - PHP_MT_RAND_MAX

  g. New classes


Modified: php/php-src/trunk/ext/standard/basic_functions.c
===
--- php/php-src/trunk/ext/standard/basic_functions.c2010-10-04 20:20:30 UTC 
(rev 304035)
+++ php/php-src/trunk/ext/standard/basic_functions.c2010-10-04 20:26:50 UTC 
(rev 304036)
@@ -33,7 +33,6 @@
 #include "ext/session/php_session.h"
 #include "zend_operators.h"
 #include "ext/standard/php_dns.h"
-#include "ext/standard/php_rand.h"
 #include "ext/standard/php_uuencode.h"

 #ifdef PHP_WIN32
@@ -2829,7 +2828,7 @@

PHP_FE(rand,
arginfo_rand)
PHP_FE(srand,   
arginfo_srand)
-   PHP_DEP_FE(getrandmax,  
arginfo_getrandmax)
+   PHP_FE(getrandmax,  
arginfo_getrandmax)
PHP_FE(mt_rand, 
arginfo_mt_rand)
PHP_FE(mt_srand,
arginfo_mt_srand)
PHP_DEP_FE(mt_getrandmax,   
arginfo_mt_getrandmax)
@@ -3552,9 +3551,6 @@
REGISTER_MATH_CONSTANT(M_SQRT3);
REGISTER_DOUBLE_CONSTANT("INF", php_get_inf(), CONST_CS | 
CONST_PERSISTENT);
REGISTER_DOUBLE_CONSTANT("NAN", php_get_nan(), CONST_CS | 
CONST_PERSISTENT);
-
-   REGISTER_MATH_CONSTANT(PHP_RAND_MAX);
-   REGISTER_MATH_CONSTANT(PHP_MT_RAND_MAX);

REGISTER_LONG_CONSTANT("PHP_ROUND_HALF_UP", PHP_ROUND_HALF_UP, CONST_CS 
| CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PHP_ROUND_HALF_DOWN", PHP_ROUND_HALF_DOWN, 
CONST_CS | CONST_PERSISTENT);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING ext/standard/basic_functions.c

2010-10-04 Thread Peter Cowburn
On 1 October 2010 10:18, Kalle Sommer Nielsen  wrote:
> -       PHP_FE(getrandmax,                                                    
>                                                           arginfo_getrandmax)
> -       PHP_FE(mt_rand,                                                       
>                                                           arginfo_mt_rand)
> +       PHP_DEP_FE(getrandmax,                                                
>                                                   arginfo_getrandmax)
> +       PHP_DEP_FE(mt_rand,                                                   
>                                                           arginfo_mt_rand)

Looks like you deprecated mt_rand(), oopsie. (Tips hat in mgdm's direction)

>        PHP_FE(mt_srand,                                                       
>                                                          arginfo_mt_srand)
>        PHP_FE(mt_getrandmax,                                                  
>                                                  arginfo_mt_getrandmax)
>


Re: [PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING ext/standard/basic_functions.c

2010-10-01 Thread Pierre Joye
On Fri, Oct 1, 2010 at 12:08 PM, Kalle Sommer Nielsen  wrote:
>> What is the reasoning behind that? It could be possible that the
>> max/min has to be defined at runtime at some point.
>
> Define at runtime?

'possible', 'at some point' (new RNG implementation).

In any case, I don't see any gain to deprecate them for the sake of
adding constants. Please revert the deprecation, I'm sure about the
constant additions as they could be useless later (same reason).

Cheers,
-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING ext/standard/basic_functions.c

2010-10-01 Thread Kalle Sommer Nielsen
> What is the reasoning behind that? It could be possible that the
> max/min has to be defined at runtime at some point.

Define at runtime? The values those functions expose are from compile
time constants. I do not see why we need a function call to get a
statically defined value.

Also, there is no min value


-- 
regards,

Kalle Sommer Nielsen
ka...@php.net

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING ext/standard/basic_functions.c

2010-10-01 Thread Pierre Joye
On Fri, Oct 1, 2010 at 11:18 AM, Kalle Sommer Nielsen  wrote:
> kalle                                    Fri, 01 Oct 2010 09:18:44 +
>
> Revision: http://svn.php.net/viewvc?view=revision&revision=303912
>
> Log:
> * Added PHP_RAND_MAX and PHP_MT_RAND_MAX constants
> * Deprecated getrandmax() and mt_getrandmax() in favour of the new constants

What is the reasoning behind that? It could be possible that the
max/min has to be defined at runtime at some point.

Cheers,
-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING ext/standard/basic_functions.c

2010-10-01 Thread Kalle Sommer Nielsen
kalleFri, 01 Oct 2010 09:18:44 +

Revision: http://svn.php.net/viewvc?view=revision&revision=303912

Log:
* Added PHP_RAND_MAX and PHP_MT_RAND_MAX constants
* Deprecated getrandmax() and mt_getrandmax() in favour of the new constants

# We should promote constants for static data like such instead of function 
calls
# maybe this was just an old left-over

Changed paths:
U   php/php-src/trunk/NEWS
U   php/php-src/trunk/UPGRADING
U   php/php-src/trunk/ext/standard/basic_functions.c

Modified: php/php-src/trunk/NEWS
===
--- php/php-src/trunk/NEWS  2010-10-01 08:54:16 UTC (rev 303911)
+++ php/php-src/trunk/NEWS  2010-10-01 09:18:44 UTC (rev 303912)
@@ -101,6 +101,9 @@
 - Improved the performance of unserialize(). (galaxy dot mipt at gmail dot com,
   Kalle)

+- Added PHP_RAND_MAX & PHP_MT_RAND_MAX constants to get the maximum random
+  range instead of their counterpart functions. (Kalle)
+
 - Removed legacy features:
   . allow_call_time_pass_reference. (Pierrick)
   . define_syslog_variables ini option and its associated function. (Kalle)
@@ -119,6 +122,7 @@
   PDO_mysql. (Johannes)

 - Deprecated mysql_list_dbs() (Request #50667). (Andrey)
+- Deprecated getrandmax() & mt_getrandmax() in favour of constants. (Kalle)

 - Implemented FR #52555 (Ability to get HTTP response code). (Paul Dragoonis)
 - Implemented FR #51295 (SQLite3::busyTimeout not existing). (Mark)

Modified: php/php-src/trunk/UPGRADING
===
--- php/php-src/trunk/UPGRADING 2010-10-01 08:54:16 UTC (rev 303911)
+++ php/php-src/trunk/UPGRADING 2010-10-01 09:18:44 UTC (rev 303912)
@@ -8,6 +8,7 @@
 4. Changes made to existing methods
 5. Changes made to existing classes
 6. Deprecated
+ a. deprecated functions
 7. Extensions:
  a. moved out to PECL and actively maintained there
  b. no longer maintained
@@ -109,8 +110,11 @@
 6. Deprecated
 =

--
+a. deprecated functions

+   - getrandmax()  -- use the PHP_RAND_MAX constant
+   - mt_getrandmax()   -- use the PHP_MT_RAND_MAX constant
+
 ==
 7. Removed
 ==
@@ -237,6 +241,8 @@

- JSON_PRETTY_PRINT
- JSON_UNESCAPED_SLASHES
+   - PHP_RAND_MAX
+   - PHP_MT_RAND_MAX

  g. New classes


Modified: php/php-src/trunk/ext/standard/basic_functions.c
===
--- php/php-src/trunk/ext/standard/basic_functions.c2010-10-01 08:54:16 UTC 
(rev 303911)
+++ php/php-src/trunk/ext/standard/basic_functions.c2010-10-01 09:18:44 UTC 
(rev 303912)
@@ -33,6 +33,7 @@
 #include "ext/session/php_session.h"
 #include "zend_operators.h"
 #include "ext/standard/php_dns.h"
+#include "ext/standard/php_rand.h"
 #include "ext/standard/php_uuencode.h"

 #ifdef PHP_WIN32
@@ -2828,8 +2829,8 @@

PHP_FE(rand,
arginfo_rand)
PHP_FE(srand,   
arginfo_srand)
-   PHP_FE(getrandmax,  
arginfo_getrandmax)
-   PHP_FE(mt_rand, 
arginfo_mt_rand)
+   PHP_DEP_FE(getrandmax,  
arginfo_getrandmax)
+   PHP_DEP_FE(mt_rand, 
arginfo_mt_rand)
PHP_FE(mt_srand,
arginfo_mt_srand)
PHP_FE(mt_getrandmax,   
arginfo_mt_getrandmax)

@@ -3551,6 +3552,9 @@
REGISTER_MATH_CONSTANT(M_SQRT3);
REGISTER_DOUBLE_CONSTANT("INF", php_get_inf(), CONST_CS | 
CONST_PERSISTENT);
REGISTER_DOUBLE_CONSTANT("NAN", php_get_nan(), CONST_CS | 
CONST_PERSISTENT);
+
+   REGISTER_MATH_CONSTANT(PHP_RAND_MAX);
+   REGISTER_MATH_CONSTANT(PHP_MT_RAND_MAX);

REGISTER_LONG_CONSTANT("PHP_ROUND_HALF_UP", PHP_ROUND_HALF_UP, CONST_CS 
| CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PHP_ROUND_HALF_DOWN", PHP_ROUND_HALF_DOWN, 
CONST_CS | CONST_PERSISTENT);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING

2010-09-16 Thread Felipe Pena
felipe   Thu, 16 Sep 2010 21:49:48 +

Revision: http://svn.php.net/viewvc?view=revision&revision=303435

Log:
- Added missing entries related to pdo_dblib

Changed paths:
U   php/php-src/trunk/NEWS
U   php/php-src/trunk/UPGRADING

Modified: php/php-src/trunk/NEWS
===
--- php/php-src/trunk/NEWS  2010-09-16 21:16:55 UTC (rev 303434)
+++ php/php-src/trunk/NEWS  2010-09-16 21:49:48 UTC (rev 303435)
@@ -50,6 +50,7 @@
 - Added JsonSerializable interface (Sara)
 - Added JSON_BIGINT_AS_STRING, extended json_decode() sig with $options. (Sara)
 - Added support for storing upload progress feedback in session data. (Arnaud)
+- Added nextRowset support for PDO_dblib. (Stanley)
 - Added support for CURLOPT_MAX_RECV_SPEED_LARGE and 
CURLOPT_MAX_SEND_SPEED_LARGE.
   FR #51815. (Pierrick)
 - Added iterator support in MySQLi. mysqli_result implements Traversable.
@@ -130,6 +131,7 @@
 - Fixed PDO objects binary incompatibility. (Dmitry)

 - Fixed bug #52211 (iconv() returns part of string on error). (Felipe)
+- Fixed bug #50755 (PDO DBLIB Fails with OOM). (Stanley)


 ?? ??? 20??, PHP 5.3.3

Modified: php/php-src/trunk/UPGRADING
===
--- php/php-src/trunk/UPGRADING 2010-09-16 21:16:55 UTC (rev 303434)
+++ php/php-src/trunk/UPGRADING 2010-09-16 21:49:48 UTC (rev 303435)
@@ -250,6 +250,9 @@
  - ReflectionClass::getTraits()
  - ReflectionClass::getTraitNames()
  - ReflectionClass::getTraitAliases()
+
+   - PDO_dblib
+ - PDO::newRowset()

  i. New class constants


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING ext/json/json.c ext/json/php_json.h ext/json/tests/json_encode_pretty_print.phpt

2010-09-16 Thread Adam Harvey
aharvey  Thu, 16 Sep 2010 16:21:15 +

Revision: http://svn.php.net/viewvc?view=revision&revision=303425

Log:
Implement FR #44331 (Formatting option for json_encode). Bikeshedding about the
exact form of the JSON pretty printing and brace handling will only be accepted
in the form of patches. ;)

Bug: http://bugs.php.net/44331 (Open) Formatting option for json_encode
  
Changed paths:
U   php/php-src/trunk/NEWS
U   php/php-src/trunk/UPGRADING
U   php/php-src/trunk/ext/json/json.c
U   php/php-src/trunk/ext/json/php_json.h
A   php/php-src/trunk/ext/json/tests/json_encode_pretty_print.phpt

Modified: php/php-src/trunk/NEWS
===
--- php/php-src/trunk/NEWS  2010-09-16 16:12:32 UTC (rev 303424)
+++ php/php-src/trunk/NEWS  2010-09-16 16:21:15 UTC (rev 303425)
@@ -121,6 +121,7 @@
 - Implemented FR #49366 (Make slash escaping optional in json_encode()). (Adam)
 - Implemented FR #48632 (OpenSSL AES support). (yonas dot y
at gmail dot com, Pierre)
+- Implemented FR #44331 (Formatting option for json_encode). (Adam)
 - Implemented FR #42060 (Add paged Results support). (a...@openldap.org,
   iaren...@eteo.mondragon.edu, jean...@au-fil-du.net, remy.sai...@gmail.com)
 - Implemented FR #34857 (Change array_combine behaviour when called with empty

Modified: php/php-src/trunk/UPGRADING
===
--- php/php-src/trunk/UPGRADING 2010-09-16 16:12:32 UTC (rev 303424)
+++ php/php-src/trunk/UPGRADING 2010-09-16 16:21:15 UTC (rev 303425)
@@ -235,6 +235,7 @@

  f. New global constants

+   - JSON_PRETTY_PRINT
- JSON_UNESCAPED_SLASHES

  g. New classes

Modified: php/php-src/trunk/ext/json/json.c
===
--- php/php-src/trunk/ext/json/json.c   2010-09-16 16:12:32 UTC (rev 303424)
+++ php/php-src/trunk/ext/json/json.c   2010-09-16 16:21:15 UTC (rev 303425)
@@ -94,6 +94,7 @@
REGISTER_LONG_CONSTANT("JSON_FORCE_OBJECT", PHP_JSON_FORCE_OBJECT, 
CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("JSON_NUMERIC_CHECK", PHP_JSON_NUMERIC_CHECK, 
CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("JSON_UNESCAPED_SLASHES", 
PHP_JSON_UNESCAPED_SLASHES, CONST_CS | CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT("JSON_PRETTY_PRINT", PHP_JSON_PRETTY_PRINT, 
CONST_CS | CONST_PERSISTENT);

REGISTER_LONG_CONSTANT("JSON_ERROR_NONE", PHP_JSON_ERROR_NONE, CONST_CS 
| CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("JSON_ERROR_DEPTH", PHP_JSON_ERROR_DEPTH, 
CONST_CS | CONST_PERSISTENT);
@@ -113,6 +114,7 @@
 */
 static PHP_GINIT_FUNCTION(json)
 {
+   json_globals->encoder_depth = 0;
json_globals->error_code = 0;
 }
 /* }}} */
@@ -189,6 +191,30 @@
 }
 /* }}} */

+/* {{{ Pretty printing support functions */
+
+static inline void json_pretty_print_char(smart_str *buf, int options, char c 
TSRMLS_DC) /* {{{ */
+{
+   if (options & PHP_JSON_PRETTY_PRINT) {
+   smart_str_appendc(buf, c);
+   }
+}
+/* }}} */
+
+static inline void json_pretty_print_indent(smart_str *buf, int options 
TSRMLS_DC) /* {{{ */
+{
+   int i;
+
+   if (options & PHP_JSON_PRETTY_PRINT) {
+   for (i = 0; i < JSON_G(encoder_depth); ++i) {
+   smart_str_appendl(buf, "", 4);
+   }
+   }
+}
+/* }}} */
+
+/* }}} */
+
 static void json_encode_array(smart_str *buf, zval **val, int options 
TSRMLS_DC) /* {{{ */
 {
int i, r;
@@ -214,6 +240,9 @@
smart_str_appendc(buf, '{');
}

+   json_pretty_print_char(buf, options, '\n' TSRMLS_CC);
+   ++JSON_G(encoder_depth);
+
i = myht ? zend_hash_num_elements(myht) : 0;

if (i > 0)
@@ -241,10 +270,12 @@
if (r == PHP_JSON_OUTPUT_ARRAY) {
if (need_comma) {
smart_str_appendc(buf, ',');
+   json_pretty_print_char(buf, 
options, '\n' TSRMLS_CC);
} else {
need_comma = 1;
}
-
+
+   json_pretty_print_indent(buf, options 
TSRMLS_CC);
php_json_encode(buf, *data, options 
TSRMLS_CC);
} else if (r == PHP_JSON_OUTPUT_OBJECT) {
if (i == HASH_KEY_IS_STRING) {
@@ -258,26 +289,36 @@

if (need_comma) {
smart_str_appendc(buf, 
',');
+   
json_pretty_print_char(buf, options, '\n' TSRMLS_CC);
} el

[PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING ext/json/json.c ext/json/php_json.h ext/json/tests/json_encode_unescaped_slashes.phpt

2010-09-16 Thread Adam Harvey
aharvey  Thu, 16 Sep 2010 13:53:27 +

Revision: http://svn.php.net/viewvc?view=revision&revision=303421

Log:
Implemented FR #49366 (Make slash escaping optional in json_encode()).

Bug: http://bugs.php.net/49366 (Open) json_encode incorrectly escapes slashes 
(/)
  
Changed paths:
U   php/php-src/trunk/NEWS
U   php/php-src/trunk/UPGRADING
U   php/php-src/trunk/ext/json/json.c
U   php/php-src/trunk/ext/json/php_json.h
A   php/php-src/trunk/ext/json/tests/json_encode_unescaped_slashes.phpt

Modified: php/php-src/trunk/NEWS
===
--- php/php-src/trunk/NEWS  2010-09-16 13:47:13 UTC (rev 303420)
+++ php/php-src/trunk/NEWS  2010-09-16 13:53:27 UTC (rev 303421)
@@ -118,6 +118,7 @@

 - Implemented FR #52555 (Ability to get HTTP response code). (Paul Dragoonis)
 - Implemented FR #51295 (SQLite3::busyTimeout not existing). (Mark)
+- Implemented FR #49366 (Make slash escaping optional in json_encode()). (Adam)
 - Implemented FR #48632 (OpenSSL AES support). (yonas dot y
at gmail dot com, Pierre)
 - Implemented FR #42060 (Add paged Results support). (a...@openldap.org,

Modified: php/php-src/trunk/UPGRADING
===
--- php/php-src/trunk/UPGRADING 2010-09-16 13:47:13 UTC (rev 303420)
+++ php/php-src/trunk/UPGRADING 2010-09-16 13:53:27 UTC (rev 303421)
@@ -235,7 +235,7 @@

  f. New global constants

-   -
+   - JSON_UNESCAPED_SLASHES

  g. New classes


Modified: php/php-src/trunk/ext/json/json.c
===
--- php/php-src/trunk/ext/json/json.c   2010-09-16 13:47:13 UTC (rev 303420)
+++ php/php-src/trunk/ext/json/json.c   2010-09-16 13:53:27 UTC (rev 303421)
@@ -92,6 +92,7 @@
REGISTER_LONG_CONSTANT("JSON_HEX_QUOT", PHP_JSON_HEX_QUOT, CONST_CS | 
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("JSON_FORCE_OBJECT", PHP_JSON_FORCE_OBJECT, 
CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("JSON_NUMERIC_CHECK", PHP_JSON_NUMERIC_CHECK, 
CONST_CS | CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT("JSON_UNESCAPED_SLASHES", 
PHP_JSON_UNESCAPED_SLASHES, CONST_CS | CONST_PERSISTENT);

REGISTER_LONG_CONSTANT("JSON_ERROR_NONE", PHP_JSON_ERROR_NONE, CONST_CS 
| CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("JSON_ERROR_DEPTH", PHP_JSON_ERROR_DEPTH, 
CONST_CS | CONST_PERSISTENT);
@@ -372,7 +373,11 @@
break;

case '/':
-   smart_str_appendl(buf, "\\/", 2);
+   if (options & PHP_JSON_UNESCAPED_SLASHES) {
+   smart_str_appendc(buf, '/');
+   } else {
+   smart_str_appendl(buf, "\\/", 2);
+   }
break;

case '\b':

Modified: php/php-src/trunk/ext/json/php_json.h
===
--- php/php-src/trunk/ext/json/php_json.h   2010-09-16 13:47:13 UTC (rev 
303420)
+++ php/php-src/trunk/ext/json/php_json.h   2010-09-16 13:53:27 UTC (rev 
303421)
@@ -59,6 +59,7 @@
 #define PHP_JSON_HEX_QUOT  (1<<3)
 #define PHP_JSON_FORCE_OBJECT  (1<<4)
 #define PHP_JSON_NUMERIC_CHECK (1<<5)
+#define PHP_JSON_UNESCAPED_SLASHES (1<<6)

 /* Internal flags */
 #define PHP_JSON_OUTPUT_ARRAY  0

Added: php/php-src/trunk/ext/json/tests/json_encode_unescaped_slashes.phpt
===
--- php/php-src/trunk/ext/json/tests/json_encode_unescaped_slashes.phpt 
(rev 0)
+++ php/php-src/trunk/ext/json/tests/json_encode_unescaped_slashes.phpt 
2010-09-16 13:53:27 UTC (rev 303421)
@@ -0,0 +1,12 @@
+--TEST--
+json_decode() tests
+--SKIPIF--
+
+--FILE--
+
+--EXPECT--
+string(6) ""a\/b""
+string(5) ""a/b""

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING ext/standard/array.c ext/standard/tests/array/array_combine_error2.phpt ext/standard/tests/array/array_combine_variation3.phpt ext/standard/tests/arra

2010-08-26 Thread Adam Harvey
aharvey  Fri, 27 Aug 2010 03:54:10 +

Revision: http://svn.php.net/viewvc?view=revision&revision=302838

Log:
Implemented request #34857 (Change array_combine behaviour when called with
empty arrays). Patch by Joel Perras .

Bug: http://bugs.php.net/34857 (Assigned) Change array_combine behavoiur
  
Changed paths:
U   php/php-src/trunk/NEWS
U   php/php-src/trunk/UPGRADING
U   php/php-src/trunk/ext/standard/array.c
U   php/php-src/trunk/ext/standard/tests/array/array_combine_error2.phpt
U   php/php-src/trunk/ext/standard/tests/array/array_combine_variation3.phpt
U   php/php-src/trunk/ext/standard/tests/array/array_combine_variation4.phpt
U   php/php-src/trunk/ext/standard/tests/array/array_combine_variation5.phpt

Modified: php/php-src/trunk/NEWS
===
--- php/php-src/trunk/NEWS  2010-08-27 02:42:44 UTC (rev 302837)
+++ php/php-src/trunk/NEWS  2010-08-27 03:54:10 UTC (rev 302838)
@@ -101,6 +101,8 @@
at gmail dot com, Pierre)
 - Implemented FR #42060 (Add paged Results support). (a...@openldap.org,
   iaren...@eteo.mondragon.edu, jean...@au-fil-du.net, remy.sai...@gmail.com)
+- Implemented FR #34857 (Change array_combine behaviour when called with empty
+  arrays). (joel.per...@gmail.com)

 - Fixed PDO objects binary incompatibility. (Dmitry)


Modified: php/php-src/trunk/UPGRADING
===
--- php/php-src/trunk/UPGRADING 2010-08-27 02:42:44 UTC (rev 302837)
+++ php/php-src/trunk/UPGRADING 2010-08-27 03:54:10 UTC (rev 302838)
@@ -90,7 +90,8 @@
 3. Changes made to existing functions
 =

--
+- array_combine now returns array() instead of FALSE when two empty arrays are
+  provided as parameters.

 ===
 4. Changes made to existing methods

Modified: php/php-src/trunk/ext/standard/array.c
===
--- php/php-src/trunk/ext/standard/array.c  2010-08-27 02:42:44 UTC (rev 
302837)
+++ php/php-src/trunk/ext/standard/array.c  2010-08-27 03:54:10 UTC (rev 
302838)
@@ -4481,13 +4481,12 @@
RETURN_FALSE;
}

+   array_init_size(return_value, num_keys);
+
if (!num_keys) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Both parameters 
should have at least 1 element");
-   RETURN_FALSE;
+   return;
}

-   array_init_size(return_value, num_keys);
-
zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(keys), &pos_keys);
zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(values), &pos_values);
while (zend_hash_get_current_data_ex(Z_ARRVAL_P(keys), (void 
**)&entry_keys, &pos_keys) == SUCCESS &&

Modified: php/php-src/trunk/ext/standard/tests/array/array_combine_error2.phpt
===
--- php/php-src/trunk/ext/standard/tests/array/array_combine_error2.phpt
2010-08-27 02:42:44 UTC (rev 302837)
+++ php/php-src/trunk/ext/standard/tests/array/array_combine_error2.phpt
2010-08-27 03:54:10 UTC (rev 302838)
@@ -32,10 +32,9 @@
 *** Testing array_combine() : error conditions specific to array_combine() ***

 -- Testing array_combine() function with empty arrays --
+array(0) {
+}

-Warning: array_combine(): Both parameters should have at least 1 element in %s 
on line %d
-bool(false)
-
 -- Testing array_combine() function with empty array for $keys argument --

 Warning: array_combine(): Both parameters should have an equal number of 
elements in %s on line %d

Modified: 
php/php-src/trunk/ext/standard/tests/array/array_combine_variation3.phpt
===
--- php/php-src/trunk/ext/standard/tests/array/array_combine_variation3.phpt
2010-08-27 02:42:44 UTC (rev 302837)
+++ php/php-src/trunk/ext/standard/tests/array/array_combine_variation3.phpt
2010-08-27 03:54:10 UTC (rev 302838)
@@ -108,9 +108,8 @@
   bool(true)
 }
 -- Iteration 4 --
-
-Warning: array_combine(): Both parameters should have at least 1 element in %s 
on line %d
-bool(false)
+array(0) {
+}
 -- Iteration 5 --
 array(1) {
   [""]=>

Modified: 
php/php-src/trunk/ext/standard/tests/array/array_combine_variation4.phpt
===
--- php/php-src/trunk/ext/standard/tests/array/array_combine_variation4.phpt
2010-08-27 02:42:44 UTC (rev 302837)
+++ php/php-src/trunk/ext/standard/tests/array/array_combine_variation4.phpt
2010-08-27 03:54:10 UTC (rev 302838)
@@ -100,9 +100,8 @@

 Warning: Illegal offset type in %s on line %d
 -- Iteration 1 --
-
-Warning: array_combine(): Both parameters should have at least 1 element in %s 
on line %d
-bool(false)
+array(0) {
+}
 -- Iteration 2 --
 array(1) {
   [0]=>

Modified: 
php/php-src/trunk/ext/standard/tests/array/ar

[PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING Zend/tests/dereference_001.phpt Zend/tests/dereference_002.phpt Zend/tests/dereference_003.phpt Zend/tests/dereference_004.phpt Zend/tests/dereference

2010-06-07 Thread Felipe Pena
felipe   Tue, 08 Jun 2010 00:05:29 +

Revision: http://svn.php.net/viewvc?view=revision&revision=300266

Log:
- Added array dereferencing support [DOC]
# http://wiki.php.net/rfc/functionarraydereferencing

Changed paths:
U   php/php-src/trunk/NEWS
U   php/php-src/trunk/UPGRADING
A   php/php-src/trunk/Zend/tests/dereference_001.phpt
A   php/php-src/trunk/Zend/tests/dereference_002.phpt
A   php/php-src/trunk/Zend/tests/dereference_003.phpt
A   php/php-src/trunk/Zend/tests/dereference_004.phpt
A   php/php-src/trunk/Zend/tests/dereference_005.phpt
A   php/php-src/trunk/Zend/tests/dereference_006.phpt
A   php/php-src/trunk/Zend/tests/dereference_007.phpt
A   php/php-src/trunk/Zend/tests/dereference_008.phpt
A   php/php-src/trunk/Zend/tests/dereference_009.phpt
A   php/php-src/trunk/Zend/tests/dereference_010.phpt
A   php/php-src/trunk/Zend/tests/dereference_011.phpt
U   php/php-src/trunk/Zend/zend_language_parser.y

Modified: php/php-src/trunk/NEWS
===
--- php/php-src/trunk/NEWS	2010-06-07 23:10:56 UTC (rev 300265)
+++ php/php-src/trunk/NEWS	2010-06-08 00:05:29 UTC (rev 300266)
@@ -22,6 +22,7 @@
 - Added an optimization which saves memory and emalloc/efree calls for empty
   HashTables (Stas, Dmitry)

+- Added array dereferencing support. (Felipe)
 - Added DTrace support. (David Soria Parra)
 - Added Tokyo Cabinet abstract DB support to ext/dba. (Michael Maclean)
 - Added Jenkins's one-at-a-time hash support to ext/hash. (Martin Jansen)

Modified: php/php-src/trunk/UPGRADING
===
--- php/php-src/trunk/UPGRADING	2010-06-07 23:10:56 UTC (rev 300265)
+++ php/php-src/trunk/UPGRADING	2010-06-08 00:05:29 UTC (rev 300266)
@@ -185,7 +185,10 @@
 11. Syntax additions
 

--
+- Array dereferencing.
+  e.g.
+foo()[0]
+$foo->bar()[0]

 ===
 12. Windows support

Added: php/php-src/trunk/Zend/tests/dereference_001.phpt
===
--- php/php-src/trunk/Zend/tests/dereference_001.phpt	(rev 0)
+++ php/php-src/trunk/Zend/tests/dereference_001.phpt	2010-06-08 00:05:29 UTC (rev 300266)
@@ -0,0 +1,51 @@
+--TEST--
+Testing array dereference
+--FILE--
+y); // int(1)
+
+function d() {
+	$obj = new foo;
+	return $obj->test();
+}
+var_dump(d()[0][0][0][3]); // string(1) "b"
+
+function e() {
+	$y = 'bar';
+	$x = array('a' => 'foo', 'b' => $y);
+	return $x;
+}
+var_dump(e()['b']); // string(3) "bar"
+
+?>
+--EXPECTF--
+int(5)
+
+Notice: Undefined offset: 0 in %s on line %d
+NULL
+int(1)
+string(1) "b"
+string(3) "bar"


Property changes on: php/php-src/trunk/Zend/tests/dereference_001.phpt
___
Added: svn:keywords
   + Id Rev Revision
Added: svn:eol-style
   + native

Added: php/php-src/trunk/Zend/tests/dereference_002.phpt
===
--- php/php-src/trunk/Zend/tests/dereference_002.phpt	(rev 0)
+++ php/php-src/trunk/Zend/tests/dereference_002.phpt	2010-06-08 00:05:29 UTC (rev 300266)
@@ -0,0 +1,79 @@
+--TEST--
+Testing array dereference on method calls
+--FILE--
+bar()[1]);
+var_dump($foo->bar()[1][1]);
+var_dump($x[0]);
+var_dump($x = $foo->bar()[2]);
+var_dump($x->bar());
+var_dump($x->bar()[0]);
+
+$x = array();
+$x[] = new foo;
+var_dump($x[0]->bar()[2]);
+var_dump($foo->bar()[2]->bar()[1]);
+var_dump($foo->bar()[2]->bar()[2]->bar()[1][0]);
+var_dump($foo->bar()[2]->bar()[2]->bar()[1][0][1]);
+var_dump($foo->bar()[2]->bar()[2]->bar()[4]);
+var_dump($foo->bar()[3]->bar());
+
+?>
+--EXPECTF--
+array(2) {
+  [0]=>
+  int(1)
+  [1]=>
+  int(5)
+}
+int(5)
+int(1)
+object(foo)#2 (0) {
+}
+array(3) {
+  [0]=>
+  int(3)
+  [1]=>
+  array(2) {
+[0]=>
+int(1)
+[1]=>
+int(5)
+  }
+  [2]=>
+  object(foo)#3 (0) {
+  }
+}
+int(3)
+object(foo)#3 (0) {
+}
+array(2) {
+  [0]=>
+  int(1)
+  [1]=>
+  int(5)
+}
+int(1)
+NULL
+
+Notice: Undefined offset: 4 in %s on line %d
+NULL
+
+Notice: Undefined offset: 3 in %s on line %d
+
+Fatal error: Call to a member function bar() on a non-object in %s on line %d


Property changes on: php/php-src/trunk/Zend/tests/dereference_002.phpt
___
Added: svn:keywords
   + Id Rev Revision
Added: svn:eol-style
   + native

Added: php/php-src/trunk/Zend/tests/dereference_003.phpt
===
--- php/php-src/trunk/Zend/tests/dereference_003.phpt	(rev 0)
+++ php/php-src/trunk/Zend/tests/dereference_003.phpt	2010-06-08 00:05:29 UTC (rev 300266)
@@ -0,0 +1,46 @@
+--TEST--
+Testing array dereference on method calls
+--FILE--
+b();
+	}
+}
+
+$foo = new foo;
+
+var_dump($foo->a()[0]->x);
+var_dum

[PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING

2010-05-11 Thread Arnaud Le Blanc
lbarnaud Tue, 11 May 2010 16:40:03 +

Revision: http://svn.php.net/viewvc?view=revision&revision=299256

Log:
NEWS

Changed paths:
U   php/php-src/trunk/NEWS
U   php/php-src/trunk/UPGRADING

Modified: php/php-src/trunk/NEWS
===
--- php/php-src/trunk/NEWS  2010-05-11 16:39:07 UTC (rev 299255)
+++ php/php-src/trunk/NEWS  2010-05-11 16:40:03 UTC (rev 299256)
@@ -31,6 +31,7 @@
 - Added closure $this support back. (Stas)
 - Added SplObjectStorage::getHash() hook. (Etienne)
 - Added JSON_Serializable interface (Sara)
+- Added support for storing upload progress feedback in session data. (Arnaud)

 - default_charset if not specified is now UTF-8 instead of ISO-8859-1. (Rasmus)


Modified: php/php-src/trunk/UPGRADING
===
--- php/php-src/trunk/UPGRADING 2010-05-11 16:39:07 UTC (rev 299255)
+++ php/php-src/trunk/UPGRADING 2010-05-11 16:40:03 UTC (rev 299256)
@@ -159,7 +159,9 @@

  c. with changed behaviour

--
+- The session extension now can hook into the file upload feature
+  in order to provide upload progress information through session
+  variables.

  d. no longer possible to disable

@@ -175,7 +177,9 @@
 10. Changes in INI directives
 =

--
+- Added session.upload_progress.enabled, session.upload_progress.cleanup,
+  session.upload_progress.prefix, session.upload_progress.name,
+  session.upload_progress.freq, session.upload_progress.min_freq.

 
 11. Syntax additions

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING Zend/Zend.m4 ext/session/session.c php.ini-development php.ini-production

2010-03-31 Thread Rasmus Lerdorf
rasmus   Wed, 31 Mar 2010 18:03:17 +

Revision: http://svn.php.net/viewvc?view=revision&revision=297232

Log:
Set session.entropy_file to /dev/urandom or /dev/arandom by
default if present at compile-time.  Addresses part of bug #51436

Bug: http://bugs.php.net/51436 (Open) LCG entropy fix insufficient, uniqid 
leaks entropy, leads to weak session IDs
  
Changed paths:
U   php/php-src/trunk/NEWS
U   php/php-src/trunk/UPGRADING
U   php/php-src/trunk/Zend/Zend.m4
U   php/php-src/trunk/ext/session/session.c
U   php/php-src/trunk/php.ini-development
U   php/php-src/trunk/php.ini-production

Modified: php/php-src/trunk/NEWS
===
--- php/php-src/trunk/NEWS  2010-03-31 17:35:28 UTC (rev 297231)
+++ php/php-src/trunk/NEWS  2010-03-31 18:03:17 UTC (rev 297232)
@@ -13,7 +13,9 @@
 - Added command line option --rz to CLI. (Johannes)

 - default_charset if not specified is now UTF-8 instead of ISO-8859-1. (Rasmus)
-
+- default session.entropy_file is now /dev/urandom or /dev/arandom if either
+  is present at compile time. (Rasmus)
+
 ?? ??? 20??, PHP 5.3.3
 - Upgraded bundled PCRE to version 8.01. (Ilia)


Modified: php/php-src/trunk/UPGRADING
===
--- php/php-src/trunk/UPGRADING 2010-03-31 17:35:28 UTC (rev 297231)
+++ php/php-src/trunk/UPGRADING 2010-03-31 18:03:17 UTC (rev 297232)
@@ -40,8 +40,20 @@

 default_charset = iso-8859-1

-  to your php.ini to preserve pre-PHPX.Y behavior
+  to your php.ini to preserve pre-PHPX.Y behavior.

+- We now check at compile time if /dev/urandom or /dev/arandom
+  are present to provide non-blocking entropy to session id
+  generation.  If either is present, session.entropy_file
+  now defaults to that file and session.entropy_length defaults
+  to 32.  If you do not want extra entropy for your session ids
+  for some reason, add:
+
+session.entropy_file=
+session.entropy_length=0
+
+  to your php.ini to preserve pre-PHPX.Y behavior.
+
 =
 2. Reserved words and classes
 =

Modified: php/php-src/trunk/Zend/Zend.m4
===
--- php/php-src/trunk/Zend/Zend.m4  2010-03-31 17:35:28 UTC (rev 297231)
+++ php/php-src/trunk/Zend/Zend.m4  2010-03-31 18:03:17 UTC (rev 297232)
@@ -419,4 +419,11 @@
   AC_MSG_RESULT(yes)
 else
   AC_MSG_RESULT(no)
+  AC_MSG_CHECKING(whether /dev/arandom exists)
+  if test -r "/dev/arandom" && test -c "/dev/arandom"; then
+AC_DEFINE([HAVE_DEV_ARANDOM], 1, [Define if the target system has 
/dev/arandom device])
+AC_MSG_RESULT(yes)
+  else
+AC_MSG_RESULT(no)
+  fi
 fi

Modified: php/php-src/trunk/ext/session/session.c
===
--- php/php-src/trunk/ext/session/session.c 2010-03-31 17:35:28 UTC (rev 
297231)
+++ php/php-src/trunk/ext/session/session.c 2010-03-31 18:03:17 UTC (rev 
297232)
@@ -781,8 +781,16 @@
STD_PHP_INI_BOOLEAN("session.use_cookies",  "1", 
PHP_INI_ALL, OnUpdateBool,   use_cookies,php_ps_globals,ps_globals)
STD_PHP_INI_BOOLEAN("session.use_only_cookies", "1", 
PHP_INI_ALL, OnUpdateBool,   use_only_cookies,   php_ps_globals,ps_globals)
STD_PHP_INI_ENTRY("session.referer_check",  "",  
PHP_INI_ALL, OnUpdateString, extern_referer_chk, php_ps_globals,ps_globals)
+#if HAVE_DEV_URANDOM
+   STD_PHP_INI_ENTRY("session.entropy_file",   "/dev/urandom", 
 PHP_INI_ALL, OnUpdateString, entropy_file,   php_ps_globals,ps_globals)
+   STD_PHP_INI_ENTRY("session.entropy_length", "32", 
PHP_INI_ALL, OnUpdateLong,   entropy_length, php_ps_globals,ps_globals)
+#elif HAVE_DEV_ARANDOM
+   STD_PHP_INI_ENTRY("session.entropy_file",   "/dev/arandom", 
 PHP_INI_ALL, OnUpdateString, entropy_file,   php_ps_globals,ps_globals)
+   STD_PHP_INI_ENTRY("session.entropy_length", "32", 
PHP_INI_ALL, OnUpdateLong,   entropy_length, php_ps_globals,ps_globals)
+#else
STD_PHP_INI_ENTRY("session.entropy_file",   "",  
PHP_INI_ALL, OnUpdateString, entropy_file,   php_ps_globals,ps_globals)
STD_PHP_INI_ENTRY("session.entropy_length", "0", 
PHP_INI_ALL, OnUpdateLong,   entropy_length, php_ps_globals,ps_globals)
+#endif
STD_PHP_INI_ENTRY("session.cache_limiter",  "nocache",   
PHP_INI_ALL, OnUpdateString, cache_limiter,  php_ps_globals,ps_globals)
STD_PHP_INI_ENTRY("session.cache_expire",   "180",   
PHP_INI_ALL, OnUpdateLong,   cache_expire,   php_ps_globals,ps_globals)
PHP_INI_ENTRY("session.use_trans_sid",  "0", 
PHP_INI_ALL, OnUpdateTransSid)

Modified: php/php-src/trunk/php.ini-development
=