[PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING
nikicSun, 04 Mar 2012 16:32:01 + Revision: http://svn.php.net/viewvc?view=revisionrevision=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
pajoye Sun, 04 Mar 2012 17:02:55 + Revision: http://svn.php.net/viewvc?view=revisionrevision=323886 Log: - notes about xp2003 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 Zend/tests/bug61011.phpt Zend/zend_vm_def.h Zend/zend_vm_execute.h
laruence Sat, 25 Feb 2012 13:56:59 + Revision: http://svn.php.net/viewvc?view=revisionrevision=323510 Log: Fixed bug #61011 (Crash when an exception is thrown by __autoload accessing a static property) Bug: https://bugs.php.net/61011 (Assigned) Crash when an exception is thrown by __autoload accessing a static property Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/Zend/tests/bug61011.phpt U php/php-src/trunk/Zend/zend_vm_def.h U php/php-src/trunk/Zend/zend_vm_execute.h Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2012-02-25 13:27:57 UTC (rev 323509) +++ php/php-src/trunk/NEWS 2012-02-25 13:56:59 UTC (rev 323510) @@ -9,6 +9,8 @@ . Fixed bug #61165 (Segfault - strip_tags()). (Laruence) . Fixed bug #61072 (Memory leak when restoring an exception handler). (Nikic, Laruence) + . Fixed bug #61011 (Crash when an exception is thrown by __autoload +accessing a static property). (Laruence) . Fixed bug #61000 (Exceeding max nesting level doesn't delete numerical vars). (Laruence) . Fixed bug #60978 (exit code incorrect). (Laruence) Modified: php/php-src/trunk/Zend/tests/bug61011.phpt === --- php/php-src/trunk/Zend/tests/bug61011.phpt 2012-02-25 13:27:57 UTC (rev 323509) +++ php/php-src/trunk/Zend/tests/bug61011.phpt 2012-02-25 13:56:59 UTC (rev 323510) @@ -1,16 +1,34 @@ --TEST-- Bug #61011 (Crash when an exception is thrown by __autoload accessing a static property) ---XFAIL-- -#61011 have not been fixed yet --FILE-- ?php -function __autoload($class) { -throw new Exception($class); +function __autoload($name) { + throw new Exception($name); } - try { -NoExistsClass::$property; + echo AAA::$a; //zend_fetch_var_address_helper } catch (Exception $e) { + try { + echo AAA::XXX; //ZEND_FETCH_CONSTANT + } catch (Exception $e) { + try { + echo AAA::foo(); //ZEND_INIT_STATIC_METHOD_CALL + } catch (Exception $e) { + try { +unset(AAA::$a); // ZEND_UNSET_VAR + } catch (Exception $e){ +try { + isset(::$a); // ZEND_ISSET_ISEMPTY_VAR +} catch (Exception $e) { + try { + $a = array(AAA, foo); + $a(); //ZEND_INIT_FCALL_BY_NAME + } catch (Exception $e) { + } +} + } + } + } } echo 'okey'; --EXPECT-- Modified: php/php-src/trunk/Zend/zend_vm_def.h === --- php/php-src/trunk/Zend/zend_vm_def.h 2012-02-25 13:27:57 UTC (rev 323509) +++ php/php-src/trunk/Zend/zend_vm_def.h 2012-02-25 13:56:59 UTC (rev 323510) @@ -1039,6 +1039,14 @@ ce = CACHED_PTR(opline-op2.literal-cache_slot); } else { ce = zend_fetch_class_by_name(Z_STRVAL_P(opline-op2.zv), Z_STRLEN_P(opline-op2.zv), opline-op2.literal + 1, 0 TSRMLS_CC); +if (UNEXPECTED(ce == NULL)) { + if (OP1_TYPE != IS_CONST varname == tmp_varname) { + zval_dtor(tmp_varname); + } + FREE_OP1(); + CHECK_EXCEPTION(); + ZEND_VM_NEXT_OPCODE(); +} CACHE_PTR(opline-op2.literal-cache_slot, ce); } } else { @@ -2234,7 +2242,8 @@ } else { ce = zend_fetch_class_by_name(Z_STRVAL_P(opline-op1.zv), Z_STRLEN_P(opline-op1.zv), opline-op1.literal + 1, opline-extended_value TSRMLS_CC); if (UNEXPECTED(ce == NULL)) { -zend_error_noreturn(E_ERROR, Class '%s' not found, Z_STRVAL_P(opline-op1.zv)); +CHECK_EXCEPTION(); +ZEND_VM_NEXT_OPCODE(); } CACHE_PTR(opline-op1.literal-cache_slot, ce); } @@ -2414,7 +2423,8 @@ if (Z_TYPE_PP(obj) == IS_STRING) { ce = zend_fetch_class_by_name(Z_STRVAL_PP(obj), Z_STRLEN_PP(obj), NULL, 0 TSRMLS_CC); if (UNEXPECTED(ce == NULL)) { - zend_error_noreturn(E_ERROR, Class '%s' not found, Z_STRVAL_PP(obj)); + CHECK_EXCEPTION(); + ZEND_VM_NEXT_OPCODE(); } EX(called_scope) = ce; EX(object) = NULL; @@ -2964,6 +2974,7 @@ catch_ce = CACHED_PTR(opline-op1.literal-cache_slot); } else { catch_ce = zend_fetch_class_by_name(Z_STRVAL_P(opline-op1.zv), Z_STRLEN_P(opline-op1.zv), opline-op1.literal + 1, ZEND_FETCH_CLASS_NO_AUTOLOAD TSRMLS_CC); + CACHE_PTR(opline-op1.literal-cache_slot, catch_ce); } ce = Z_OBJCE_P(EG(exception)); @@ -3492,7 +3503,8 @@ } else { ce = zend_fetch_class_by_name(Z_STRVAL_P(opline-op1.zv), Z_STRLEN_P(opline-op1.zv), opline-op1.literal + 1, opline-extended_value TSRMLS_CC); if (UNEXPECTED(ce == NULL)) { - zend_error_noreturn(E_ERROR, Undefined class constant '%s', Z_STRVAL_P(opline-op2.zv)); + CHECK_EXCEPTION(); + ZEND_VM_NEXT_OPCODE(); } CACHE_PTR(opline-op1.literal-cache_slot, ce); } @@ -3879,6 +3891,16 @@ ce = CACHED_PTR(opline-op2.literal-cache_slot); } else { ce = zend_fetch_class_by_name(Z_STRVAL_P(opline-op2.zv), Z_STRLEN_P(opline-op2.zv), opline-op2.literal + 1, 0 TSRMLS_CC); +if
[PHP-CVS] svn: /php/php-src/trunk/ NEWS Zend/tests/bug60825.phpt Zend/zend_vm_def.h Zend/zend_vm_execute.h
laruence Sat, 21 Jan 2012 17:13:53 + Revision: http://svn.php.net/viewvc?view=revisionrevision=322541 Log: Fixed bug #60825 (Segfault when running symfony 2 tests) Bug: https://bugs.php.net/60825 (Critical) Segfault when running symfony 2 tests Changed paths: U php/php-src/trunk/NEWS A php/php-src/trunk/Zend/tests/bug60825.phpt U php/php-src/trunk/Zend/zend_vm_def.h U php/php-src/trunk/Zend/zend_vm_execute.h Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2012-01-21 12:05:47 UTC (rev 322540) +++ php/php-src/trunk/NEWS 2012-01-21 17:13:53 UTC (rev 322541) @@ -8,6 +8,7 @@ - Core: . Fixed bug #60573 (type hinting with self keyword causes weird errors). (Laruence) + . Fixed bug #60825 (Segfault when running symfony 2 tests). (Laruence) - cURL: . Added support for CURLOPT_FTP_RESPONSE_TIMEOUT, CURLOPT_APPEND, Added: php/php-src/trunk/Zend/tests/bug60825.phpt === --- php/php-src/trunk/Zend/tests/bug60825.phpt (rev 0) +++ php/php-src/trunk/Zend/tests/bug60825.phpt 2012-01-21 17:13:53 UTC (rev 322541) @@ -0,0 +1,18 @@ +--TEST-- +Bug #60825 (Segfault when running symfony 2 tests) +--DESCRIPTION-- +run this with valgrind +--FILE-- +?php +if (isset($loaded)) { +$loaded = true; + class test { + public function __toString() { + return __FILE__; + } + } + $a = new test; + require_once $a; +} +? +--EXPECT-- Modified: php/php-src/trunk/Zend/zend_vm_def.h === --- php/php-src/trunk/Zend/zend_vm_def.h2012-01-21 12:05:47 UTC (rev 322540) +++ php/php-src/trunk/Zend/zend_vm_def.h2012-01-21 17:13:53 UTC (rev 322541) @@ -3700,7 +3700,7 @@ inc_filename = GET_OP1_ZVAL_PTR(BP_VAR_R); if (inc_filename-type!=IS_STRING) { - ZVAL_COPY_VALUE(tmp_inc_filename, inc_filename); + INIT_PZVAL_COPY(tmp_inc_filename, inc_filename); zval_copy_ctor(tmp_inc_filename); convert_to_string(tmp_inc_filename); inc_filename = tmp_inc_filename; Modified: php/php-src/trunk/Zend/zend_vm_execute.h === --- php/php-src/trunk/Zend/zend_vm_execute.h2012-01-21 12:05:47 UTC (rev 322540) +++ php/php-src/trunk/Zend/zend_vm_execute.h2012-01-21 17:13:53 UTC (rev 322541) @@ -2529,7 +2529,7 @@ inc_filename = opline-op1.zv; if (inc_filename-type!=IS_STRING) { - ZVAL_COPY_VALUE(tmp_inc_filename, inc_filename); + INIT_PZVAL_COPY(tmp_inc_filename, inc_filename); zval_copy_ctor(tmp_inc_filename); convert_to_string(tmp_inc_filename); inc_filename = tmp_inc_filename; @@ -6859,7 +6859,7 @@ inc_filename = _get_zval_ptr_tmp(opline-op1.var, EX_Ts(), free_op1 TSRMLS_CC); if (inc_filename-type!=IS_STRING) { - ZVAL_COPY_VALUE(tmp_inc_filename, inc_filename); + INIT_PZVAL_COPY(tmp_inc_filename, inc_filename); zval_copy_ctor(tmp_inc_filename); convert_to_string(tmp_inc_filename); inc_filename = tmp_inc_filename; @@ -11216,7 +11216,7 @@ inc_filename = _get_zval_ptr_var(opline-op1.var, EX_Ts(), free_op1 TSRMLS_CC); if (inc_filename-type!=IS_STRING) { - ZVAL_COPY_VALUE(tmp_inc_filename, inc_filename); + INIT_PZVAL_COPY(tmp_inc_filename, inc_filename); zval_copy_ctor(tmp_inc_filename); convert_to_string(tmp_inc_filename); inc_filename = tmp_inc_filename; @@ -27068,7 +27068,7 @@ inc_filename = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline-op1.var TSRMLS_CC); if (inc_filename-type!=IS_STRING) { - ZVAL_COPY_VALUE(tmp_inc_filename, inc_filename); + INIT_PZVAL_COPY(tmp_inc_filename, inc_filename); zval_copy_ctor(tmp_inc_filename); convert_to_string(tmp_inc_filename); inc_filename = tmp_inc_filename; -- 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 ext/reflection/php_reflection.c ext/reflection/tests/ReflectionClass_setFinal.phpt ext/reflection/tests/ReflectionClass_toString_001.phpt ext/reflection/tests/R
sebastianTue, 17 Jan 2012 12:59:33 + Revision: http://svn.php.net/viewvc?view=revisionrevision=322390 Log: Implement ReflectionClass::setFinal() and ReflectionMethod::setFinal(). Patch by Jan Dolecek juzna...@gmail.com. Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/ext/reflection/php_reflection.c A php/php-src/trunk/ext/reflection/tests/ReflectionClass_setFinal.phpt U php/php-src/trunk/ext/reflection/tests/ReflectionClass_toString_001.phpt A php/php-src/trunk/ext/reflection/tests/ReflectionMethod_setFinal.phpt Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2012-01-17 10:35:39 UTC (rev 322389) +++ php/php-src/trunk/NEWS 2012-01-17 12:59:33 UTC (rev 322390) @@ -35,4 +35,9 @@ - pgsql . Added pg_escape_literal() and pg_escape_identifier() (Yasuo) +- Reflection: + . Added ReflectionCLass::setFinal() and ReflectionMethod::setFinal() to allow +stubbing and mocking of final classes and methods, for instance. +(Sebastian, Jan Dolecek juzna...@gmail.com) + NOTE: Insert NEWS from last stable release here prior to actual release! Modified: php/php-src/trunk/ext/reflection/php_reflection.c === --- php/php-src/trunk/ext/reflection/php_reflection.c 2012-01-17 10:35:39 UTC (rev 322389) +++ php/php-src/trunk/ext/reflection/php_reflection.c 2012-01-17 12:59:33 UTC (rev 322390) @@ -3113,6 +3113,28 @@ } /* }}} */ +/* {{{ proto public void ReflectionMethod::setFinal([bool isFinal = true]) + Sets/unsets class as final */ +ZEND_METHOD(reflection_method, setFinal) +{ + reflection_object *intern; + zend_function *mptr; + zend_bool isFinal = 1; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |b, isFinal) == FAILURE) { + return; + } + + GET_REFLECTION_OBJECT_PTR(mptr); + + if (isFinal) { + mptr-common.fn_flags |= ZEND_ACC_FINAL; + } else { + mptr-common.fn_flags = ~ZEND_ACC_FINAL; + } +} +/* }}} */ + /* {{{ proto public ReflectionClass ReflectionMethod::getDeclaringClass() Get the declaring class */ ZEND_METHOD(reflection_method, getDeclaringClass) @@ -4047,6 +4069,28 @@ } /* }}} */ +/* {{{ proto public void ReflectionClass::setFinal([bool isFinal = true]) + Sets/unsets class as final */ +ZEND_METHOD(reflection_class, setFinal) +{ + reflection_object *intern; + zend_class_entry *ce; + zend_bool isFinal = 1; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |b, isFinal) == FAILURE) { + return; + } + + GET_REFLECTION_OBJECT_PTR(ce); + + if (isFinal) { + ce-ce_flags |= ZEND_ACC_FINAL_CLASS; + } else { + ce-ce_flags = ~ZEND_ACC_FINAL_CLASS; + } +} +/* }}} */ + /* {{{ proto public int ReflectionClass::getModifiers() Returns a bitfield of the access modifiers for this class */ ZEND_METHOD(reflection_class, getModifiers) @@ -5651,6 +5695,10 @@ ZEND_ARG_INFO(0, value) ZEND_END_ARG_INFO() +ZEND_BEGIN_ARG_INFO(arginfo_reflection_method_setFinal, 0) + ZEND_ARG_INFO(0, value) +ZEND_END_ARG_INFO() + ZEND_BEGIN_ARG_INFO(arginfo_reflection_method_getClosure, 0) ZEND_ARG_INFO(0, object) ZEND_END_ARG_INFO() @@ -5664,6 +5712,7 @@ ZEND_ME(reflection_method, isProtected, arginfo_reflection__void, 0) ZEND_ME(reflection_method, isAbstract, arginfo_reflection__void, 0) ZEND_ME(reflection_method, isFinal, arginfo_reflection__void, 0) + ZEND_ME(reflection_method, setFinal, arginfo_reflection_method_setFinal, 0) ZEND_ME(reflection_method, isStatic, arginfo_reflection__void, 0) ZEND_ME(reflection_method, isConstructor, arginfo_reflection__void, 0) ZEND_ME(reflection_method, isDestructor, arginfo_reflection__void, 0) @@ -5733,6 +5782,10 @@ ZEND_ARG_INFO(0, object) ZEND_END_ARG_INFO() +ZEND_BEGIN_ARG_INFO(arginfo_reflection_class_setFinal, 0) + ZEND_ARG_INFO(0, value) +ZEND_END_ARG_INFO() + ZEND_BEGIN_ARG_INFO(arginfo_reflection_class_newInstance, 0) ZEND_ARG_INFO(0, args) ZEND_END_ARG_INFO() @@ -5785,6 +5838,7 @@ ZEND_ME(reflection_class, isTrait, arginfo_reflection__void, 0) ZEND_ME(reflection_class, isAbstract, arginfo_reflection__void, 0) ZEND_ME(reflection_class, isFinal, arginfo_reflection__void, 0) + ZEND_ME(reflection_class, setFinal, arginfo_reflection_class_setFinal, 0) ZEND_ME(reflection_class, getModifiers, arginfo_reflection__void, 0) ZEND_ME(reflection_class, isInstance, arginfo_reflection_class_isInstance, 0) ZEND_ME(reflection_class, newInstance, arginfo_reflection_class_newInstance, 0) Added: php/php-src/trunk/ext/reflection/tests/ReflectionClass_setFinal.phpt
[PHP-CVS] svn: /php/php-src/trunk/ NEWS ext/reflection/php_reflection.c ext/reflection/tests/ReflectionClass_setFinal.phpt ext/reflection/tests/ReflectionClass_toString_001.phpt ext/reflection/tests/R
sebastianTue, 17 Jan 2012 13:46:31 + Revision: http://svn.php.net/viewvc?view=revisionrevision=322398 Log: Revert r322390. Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/ext/reflection/php_reflection.c D php/php-src/trunk/ext/reflection/tests/ReflectionClass_setFinal.phpt U php/php-src/trunk/ext/reflection/tests/ReflectionClass_toString_001.phpt D php/php-src/trunk/ext/reflection/tests/ReflectionMethod_setFinal.phpt Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2012-01-17 13:38:26 UTC (rev 322397) +++ php/php-src/trunk/NEWS 2012-01-17 13:46:31 UTC (rev 322398) @@ -35,9 +35,4 @@ - pgsql . Added pg_escape_literal() and pg_escape_identifier() (Yasuo) -- Reflection: - . Added ReflectionCLass::setFinal() and ReflectionMethod::setFinal() to allow -stubbing and mocking of final classes and methods, for instance. -(Sebastian, Jan Dolecek juzna...@gmail.com) - NOTE: Insert NEWS from last stable release here prior to actual release! Modified: php/php-src/trunk/ext/reflection/php_reflection.c === --- php/php-src/trunk/ext/reflection/php_reflection.c 2012-01-17 13:38:26 UTC (rev 322397) +++ php/php-src/trunk/ext/reflection/php_reflection.c 2012-01-17 13:46:31 UTC (rev 322398) @@ -3113,28 +3113,6 @@ } /* }}} */ -/* {{{ proto public void ReflectionMethod::setFinal([bool isFinal = true]) - Sets/unsets class as final */ -ZEND_METHOD(reflection_method, setFinal) -{ - reflection_object *intern; - zend_function *mptr; - zend_bool isFinal = 1; - - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |b, isFinal) == FAILURE) { - return; - } - - GET_REFLECTION_OBJECT_PTR(mptr); - - if (isFinal) { - mptr-common.fn_flags |= ZEND_ACC_FINAL; - } else { - mptr-common.fn_flags = ~ZEND_ACC_FINAL; - } -} -/* }}} */ - /* {{{ proto public ReflectionClass ReflectionMethod::getDeclaringClass() Get the declaring class */ ZEND_METHOD(reflection_method, getDeclaringClass) @@ -4069,28 +4047,6 @@ } /* }}} */ -/* {{{ proto public void ReflectionClass::setFinal([bool isFinal = true]) - Sets/unsets class as final */ -ZEND_METHOD(reflection_class, setFinal) -{ - reflection_object *intern; - zend_class_entry *ce; - zend_bool isFinal = 1; - - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |b, isFinal) == FAILURE) { - return; - } - - GET_REFLECTION_OBJECT_PTR(ce); - - if (isFinal) { - ce-ce_flags |= ZEND_ACC_FINAL_CLASS; - } else { - ce-ce_flags = ~ZEND_ACC_FINAL_CLASS; - } -} -/* }}} */ - /* {{{ proto public int ReflectionClass::getModifiers() Returns a bitfield of the access modifiers for this class */ ZEND_METHOD(reflection_class, getModifiers) @@ -5695,10 +5651,6 @@ ZEND_ARG_INFO(0, value) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO(arginfo_reflection_method_setFinal, 0) - ZEND_ARG_INFO(0, value) -ZEND_END_ARG_INFO() - ZEND_BEGIN_ARG_INFO(arginfo_reflection_method_getClosure, 0) ZEND_ARG_INFO(0, object) ZEND_END_ARG_INFO() @@ -5712,7 +5664,6 @@ ZEND_ME(reflection_method, isProtected, arginfo_reflection__void, 0) ZEND_ME(reflection_method, isAbstract, arginfo_reflection__void, 0) ZEND_ME(reflection_method, isFinal, arginfo_reflection__void, 0) - ZEND_ME(reflection_method, setFinal, arginfo_reflection_method_setFinal, 0) ZEND_ME(reflection_method, isStatic, arginfo_reflection__void, 0) ZEND_ME(reflection_method, isConstructor, arginfo_reflection__void, 0) ZEND_ME(reflection_method, isDestructor, arginfo_reflection__void, 0) @@ -5782,10 +5733,6 @@ ZEND_ARG_INFO(0, object) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO(arginfo_reflection_class_setFinal, 0) - ZEND_ARG_INFO(0, value) -ZEND_END_ARG_INFO() - ZEND_BEGIN_ARG_INFO(arginfo_reflection_class_newInstance, 0) ZEND_ARG_INFO(0, args) ZEND_END_ARG_INFO() @@ -5838,7 +5785,6 @@ ZEND_ME(reflection_class, isTrait, arginfo_reflection__void, 0) ZEND_ME(reflection_class, isAbstract, arginfo_reflection__void, 0) ZEND_ME(reflection_class, isFinal, arginfo_reflection__void, 0) - ZEND_ME(reflection_class, setFinal, arginfo_reflection_class_setFinal, 0) ZEND_ME(reflection_class, getModifiers, arginfo_reflection__void, 0) ZEND_ME(reflection_class, isInstance, arginfo_reflection_class_isInstance, 0) ZEND_ME(reflection_class, newInstance, arginfo_reflection_class_newInstance, 0) Deleted: php/php-src/trunk/ext/reflection/tests/ReflectionClass_setFinal.phpt === ---
[PHP-CVS] svn: /php/php-src/trunk/ NEWS ext/hash/hash_tiger.c ext/hash/tests/tiger.phpt
mike Tue, 17 Jan 2012 15:25:54 + Revision: http://svn.php.net/viewvc?view=revisionrevision=322419 Log: adapted tiger hash byte print order to those of md5 and sha1 see http://en.wikipedia.org/wiki/Tiger_(cryptography) http://www.cs.technion.ac.il/~biham/Reports/Tiger/test-vectors-nessie-format.dat Closes Bug #60221 Tiger hash output byte order Bug: https://bugs.php.net/60221 (error getting bug information) Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/ext/hash/hash_tiger.c U php/php-src/trunk/ext/hash/tests/tiger.phpt Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2012-01-17 14:48:41 UTC (rev 322418) +++ php/php-src/trunk/NEWS 2012-01-17 15:25:54 UTC (rev 322419) @@ -32,6 +32,9 @@ still exists for backward compatibility but is doing nothing). (Pierrick) . Fixed bug #54995 (Missing CURLINFO_RESPONSE_CODE support). (Pierrick) +- hash + . Fixed bug #60221 (Tiger hash output byte order) (Mike) + - pgsql . Added pg_escape_literal() and pg_escape_identifier() (Yasuo) Modified: php/php-src/trunk/ext/hash/hash_tiger.c === --- php/php-src/trunk/ext/hash/hash_tiger.c 2012-01-17 14:48:41 UTC (rev 322418) +++ php/php-src/trunk/ext/hash/hash_tiger.c 2012-01-17 15:25:54 UTC (rev 322419) @@ -169,6 +169,15 @@ tiger_compress(context-passes, ((php_hash_uint64 *) context-buffer), context-state); } +static inline void TigerDigest(unsigned char *digest_str, unsigned int digest_len, PHP_TIGER_CTX *context) +{ + unsigned int i; + + for (i = 0; i digest_len; ++i) { + digest_str[i] = (unsigned char) ((context-state[i/8] (8 * (i%8))) 0xff); + } +} + PHP_HASH_API void PHP_3TIGERInit(PHP_TIGER_CTX *context) { memset(context, 0, sizeof(*context)); @@ -216,84 +225,21 @@ PHP_HASH_API void PHP_TIGER128Final(unsigned char digest[16], PHP_TIGER_CTX *context) { TigerFinalize(context); - - digest[0] = (unsigned char) ((context-state[0] 56) 0xff); - digest[1] = (unsigned char) ((context-state[0] 48) 0xff); - digest[2] = (unsigned char) ((context-state[0] 40) 0xff); - digest[3] = (unsigned char) ((context-state[0] 32) 0xff); - digest[4] = (unsigned char) ((context-state[0] 24) 0xff); - digest[5] = (unsigned char) ((context-state[0] 16) 0xff); - digest[6] = (unsigned char) ((context-state[0] 8) 0xff); - digest[7] = (unsigned char) (context-state[0] 0xff); - digest[8] = (unsigned char) ((context-state[1] 56) 0xff); - digest[9] = (unsigned char) ((context-state[1] 48) 0xff); - digest[10] = (unsigned char) ((context-state[1] 40) 0xff); - digest[11] = (unsigned char) ((context-state[1] 32) 0xff); - digest[12] = (unsigned char) ((context-state[1] 24) 0xff); - digest[13] = (unsigned char) ((context-state[1] 16) 0xff); - digest[14] = (unsigned char) ((context-state[1] 8) 0xff); - digest[15] = (unsigned char) (context-state[1] 0xff); - + TigerDigest(digest, 16, context); memset(context, 0, sizeof(*context)); } PHP_HASH_API void PHP_TIGER160Final(unsigned char digest[20], PHP_TIGER_CTX *context) { TigerFinalize(context); - - digest[0] = (unsigned char) ((context-state[0] 56) 0xff); - digest[1] = (unsigned char) ((context-state[0] 48) 0xff); - digest[2] = (unsigned char) ((context-state[0] 40) 0xff); - digest[3] = (unsigned char) ((context-state[0] 32) 0xff); - digest[4] = (unsigned char) ((context-state[0] 24) 0xff); - digest[5] = (unsigned char) ((context-state[0] 16) 0xff); - digest[6] = (unsigned char) ((context-state[0] 8) 0xff); - digest[7] = (unsigned char) (context-state[0] 0xff); - digest[8] = (unsigned char) ((context-state[1] 56) 0xff); - digest[9] = (unsigned char) ((context-state[1] 48) 0xff); - digest[10] = (unsigned char) ((context-state[1] 40) 0xff); - digest[11] = (unsigned char) ((context-state[1] 32) 0xff); - digest[12] = (unsigned char) ((context-state[1] 24) 0xff); - digest[13] = (unsigned char) ((context-state[1] 16) 0xff); - digest[14] = (unsigned char) ((context-state[1] 8) 0xff); - digest[15] = (unsigned char) (context-state[1] 0xff); - digest[16] = (unsigned char) ((context-state[2] 56) 0xff); - digest[17] = (unsigned char) ((context-state[2] 48) 0xff); - digest[18] = (unsigned char) ((context-state[2] 40) 0xff); - digest[19] = (unsigned char) ((context-state[2] 32) 0xff); - + TigerDigest(digest, 20, context); memset(context, 0, sizeof(*context)); } PHP_HASH_API void PHP_TIGER192Final(unsigned char digest[24], PHP_TIGER_CTX *context) { TigerFinalize(context);
[PHP-CVS] svn: /php/php-src/trunk/ NEWS ext/hash/config.m4 ext/hash/config.w32 ext/hash/hash.c ext/hash/hash_salsa.c ext/hash/php_hash.h ext/hash/php_hash_salsa.h ext/hash/tests/hash_algos.phpt ext/ha
mike Tue, 17 Jan 2012 16:35:32 + Revision: http://svn.php.net/viewvc?view=revisionrevision=322421 Log: remove Salsa10/Salsa20, which are actually stream ciphers not hash functions Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/ext/hash/config.m4 U php/php-src/trunk/ext/hash/config.w32 U php/php-src/trunk/ext/hash/hash.c D php/php-src/trunk/ext/hash/hash_salsa.c U php/php-src/trunk/ext/hash/php_hash.h D php/php-src/trunk/ext/hash/php_hash_salsa.h U php/php-src/trunk/ext/hash/tests/hash_algos.phpt U php/php-src/trunk/ext/hash/tests/hash_copy_001.phpt Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2012-01-17 15:59:44 UTC (rev 322420) +++ php/php-src/trunk/NEWS 2012-01-17 16:35:32 UTC (rev 322421) @@ -34,6 +34,7 @@ - hash . Fixed bug #60221 (Tiger hash output byte order) (Mike) + . Removed Salsa10/Salsa20, which are actually stream ciphers (Mike) - pgsql . Added pg_escape_literal() and pg_escape_identifier() (Yasuo) Modified: php/php-src/trunk/ext/hash/config.m4 === --- php/php-src/trunk/ext/hash/config.m4 2012-01-17 15:59:44 UTC (rev 322420) +++ php/php-src/trunk/ext/hash/config.m4 2012-01-17 16:35:32 UTC (rev 322421) @@ -27,10 +27,10 @@ EXT_HASH_SOURCES=hash.c hash_md.c hash_sha.c hash_ripemd.c hash_haval.c \ hash_tiger.c hash_gost.c hash_snefru.c hash_whirlpool.c hash_adler32.c \ -hash_crc32.c hash_salsa.c hash_fnv.c hash_joaat.c +hash_crc32.c hash_fnv.c hash_joaat.c EXT_HASH_HEADERS=php_hash.h php_hash_md.h php_hash_sha.h php_hash_ripemd.h \ php_hash_haval.h php_hash_tiger.h php_hash_gost.h php_hash_snefru.h \ -php_hash_whirlpool.h php_hash_adler32.h php_hash_crc32.h php_hash_salsa.h \ +php_hash_whirlpool.h php_hash_adler32.h php_hash_crc32.h \ php_hash_fnv.h php_hash_joaat.h php_hash_types.h PHP_NEW_EXTENSION(hash, $EXT_HASH_SOURCES, $ext_shared) Modified: php/php-src/trunk/ext/hash/config.w32 === --- php/php-src/trunk/ext/hash/config.w32 2012-01-17 15:59:44 UTC (rev 322420) +++ php/php-src/trunk/ext/hash/config.w32 2012-01-17 16:35:32 UTC (rev 322421) @@ -15,11 +15,11 @@ AC_DEFINE('HAVE_HASH_EXT', 1); EXTENSION(hash, hash.c hash_md.c hash_sha.c hash_ripemd.c hash_haval.c + hash_tiger.c hash_gost.c hash_snefru.c hash_whirlpool.c - + hash_adler32.c hash_crc32.c hash_salsa.c hash_joaat.c hash_fnv.c); + + hash_adler32.c hash_crc32.c hash_joaat.c hash_fnv.c); PHP_INSTALL_HEADERS(ext/hash/, php_hash.h php_hash_md.h php_hash_sha.h php_hash_ripemd.h + php_hash_haval.h php_hash_tiger.h php_hash_gost.h php_hash_snefru.h + - php_hash_whirlpool.h php_hash_adler32.h php_hash_crc32.h php_hash_salsa.h + + php_hash_whirlpool.h php_hash_adler32.h php_hash_crc32.h + php_hash_types.h); } Modified: php/php-src/trunk/ext/hash/hash.c === --- php/php-src/trunk/ext/hash/hash.c 2012-01-17 15:59:44 UTC (rev 322420) +++ php/php-src/trunk/ext/hash/hash.c 2012-01-17 16:35:32 UTC (rev 322421) @@ -851,8 +851,6 @@ php_hash_register_algo(adler32, php_hash_adler32_ops); php_hash_register_algo(crc32, php_hash_crc32_ops); php_hash_register_algo(crc32b, php_hash_crc32b_ops); - php_hash_register_algo(salsa10, php_hash_salsa10_ops); - php_hash_register_algo(salsa20, php_hash_salsa20_ops); php_hash_register_algo(fnv132, php_hash_fnv132_ops); php_hash_register_algo(fnv164, php_hash_fnv164_ops); php_hash_register_algo(joaat, php_hash_joaat_ops); Deleted: php/php-src/trunk/ext/hash/hash_salsa.c === --- php/php-src/trunk/ext/hash/hash_salsa.c 2012-01-17 15:59:44 UTC (rev 322420) +++ php/php-src/trunk/ext/hash/hash_salsa.c 2012-01-17 16:35:32 UTC (rev 322421) @@ -1,224 +0,0 @@ -/* - +--+ - | PHP Version 5| - +--+ - | Copyright (c) 1997-2012 The PHP Group| - +--+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is| - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | lice...@php.net so we can mail you a copy immediately. | -
[PHP-CVS] svn: /php/php-src/trunk/ NEWS Zend/tests/bug60573.phpt Zend/zend_compile.c
laruence Mon, 16 Jan 2012 09:53:45 + Revision: http://svn.php.net/viewvc?view=revisionrevision=322360 Log: Fixed Bug #60573 (type hinting with self keyword causes weird errors) Bug: https://bugs.php.net/60573 (error getting bug information) Changed paths: U php/php-src/trunk/NEWS A php/php-src/trunk/Zend/tests/bug60573.phpt U php/php-src/trunk/Zend/zend_compile.c Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2012-01-16 09:33:06 UTC (rev 322359) +++ php/php-src/trunk/NEWS 2012-01-16 09:53:45 UTC (rev 322360) @@ -5,6 +5,10 @@ - General improvements: . World domination +- Core + . Fixed bug #60573 (type hinting with self keyword causes weird errors). +(Laruence) + - cURL: . Added support for CURLOPT_FTP_RESPONSE_TIMEOUT, CURLOPT_APPEND, CURLOPT_DIRLISTONLY, CURLOPT_NEW_DIRECTORY_PERMS, CURLOPT_NEW_FILE_PERMS, Added: php/php-src/trunk/Zend/tests/bug60573.phpt === --- php/php-src/trunk/Zend/tests/bug60573.phpt (rev 0) +++ php/php-src/trunk/Zend/tests/bug60573.phpt 2012-01-16 09:53:45 UTC (rev 322360) @@ -0,0 +1,84 @@ +--TEST-- +Bug #60573 (type hinting with self keyword causes weird errors) +--FILE-- +?php +class Foo1 { + +public function setSelf(self $s) { } + +} + +class Bar1 extends Foo1 { + +public function setSelf(parent $s) { } + +} + +class Foo2 { + +public function setSelf(Foo2 $s) { } + +} + +class Bar2 extends Foo2 { + +public function setSelf(parent $s) { } + +} + +class Base { +} + +class Foo3 extends Base{ + +public function setSelf(parent $s) { } + +} + +class Bar3 extends Foo3 { + +public function setSelf(Base $s) { } + +} + +class Foo4 { + +public function setSelf(self $s) { } + +} + +class Bar4 extends Foo4 { + +public function setSelf(self $s) { } + +} + +class Foo5 extends Base { + +public function setSelf(parent $s) { } + +} + +class Bar5 extends Foo5 { + +public function setSelf(parent $s) { } + +} + +abstract class Foo6 extends Base { + +abstract public function setSelf(parent $s); + +} + +class Bar6 extends Foo6 { + +public function setSelf(Foo6 $s) { } + +} +--EXPECTF-- +Strict Standards: Declaration of Bar4::setSelf() should be compatible with Foo4::setSelf(Foo4 $s) in %sbug60573.php on line %d + +Strict Standards: Declaration of Bar5::setSelf() should be compatible with Foo5::setSelf(Base $s) in %sbug60573.php on line %d + +Fatal error: Declaration of Bar6::setSelf() must be compatible with Foo6::setSelf(Base $s) in %sbug60573.php on line %d Property changes on: php/php-src/trunk/Zend/tests/bug60573.phpt ___ Added: svn:executable + * Modified: php/php-src/trunk/Zend/zend_compile.c === --- php/php-src/trunk/Zend/zend_compile.c 2012-01-16 09:33:06 UTC (rev 322359) +++ php/php-src/trunk/Zend/zend_compile.c 2012-01-16 09:53:45 UTC (rev 322360) @@ -2958,30 +2958,57 @@ /* Only one has a type hint and the other one doesn't */ return 0; } - if (fe-common.arg_info[i].class_name -strcasecmp(fe-common.arg_info[i].class_name, proto-common.arg_info[i].class_name)!=0) { - const char *colon; - if (fe-common.type != ZEND_USER_FUNCTION) { - return 0; - } else if (strchr(proto-common.arg_info[i].class_name, '\\') != NULL || - (colon = zend_memrchr(fe-common.arg_info[i].class_name, '\\', fe-common.arg_info[i].class_name_len)) == NULL || - strcasecmp(colon+1, proto-common.arg_info[i].class_name) != 0) { - zend_class_entry **fe_ce, **proto_ce; - int found, found2; - - found = zend_lookup_class(fe-common.arg_info[i].class_name, fe-common.arg_info[i].class_name_len, fe_ce TSRMLS_CC); - found2 = zend_lookup_class(proto-common.arg_info[i].class_name, proto-common.arg_info[i].class_name_len, proto_ce TSRMLS_CC); - - /* Check for class alias */ - if (found != SUCCESS || found2 != SUCCESS || - (*fe_ce)-type == ZEND_INTERNAL_CLASS || - (*proto_ce)-type == ZEND_INTERNAL_CLASS || - *fe_ce != *proto_ce) { + if (fe-common.arg_info[i].class_name) { + const char *fe_class_name, *proto_class_name; + zend_uint fe_class_name_len, proto_class_name_len; + + if
[PHP-CVS] svn: /php/php-src/trunk/ NEWS
laruence Mon, 16 Jan 2012 10:20:18 + Revision: http://svn.php.net/viewvc?view=revisionrevision=322362 Log: typo Changed paths: U php/php-src/trunk/NEWS Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2012-01-16 10:12:47 UTC (rev 322361) +++ php/php-src/trunk/NEWS 2012-01-16 10:20:18 UTC (rev 322362) @@ -5,7 +5,7 @@ - General improvements: . World domination -- Core +- Core: . Fixed bug #60573 (type hinting with self keyword causes weird errors). (Laruence) -- 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 ext/curl/config.m4 ext/curl/config.w32 ext/curl/curl.dsp ext/curl/interface.c ext/curl/package.xml ext/curl/php_curl.h ext/curl/share.c
pierrick Thu, 24 Nov 2011 12:49:11 + Revision: http://svn.php.net/viewvc?view=revisionrevision=319751 Log: Revert commit r319729 until I have a clean version for non-ZTS Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/ext/curl/config.m4 U php/php-src/trunk/ext/curl/config.w32 U php/php-src/trunk/ext/curl/curl.dsp U php/php-src/trunk/ext/curl/interface.c U php/php-src/trunk/ext/curl/package.xml U php/php-src/trunk/ext/curl/php_curl.h D php/php-src/trunk/ext/curl/share.c Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2011-11-24 12:46:45 UTC (rev 319750) +++ php/php-src/trunk/NEWS 2011-11-24 12:49:11 UTC (rev 319751) @@ -6,8 +6,6 @@ . World domination - cURL: - . Implemented FR #55540, added functions curl_share_init(), -curl_share_setopt() and curl_share_close(). (Pierrick) . Added support for CURLOPT_FTP_RESPONSE_TIMEOUT, CURLOPT_APPEND, CURLOPT_DIRLISTONLY, CURLOPT_NEW_DIRECTORY_PERMS, CURLOPT_NEW_FILE_PERMS, CURLOPT_NETRC_FILE, CURLOPT_PREQUOTE, CURLOPT_KRBLEVEL, CURLOPT_MAXFILESIZE, @@ -27,7 +25,7 @@ CURLOPT_TRANSFER_ENCODING, CURLOPT_DNS_SERVERS and CURLOPT_USE_SSL. (Pierrick) . Fixed bug #55635 (CURLOPT_BINARYTRANSFER no longer used. The constant -still exists for backward compatibility but is doing nothing). (Pierrick) + still exists for backward compatibility but is doing nothing). (Pierrick) . Fixed bug #54995 (Missing CURLINFO_RESPONSE_CODE support). (Pierrick) NOTE: Insert NEWS from last stable release here prior to actual release! Modified: php/php-src/trunk/ext/curl/config.m4 === --- php/php-src/trunk/ext/curl/config.m4 2011-11-24 12:46:45 UTC (rev 319750) +++ php/php-src/trunk/ext/curl/config.m4 2011-11-24 12:49:11 UTC (rev 319751) @@ -156,6 +156,6 @@ AC_DEFINE(PHP_CURL_URL_WRAPPERS,1,[ ]) fi - PHP_NEW_EXTENSION(curl, interface.c multi.c share.c streams.c, $ext_shared) + PHP_NEW_EXTENSION(curl, interface.c multi.c streams.c, $ext_shared) PHP_SUBST(CURL_SHARED_LIBADD) fi Modified: php/php-src/trunk/ext/curl/config.w32 === --- php/php-src/trunk/ext/curl/config.w32 2011-11-24 12:46:45 UTC (rev 319750) +++ php/php-src/trunk/ext/curl/config.w32 2011-11-24 12:49:11 UTC (rev 319751) @@ -13,7 +13,7 @@ (((PHP_ZLIB==no) (CHECK_LIB(zlib_a.lib;zlib.lib, curl, PHP_CURL))) || (PHP_ZLIB_SHARED CHECK_LIB(zlib.lib, curl, PHP_CURL)) || (PHP_ZLIB == yes (!PHP_ZLIB_SHARED))) ) { - EXTENSION(curl, interface.c multi.c share.c streams.c, true); + EXTENSION(curl, interface.c multi.c streams.c, true); AC_DEFINE('HAVE_CURL', 1, 'Have cURL library'); AC_DEFINE('HAVE_CURL_SSL', 1, 'Have SSL suppurt in cURL'); AC_DEFINE('HAVE_CURL_EASY_STRERROR', 1, 'Have curl_easy_strerror in cURL'); Modified: php/php-src/trunk/ext/curl/curl.dsp === (Binary files differ) Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2011-11-24 12:46:45 UTC (rev 319750) +++ php/php-src/trunk/ext/curl/interface.c 2011-11-24 12:49:11 UTC (rev 319751) @@ -90,7 +90,6 @@ int le_curl; int le_curl_multi_handle; -int le_curl_share_handle; #ifdef PHP_CURL_NEED_OPENSSL_TSL /* {{{ */ static MUTEX_T *php_curl_openssl_tsl = NULL; @@ -349,19 +348,6 @@ ZEND_BEGIN_ARG_INFO(arginfo_curl_multi_close, 0) ZEND_ARG_INFO(0, mh) ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO(arginfo_curl_share_init, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO(arginfo_curl_share_close, 0) - ZEND_ARG_INFO(0, sh) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO(arginfo_curl_share_setopt, 0) - ZEND_ARG_INFO(0, sh) - ZEND_ARG_INFO(0, option) - ZEND_ARG_INFO(0, value) -ZEND_END_ARG_INFO() /* }}} */ /* {{{ curl_functions[] @@ -385,9 +371,6 @@ PHP_FE(curl_multi_getcontent,arginfo_curl_multi_getcontent) PHP_FE(curl_multi_info_read, arginfo_curl_multi_info_read) PHP_FE(curl_multi_close, arginfo_curl_multi_close) - PHP_FE(curl_share_init, arginfo_curl_share_init) - PHP_FE(curl_share_close, arginfo_curl_share_close) - PHP_FE(curl_share_setopt,arginfo_curl_share_setopt) PHP_FE_END }; /* }}} */ @@ -544,7 +527,6 @@ { le_curl = zend_register_list_destructors_ex(_php_curl_close, NULL, curl, module_number); le_curl_multi_handle = zend_register_list_destructors_ex(_php_curl_multi_close, NULL, curl_multi, module_number); - le_curl_share_handle = zend_register_list_destructors_ex(_php_curl_share_close, NULL, curl_share, module_number); REGISTER_INI_ENTRIES(); @@ -1007,14 +989,6 @@ REGISTER_CURL_CONSTANT(CURLFTPMETHOD_SINGLECWD); #endif - /* Constant for curl_share_setopt */ -
Re: [PHP-CVS] svn: /php/php-src/trunk/ NEWS ext/curl/config.m4 ext/curl/config.w32 ext/curl/curl.dsp ext/curl/interface.c ext/curl/package.xml ext/curl/php_curl.h ext/curl/share.c
Doh ! For once it's not the ZTS which broke :p I reverted the commit until I come up with a clean solution for both ZTS and non-ZTS Thanks On 24 November 2011 01:45, Antony Dovgal t...@daylessday.org wrote: On 11/24/2011 02:20 AM, Pierrick Charron wrote: pierrick Wed, 23 Nov 2011 22:20:28 + Revision: http://svn.php.net/viewvc?view=revisionrevision=319729 Log: Implemented FR #55540, added functions curl_share_init(), curl_share_setopt() and curl_share_close(). This patch breaks non-ZTS build of trunk: /local/qa/HEAD_non-ZTS/ext/curl/php_curl.h:157:2: error: expected specifier-qualifier-list before ‘MUTEX_T’ /local/qa/HEAD_non-ZTS/ext/curl/interface.c: In function ‘_php_curl_setopt’: /local/qa/HEAD_non-ZTS/ext/curl/interface.c:2449:8: warning: ‘return’ with no value, in function returning non-void make: *** [ext/curl/interface.lo] Error 1 -- Wbr, Antony Dovgal --- http://pinba.org - realtime profiling for PHP -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- 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
yohgaki Fri, 25 Nov 2011 02:24:37 + Revision: http://svn.php.net/viewvc?view=revisionrevision=319789 Log: add pgsql new functions Changed paths: U php/php-src/trunk/NEWS Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2011-11-25 02:21:01 UTC (rev 319788) +++ php/php-src/trunk/NEWS 2011-11-25 02:24:37 UTC (rev 319789) @@ -28,4 +28,7 @@ still exists for backward compatibility but is doing nothing). (Pierrick) . Fixed bug #54995 (Missing CURLINFO_RESPONSE_CODE support). (Pierrick) +- pgsql + . Added pg_escape_literal() and pg_escape_identifier() (Yasuo) + NOTE: Insert NEWS from last stable release here prior to actual release! -- 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 ext/curl/config.m4 ext/curl/config.w32 ext/curl/curl.dsp ext/curl/interface.c ext/curl/package.xml ext/curl/php_curl.h ext/curl/share.c
pierrick Wed, 23 Nov 2011 22:20:28 + Revision: http://svn.php.net/viewvc?view=revisionrevision=319729 Log: Implemented FR #55540, added functions curl_share_init(), curl_share_setopt() and curl_share_close(). Bug: https://bugs.php.net/55540 (Assigned) no curl_share? nice... Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/ext/curl/config.m4 U php/php-src/trunk/ext/curl/config.w32 U php/php-src/trunk/ext/curl/curl.dsp U php/php-src/trunk/ext/curl/interface.c U php/php-src/trunk/ext/curl/package.xml U php/php-src/trunk/ext/curl/php_curl.h A php/php-src/trunk/ext/curl/share.c Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2011-11-23 21:58:16 UTC (rev 319728) +++ php/php-src/trunk/NEWS 2011-11-23 22:20:28 UTC (rev 319729) @@ -6,6 +6,8 @@ . World domination - cURL: + . Implemented FR #55540, added functions curl_share_init(), +curl_share_setopt() and curl_share_close(). (Pierrick) . Added support for CURLOPT_FTP_RESPONSE_TIMEOUT, CURLOPT_APPEND, CURLOPT_DIRLISTONLY, CURLOPT_NEW_DIRECTORY_PERMS, CURLOPT_NEW_FILE_PERMS, CURLOPT_NETRC_FILE, CURLOPT_PREQUOTE, CURLOPT_KRBLEVEL, CURLOPT_MAXFILESIZE, @@ -25,7 +27,7 @@ CURLOPT_TRANSFER_ENCODING, CURLOPT_DNS_SERVERS and CURLOPT_USE_SSL. (Pierrick) . Fixed bug #55635 (CURLOPT_BINARYTRANSFER no longer used. The constant - still exists for backward compatibility but is doing nothing). (Pierrick) +still exists for backward compatibility but is doing nothing). (Pierrick) . Fixed bug #54995 (Missing CURLINFO_RESPONSE_CODE support). (Pierrick) NOTE: Insert NEWS from last stable release here prior to actual release! Modified: php/php-src/trunk/ext/curl/config.m4 === --- php/php-src/trunk/ext/curl/config.m4 2011-11-23 21:58:16 UTC (rev 319728) +++ php/php-src/trunk/ext/curl/config.m4 2011-11-23 22:20:28 UTC (rev 319729) @@ -156,6 +156,6 @@ AC_DEFINE(PHP_CURL_URL_WRAPPERS,1,[ ]) fi - PHP_NEW_EXTENSION(curl, interface.c multi.c streams.c, $ext_shared) + PHP_NEW_EXTENSION(curl, interface.c multi.c share.c streams.c, $ext_shared) PHP_SUBST(CURL_SHARED_LIBADD) fi Modified: php/php-src/trunk/ext/curl/config.w32 === --- php/php-src/trunk/ext/curl/config.w32 2011-11-23 21:58:16 UTC (rev 319728) +++ php/php-src/trunk/ext/curl/config.w32 2011-11-23 22:20:28 UTC (rev 319729) @@ -13,7 +13,7 @@ (((PHP_ZLIB==no) (CHECK_LIB(zlib_a.lib;zlib.lib, curl, PHP_CURL))) || (PHP_ZLIB_SHARED CHECK_LIB(zlib.lib, curl, PHP_CURL)) || (PHP_ZLIB == yes (!PHP_ZLIB_SHARED))) ) { - EXTENSION(curl, interface.c multi.c streams.c, true); + EXTENSION(curl, interface.c multi.c share.c streams.c, true); AC_DEFINE('HAVE_CURL', 1, 'Have cURL library'); AC_DEFINE('HAVE_CURL_SSL', 1, 'Have SSL suppurt in cURL'); AC_DEFINE('HAVE_CURL_EASY_STRERROR', 1, 'Have curl_easy_strerror in cURL'); Modified: php/php-src/trunk/ext/curl/curl.dsp === (Binary files differ) Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2011-11-23 21:58:16 UTC (rev 319728) +++ php/php-src/trunk/ext/curl/interface.c 2011-11-23 22:20:28 UTC (rev 319729) @@ -90,6 +90,7 @@ int le_curl; int le_curl_multi_handle; +int le_curl_share_handle; #ifdef PHP_CURL_NEED_OPENSSL_TSL /* {{{ */ static MUTEX_T *php_curl_openssl_tsl = NULL; @@ -348,6 +349,19 @@ ZEND_BEGIN_ARG_INFO(arginfo_curl_multi_close, 0) ZEND_ARG_INFO(0, mh) ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO(arginfo_curl_share_init, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO(arginfo_curl_share_close, 0) + ZEND_ARG_INFO(0, sh) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO(arginfo_curl_share_setopt, 0) + ZEND_ARG_INFO(0, sh) + ZEND_ARG_INFO(0, option) + ZEND_ARG_INFO(0, value) +ZEND_END_ARG_INFO() /* }}} */ /* {{{ curl_functions[] @@ -371,6 +385,9 @@ PHP_FE(curl_multi_getcontent,arginfo_curl_multi_getcontent) PHP_FE(curl_multi_info_read, arginfo_curl_multi_info_read) PHP_FE(curl_multi_close, arginfo_curl_multi_close) + PHP_FE(curl_share_init, arginfo_curl_share_init) + PHP_FE(curl_share_close, arginfo_curl_share_close) + PHP_FE(curl_share_setopt,arginfo_curl_share_setopt) PHP_FE_END }; /* }}} */ @@ -527,6 +544,7 @@ { le_curl = zend_register_list_destructors_ex(_php_curl_close, NULL, curl, module_number); le_curl_multi_handle = zend_register_list_destructors_ex(_php_curl_multi_close, NULL, curl_multi, module_number); + le_curl_share_handle = zend_register_list_destructors_ex(_php_curl_share_close, NULL, curl_share, module_number); REGISTER_INI_ENTRIES(); @@ -989,6
Re: [PHP-CVS] svn: /php/php-src/trunk/ NEWS ext/curl/config.m4 ext/curl/config.w32 ext/curl/curl.dsp ext/curl/interface.c ext/curl/package.xml ext/curl/php_curl.h ext/curl/share.c
hi Pierrick! Don't forget the UPGRADING guide :) Cheers, On Wed, Nov 23, 2011 at 11:20 PM, Pierrick Charron pierr...@php.net wrote: pierrick Wed, 23 Nov 2011 22:20:28 + Revision: http://svn.php.net/viewvc?view=revisionrevision=319729 Log: Implemented FR #55540, added functions curl_share_init(), curl_share_setopt() and curl_share_close(). Bug: https://bugs.php.net/55540 (Assigned) no curl_share? nice... Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/ext/curl/config.m4 U php/php-src/trunk/ext/curl/config.w32 U php/php-src/trunk/ext/curl/curl.dsp U php/php-src/trunk/ext/curl/interface.c U php/php-src/trunk/ext/curl/package.xml U php/php-src/trunk/ext/curl/php_curl.h A php/php-src/trunk/ext/curl/share.c -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- 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 ext/curl/config.m4 ext/curl/config.w32 ext/curl/curl.dsp ext/curl/interface.c ext/curl/package.xml ext/curl/php_curl.h ext/curl/share.c
I will. I'm still working on few things on the curl ext and once it will be done i'll take some time to document everything :) Pierrick On 23 November 2011 18:30, Pierre Joye pierre@gmail.com wrote: hi Pierrick! Don't forget the UPGRADING guide :) Cheers, On Wed, Nov 23, 2011 at 11:20 PM, Pierrick Charron pierr...@php.net wrote: pierrick Wed, 23 Nov 2011 22:20:28 + Revision: http://svn.php.net/viewvc?view=revisionrevision=319729 Log: Implemented FR #55540, added functions curl_share_init(), curl_share_setopt() and curl_share_close(). Bug: https://bugs.php.net/55540 (Assigned) no curl_share? nice... Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/ext/curl/config.m4 U php/php-src/trunk/ext/curl/config.w32 U php/php-src/trunk/ext/curl/curl.dsp U php/php-src/trunk/ext/curl/interface.c U php/php-src/trunk/ext/curl/package.xml U php/php-src/trunk/ext/curl/php_curl.h A php/php-src/trunk/ext/curl/share.c -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- 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 Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/trunk/ NEWS ext/curl/config.m4 ext/curl/config.w32 ext/curl/curl.dsp ext/curl/interface.c ext/curl/package.xml ext/curl/php_curl.h ext/curl/share.c
On 11/24/2011 02:20 AM, Pierrick Charron wrote: pierrick Wed, 23 Nov 2011 22:20:28 + Revision: http://svn.php.net/viewvc?view=revisionrevision=319729 Log: Implemented FR #55540, added functions curl_share_init(), curl_share_setopt() and curl_share_close(). This patch breaks non-ZTS build of trunk: /local/qa/HEAD_non-ZTS/ext/curl/php_curl.h:157:2: error: expected specifier-qualifier-list before ‘MUTEX_T’ /local/qa/HEAD_non-ZTS/ext/curl/interface.c: In function ‘_php_curl_setopt’: /local/qa/HEAD_non-ZTS/ext/curl/interface.c:2449:8: warning: ‘return’ with no value, in function returning non-void make: *** [ext/curl/interface.lo] Error 1 -- Wbr, Antony Dovgal --- http://pinba.org - realtime profiling for PHP -- 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 ext/curl/interface.c ext/curl/php_curl.h
pierrick Tue, 22 Nov 2011 17:13:26 + Revision: http://svn.php.net/viewvc?view=revisionrevision=319692 Log: Fixed bug #55635 Bug: https://bugs.php.net/55635 (Assigned) CURLOPT_BINARYTRANSFER no longer used? Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/ext/curl/interface.c U php/php-src/trunk/ext/curl/php_curl.h Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2011-11-22 16:52:42 UTC (rev 319691) +++ php/php-src/trunk/NEWS 2011-11-22 17:13:26 UTC (rev 319692) @@ -5,4 +5,8 @@ - General improvements: . World domination +- Curl: + . Fixed bug #55635 (CURLOPT_BINARYTRANSFER no longer used. The constant + still exists for backward compatibility but is doing nothing). (Pierrick) + NOTE: Insert NEWS from last stable release here prior to actual release! Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2011-11-22 16:52:42 UTC (rev 319691) +++ php/php-src/trunk/ext/curl/interface.c 2011-11-22 17:13:26 UTC (rev 319692) @@ -261,7 +261,6 @@ ch-handlers-write-stream = NULL; ch-handlers-write-method = PHP_CURL_STDOUT; - ch-handlers-write-type = PHP_CURL_ASCII; curl_easy_setopt(ch-cp, CURLOPT_FILE, (void *) ch); } } @@ -1536,7 +1535,6 @@ ch-cp = cp; ch-handlers-write-method = PHP_CURL_STDOUT; - ch-handlers-write-type = PHP_CURL_ASCII; ch-handlers-read-method = PHP_CURL_DIRECT; ch-handlers-write_header-method = PHP_CURL_IGNORE; @@ -1610,7 +1608,6 @@ dupch-handlers-write-stream = ch-handlers-write-stream; } dupch-handlers-write-method = ch-handlers-write-method; - dupch-handlers-write-type = ch-handlers-write-type; if (ch-handlers-read-stream) { Z_ADDREF_P(ch-handlers-read-stream); } @@ -1953,13 +1950,7 @@ } break; case CURLOPT_BINARYTRANSFER: - convert_to_long_ex(zvalue); - - if (Z_LVAL_PP(zvalue)) { - ch-handlers-write-type = PHP_CURL_BINARY; - } else { - ch-handlers-write-type = PHP_CURL_ASCII; - } + /* Do nothing, just backward compatibility */ break; case CURLOPT_WRITEFUNCTION: if (ch-handlers-write-func_name) { Modified: php/php-src/trunk/ext/curl/php_curl.h === --- php/php-src/trunk/ext/curl/php_curl.h 2011-11-22 16:52:42 UTC (rev 319691) +++ php/php-src/trunk/ext/curl/php_curl.h 2011-11-22 17:13:26 UTC (rev 319692) @@ -41,14 +41,12 @@ #define curl_module_ptr curl_module_entry #define CURLOPT_RETURNTRANSFER 19913 -#define CURLOPT_BINARYTRANSFER 19914 +#define CURLOPT_BINARYTRANSFER 19914 /* For Backward compatibility */ #define PHP_CURL_STDOUT 0 #define PHP_CURL_FILE 1 #define PHP_CURL_USER 2 #define PHP_CURL_DIRECT 3 #define PHP_CURL_RETURN 4 -#define PHP_CURL_ASCII 5 -#define PHP_CURL_BINARY 6 #define PHP_CURL_IGNORE 7 extern int le_curl; @@ -85,7 +83,6 @@ FILE*fp; smart_str buf; int method; - int type; zval*stream; } php_curl_write; -- 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 ext/curl/interface.c ext/curl/tests/curl_setopt_basic003.phpt
pierrick Tue, 22 Nov 2011 17:33:48 + Revision: http://svn.php.net/viewvc?view=revisionrevision=319693 Log: Add new cURL CURLOPT_* options Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/ext/curl/interface.c U php/php-src/trunk/ext/curl/tests/curl_setopt_basic003.phpt Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2011-11-22 17:13:26 UTC (rev 319692) +++ php/php-src/trunk/NEWS 2011-11-22 17:33:48 UTC (rev 319693) @@ -5,7 +5,25 @@ - General improvements: . World domination -- Curl: +- cURL: + . Added support for CURLOPT_FTP_RESPONSE_TIMEOUT, CURLOPT_APPEND, +CURLOPT_DIRLISTONLY, CURLOPT_NEW_DIRECTORY_PERMS, CURLOPT_NEW_FILE_PERMS, +CURLOPT_NETRC_FILE, CURLOPT_PREQUOTE, CURLOPT_KRBLEVEL, CURLOPT_MAXFILESIZE, +CURLOPT_FTP_ACCOUNT, CURLOPT_COOKIELIST, CURLOPT_IGNORE_CONTENT_LENGTH, +CURLOPT_CONNECT_ONLY, CURLOPT_LOCALPORT, CURLOPT_LOCALPORTRANGE, +CURLOPT_FTP_ALTERNATIVE_TO_USER, CURLOPT_SSL_SESSIONID_CACHE, +CURLOPT_FTP_SSL_CCC, CURLOPT_HTTP_CONTENT_DECODING, +CURLOPT_HTTP_TRANSFER_DECODING, CURLOPT_PROXY_TRANSFER_MODE, +CURLOPT_ADDRESS_SCOPE, CURLOPT_CRLFILE, CURLOPT_ISSUERCERT, +CURLOPT_USERNAME, CURLOPT_PASSWORD, CURLOPT_PROXYUSERNAME, +CURLOPT_PROXYPASSWORD, CURLOPT_NOPROXY, CURLOPT_SOCKS5_GSSAPI_NEC, +CURLOPT_SOCKS5_GSSAPI_SERVICE, CURLOPT_TFTP_BLKSIZE, +CURLOPT_SSH_KNOWNHOSTS, CURLOPT_FTP_USE_PRET, CURLOPT_MAIL_FROM, +CURLOPT_MAIL_RCPT, CURLOPT_RTSP_CLIENT_CSEQ, CURLOPT_RTSP_SERVER_CSEQ, +CURLOPT_RTSP_SESSION_ID, CURLOPT_RTSP_STREAM_URI, CURLOPT_RTSP_TRANSPORT, +CURLOPT_RTSP_REQUEST, CURLOPT_RESOLVE, CURLOPT_ACCEPT_ENCODING, +CURLOPT_TRANSFER_ENCODING, CURLOPT_DNS_SERVERS and CURLOPT_USE_SSL. +(Pierrick) . Fixed bug #55635 (CURLOPT_BINARYTRANSFER no longer used. The constant still exists for backward compatibility but is doing nothing). (Pierrick) Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2011-11-22 17:13:26 UTC (rev 319692) +++ php/php-src/trunk/ext/curl/interface.c 2011-11-22 17:33:48 UTC (rev 319693) @@ -535,11 +535,12 @@ of options and which version they were introduced */ /* Constants for curl_setopt() */ -#if LIBCURL_VERSION_NUM 0x070a07 /* CURLOPT_IPRESOLVE is available since curl 7.10.8 */ +#if LIBCURL_VERSION_NUM 0x070a07 /* CURLOPT_IPRESOLVE and CURLOPT_FTP_RESPONSE_TIMEOUT are available since curl 7.10.8 */ REGISTER_CURL_CONSTANT(CURLOPT_IPRESOLVE); REGISTER_CURL_CONSTANT(CURL_IPRESOLVE_WHATEVER); REGISTER_CURL_CONSTANT(CURL_IPRESOLVE_V4); REGISTER_CURL_CONSTANT(CURL_IPRESOLVE_V6); + REGISTER_CURL_CONSTANT(CURLOPT_FTP_RESPONSE_TIMEOUT); #endif REGISTER_CURL_CONSTANT(CURLOPT_DNS_USE_GLOBAL_CACHE); REGISTER_CURL_CONSTANT(CURLOPT_DNS_CACHE_TIMEOUT); @@ -561,7 +562,16 @@ REGISTER_CURL_CONSTANT(CURLOPT_POST); REGISTER_CURL_CONSTANT(CURLOPT_FTPLISTONLY); REGISTER_CURL_CONSTANT(CURLOPT_FTPAPPEND); +#if LIBCURL_VERSION_NUM = 0x071100 /* Available since 7.17.0 */ + REGISTER_CURL_CONSTANT(CURLOPT_APPEND); + REGISTER_CURL_CONSTANT(CURLOPT_DIRLISTONLY); + REGISTER_CURL_CONSTANT(CURLOPT_NEW_DIRECTORY_PERMS); + REGISTER_CURL_CONSTANT(CURLOPT_NEW_FILE_PERMS); +#endif REGISTER_CURL_CONSTANT(CURLOPT_NETRC); +#if LIBCURL_VERSION_NUM = 0x070b00 /* Option available since 7.11.0 */ + REGISTER_CURL_CONSTANT(CURLOPT_NETRC_FILE); +#endif REGISTER_CURL_CONSTANT(CURLOPT_FOLLOWLOCATION); #if CURLOPT_FTPASCII != 0 REGISTER_CURL_CONSTANT(CURLOPT_FTPASCII); @@ -602,8 +612,14 @@ REGISTER_CURL_CONSTANT(CURLOPT_RETURNTRANSFER); REGISTER_CURL_CONSTANT(CURLOPT_QUOTE); REGISTER_CURL_CONSTANT(CURLOPT_POSTQUOTE); +#if LIBCURL_VERSION_NUM = 0x070905 /* Available since 7.9.5 */ + REGISTER_CURL_CONSTANT(CURLOPT_PREQUOTE); +#endif REGISTER_CURL_CONSTANT(CURLOPT_INTERFACE); REGISTER_CURL_CONSTANT(CURLOPT_KRB4LEVEL); +#if LIBCURL_VERSION_NUM = 0x071004 /* Available since 7.16.4 */ + REGISTER_CURL_CONSTANT(CURLOPT_KRBLEVEL); +#endif REGISTER_CURL_CONSTANT(CURLOPT_HTTPPROXYTUNNEL); REGISTER_CURL_CONSTANT(CURLOPT_FILETIME); REGISTER_CURL_CONSTANT(CURLOPT_WRITEFUNCTION); @@ -675,7 +691,93 @@ #endif REGISTER_CURL_CONSTANT(CURLOPT_PRIVATE); - +#if LIBCURL_VERSION_NUM = 0x070a08 /* Available since 7.10.8 */ + REGISTER_CURL_CONSTANT(CURLOPT_MAXFILESIZE); +#endif +#if LIBCURL_VERSION_NUM = 0x070d00 /* Available since 7.13.0 */ + REGISTER_CURL_CONSTANT(CURLOPT_FTP_ACCOUNT); +#endif +#if LIBCURL_VERSION_NUM = 0x070e01 /* Available since 7.14.1 */ + REGISTER_CURL_CONSTANT(CURLOPT_COOKIELIST); + REGISTER_CURL_CONSTANT(CURLOPT_IGNORE_CONTENT_LENGTH); +#endif +#if LIBCURL_VERSION_NUM = 0x070f02 /* Available since 7.15.2 */ + REGISTER_CURL_CONSTANT(CURLOPT_CONNECT_ONLY); + REGISTER_CURL_CONSTANT(CURLOPT_LOCALPORT); +
[PHP-CVS] svn: /php/php-src/trunk/ NEWS ext/curl/interface.c ext/curl/tests/bug54995.phpt
pierrick Wed, 23 Nov 2011 05:45:27 + Revision: http://svn.php.net/viewvc?view=revisionrevision=319706 Log: Fixed bug #54995 Bug: https://bugs.php.net/54995 (Assigned) Missing CURLINFO_RESPONSE_CODE support Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/ext/curl/interface.c A php/php-src/trunk/ext/curl/tests/bug54995.phpt Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2011-11-23 01:20:49 UTC (rev 319705) +++ php/php-src/trunk/NEWS 2011-11-23 05:45:27 UTC (rev 319706) @@ -26,5 +26,6 @@ (Pierrick) . Fixed bug #55635 (CURLOPT_BINARYTRANSFER no longer used. The constant still exists for backward compatibility but is doing nothing). (Pierrick) + . Fixed bug #54995 (Missing CURLINFO_RESPONSE_CODE support). (Pierrick) NOTE: Insert NEWS from last stable release here prior to actual release! Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2011-11-23 01:20:49 UTC (rev 319705) +++ php/php-src/trunk/ext/curl/interface.c 2011-11-23 05:45:27 UTC (rev 319706) @@ -788,6 +788,7 @@ /* Info constants */ REGISTER_CURL_CONSTANT(CURLINFO_EFFECTIVE_URL); REGISTER_CURL_CONSTANT(CURLINFO_HTTP_CODE); + REGISTER_CURL_CONSTANT(CURLINFO_RESPONSE_CODE); REGISTER_CURL_CONSTANT(CURLINFO_HEADER_SIZE); REGISTER_CURL_CONSTANT(CURLINFO_REQUEST_SIZE); REGISTER_CURL_CONSTANT(CURLINFO_TOTAL_TIME); Added: php/php-src/trunk/ext/curl/tests/bug54995.phpt === --- php/php-src/trunk/ext/curl/tests/bug54995.phpt (rev 0) +++ php/php-src/trunk/ext/curl/tests/bug54995.phpt 2011-11-23 05:45:27 UTC (rev 319706) @@ -0,0 +1,30 @@ +--TEST-- +Bug #54995 (Missing CURLINFO_RESPONSE_CODE support) +--SKIPIF-- +?php +if (!extension_loaded(curl)) { + exit(skip curl extension not loaded); +} +if ($curl_version['version_number'] 0x070a08) { + exit(skip: tests works a versions of curl = 7.10.8); +} +if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) { + exit(skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined); +} +? +--FILE-- +?php + +$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER'); +$ch = curl_init(); +curl_setopt($ch, CURLOPT_URL, {$host}/get.php); +curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + +var_dump(curl_getinfo($ch, CURLINFO_HTTP_CODE) == curl_getinfo($ch, CURLINFO_RESPONSE_CODE)); + +curl_exec($ch); +curl_close($ch); + +? +--EXPECTF-- +bool(true) -- 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
bjoriMon, 12 Sep 2011 10:20:34 + Revision: http://svn.php.net/viewvc?view=revisionrevision=316525 Log: These are all in 5_4 Changed paths: U php/php-src/trunk/NEWS Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2011-09-12 10:13:54 UTC (rev 316524) +++ php/php-src/trunk/NEWS 2011-09-12 10:20:34 UTC (rev 316525) @@ -1,255 +1,8 @@ PHPNEWS ||| -?? ??? 201?, PHP 5.3.99 -- Upgraded bundled Sqlite3 to version 3.7.4. (Ilia) -- Upgraded bundled PCRE to version 8.10. (Ilia) +?? ??? 201?, PHP 5.5.0 -- Removed legacy features: - . break/continue $var syntax. (Dmitry) - . Safe mode and all related ini options. (Kalle) - . register_globals and register_long_arrays ini options. (Kalle) - . import_request_variables(). (Kalle) - . allow_call_time_pass_reference. (Pierrick) - . define_syslog_variables ini option and its associated function. (Kalle) - . highlight.bg ini option. (Kalle) - . Session bug compatibility mode (session.bug_compat42 and -session.bug_compat_warn ini options). (Kalle) - . session_is_registered(), session_register() and session_unregister() -functions. (Kalle) - . y2k_compliance ini option. (Kalle) - -- Moved extensions to PECL: (Johannes) - . ext/sqlite. (Note: the ext/sqlite3 and ext/pdo_sqlite extensions are -not affected) - -- Changed $_SERVER['REQUEST_TIME'] to include microsecond precision. (Ilia) -- Changed default value of default_charset php.ini option from ISO-8859-1 to - UTF-8. (Rasmus) -- 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 support by default. Previously php had to be compiled -with --enable-zend-multibyte. Now it can be enabled or disabled through -zend.multibyte directive in php.ini (Dmitry) - . Removed compile time dependency from ext/mbstring (Dmitry) - . Added scalar typehints to the parser and the reflection API. (Ilia, Derick) - . Added support for Traits. (Stefan) - . Added closure $this support back. (Stas) - . Added array dereferencing support. (Felipe) - . Added support for object references in recursive serialize() calls. -FR #36424. (Mike) - . Added http_response_code() function. FR #52555. (Paul Dragoonis, Kalle) - . Added header_register_callback() which is invoked immediately -prior to the sending of headers and after default headers have -been added. (Scott) - . Added DTrace support. (David Soria Parra) - . Improved output layer, see README.NEW-OUTPUT-API for internals. (Mike) - . Improved unserialize() performance. -(galaxy dot mipt at gmail dot com, Kalle) - . Improved unix build system to allow building multiple PHP binary SAPIs and -one SAPI module the same time. FR #53271, FR #52410. (Jani) - . Added optional argument to debug_backtrace() and debug_print_backtrace() -to limit the amount of stack frames returned. (Sebastian, Patrick) + . World domination -- Improved Zend Engine memory usage: (Dmitry) - . Replaced zend_function.pass_rest_by_reference by -ZEND_ACC_PASS_REST_BY_REFERENCE in zend_function.fn_flags. - . Replaced zend_function.return_reference by ZEND_ACC_RETURN_REFERENCE -in zend_function.fn_flags. - . Removed zend_arg_info.required_num_args as it was only needed for internal -functions. Now the first arg_info for internal functions (which has special -meaning) is represented by zend_internal_function_info structure. - . Moved zend_op_array.size, size_var, size_literal, current_brk_cont, -backpatch_count into CG(context) as they are used only during compilation. - . Moved zend_op_array.start_op into EG(start_op) as it's used only for -'interactive' execution of single top-level op-array. - . Replaced zend_op_array.done_pass_two by ZEND_ACC_DONE_PASS_TWO in -zend_op_array.fn_flags. - . op_array.vars array is trimmed (reallocated) during pass_two. - . Replaced zend_class_entry.constants_updated by ZEND_ACC_CONSTANTS_UPDATED -in zend_class_entry.ce_flags. - . Reduced the size of zend_class_entry by sharing the same memory space -by different information for internal and user classes. -See zend_class_entry.info union. - . Reduced size of temp_variable. - -- Changed the structure of op_array.opcodes. The constant values are moved from - opcode operands into a separate literal table. (Dmitry) - -- Improved Zend Engine, performance tweaks and optimizations: (Dmitry) - . Inlined most probable code-paths for arithmetic operations
[PHP-CVS] svn: /php/php-src/trunk/ NEWS
arpadMon, 29 Aug 2011 20:36:22 + Revision: http://svn.php.net/viewvc?view=revisionrevision=315739 Log: remove duplicate news entry Changed paths: U php/php-src/trunk/NEWS Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2011-08-29 20:25:30 UTC (rev 315738) +++ php/php-src/trunk/NEWS 2011-08-29 20:36:22 UTC (rev 315739) @@ -54,8 +54,6 @@ one SAPI module the same time. FR #53271, FR #52410. (Jani) . Added optional argument to debug_backtrace() and debug_print_backtrace() to limit the amount of stack frames returned. (Sebastian, Patrick) - . Added support for SORT_NATURAL and SORT_FLAG_CASE in array sort functions: -sort, rsort, ksort, krsort, asort, arsort and array_multisort. Req #55158 (arpad) - Improved Zend Engine memory usage: (Dmitry) . Replaced zend_function.pass_rest_by_reference by -- 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
hirokawa Sat, 20 Aug 2011 07:27:48 + Revision: http://svn.php.net/viewvc?view=revisionrevision=315224 Log: update NEWS. Changed paths: U php/php-src/trunk/NEWS Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2011-08-20 07:24:04 UTC (rev 315223) +++ php/php-src/trunk/NEWS 2011-08-20 07:27:48 UTC (rev 315224) @@ -170,10 +170,13 @@ iaren...@eteo.mondragon.edu, jean...@au-fil-du.net, remy.sai...@gmail.com) - Improved mbstring extension: - . Added Shift_JIS Emoji (pictograms) support. (rui) - . Ill-formed UTF-8 check for security enhancements. (rui) - . Added MacJapanese (Shift_JIS) and gb18030 encoding support. (rui) - . Added encode/decode in hex format to mb_[en|de]code_numericentity(). (rui) + . Added Shift_JIS/UTF-8 Emoji (pictograms) support. (Rui) + . Added JIS X0213:2004 (Shift_JIS-2004, EUC-JP-2004, ISO-2022-JP-2004) support. (Rui) + . Ill-formed UTF-8 check for security enhancements. (Rui) + . Added MacJapanese (Shift_JIS) and gb18030 encoding support. (Rui) + . Added encode/decode in hex format to mb_[en|de]code_numericentity(). (Rui) + . Added user JIS X0213:2004 (Shift_JIS-2004, EUC-JP-2004, ISO-2022-JP-2004) support. (Rui) + . Added the user user defined area for CP936 and CP950 (Rui). - Improved MySQL extensions: . MySQL: Deprecated mysql_list_dbs(). FR #50667. (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
hirokawa Sun, 14 Aug 2011 14:09:54 + Revision: http://svn.php.net/viewvc?view=revisionrevision=314898 Log: NEWS update for mbstring. Changed paths: U php/php-src/trunk/NEWS Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2011-08-14 14:09:11 UTC (rev 314897) +++ php/php-src/trunk/NEWS 2011-08-14 14:09:54 UTC (rev 314898) @@ -172,6 +172,8 @@ - Improved mbstring extension: . Added Shift_JIS Emoji (pictograms) support. (rui) . Ill-formed UTF-8 check for security enhancements. (rui) + . Added MacJapanese (Shift_JIS) and gb18030 encoding support. (rui) + . Added encode/decode in hex format to mb_[en|de]code_numericentity(). (rui) - Improved MySQL extensions: . MySQL: Deprecated mysql_list_dbs(). FR #50667. (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
hirokawa Tue, 09 Aug 2011 15:11:33 + Revision: http://svn.php.net/viewvc?view=revisionrevision=314671 Log: update the news. Changed paths: U php/php-src/trunk/NEWS Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2011-08-09 15:08:03 UTC (rev 314670) +++ php/php-src/trunk/NEWS 2011-08-09 15:11:33 UTC (rev 314671) @@ -169,6 +169,10 @@ . Added paged results support. FR #42060. (a...@openldap.org, iaren...@eteo.mondragon.edu, jean...@au-fil-du.net, remy.sai...@gmail.com) +- Improved mbstring extension: + . Added Shift_JIS Emoji (pictograms) support. (rui) + . Ill-formed UTF-8 check for security enhancements. (rui) + - Improved MySQL extensions: . MySQL: Deprecated mysql_list_dbs(). FR #50667. (Andrey) . mysqlnd: Added named pipes support. FR #48082. (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/snmp/snmp.c ext/snmp/tests/snmp_get_valueretrieval.phpt ext/snmp/tests/snmp_getvalue.phpt
lytboris Sun, 17 Jul 2011 17:27:00 + Revision: http://svn.php.net/viewvc?view=revisionrevision=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; - ZVAL_STRING(val, buf, 1); -
[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
chregu Mon, 11 Jul 2011 11:16:22 + Revision: http://svn.php.net/viewvc?view=revisionrevision=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 libxslt/xsltInternals.h #include libxslt/xsltutils.h #include libxslt/transform.h +#include libxslt/security.h #if HAVE_XSL_EXSLT #include libexslt/exslt.h #include libexslt/exsltconfig.h @@ -43,6 +44,13 @@ #include libxslt/extensions.h #include libxml/xpathInternals.h +#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)
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
On Mon, Jul 11, 2011 at 13:16, Christian Stocker chr...@php.net wrote: chregu Mon, 11 Jul 2011 11:16:22 + Revision: http://svn.php.net/viewvc?view=revisionrevision=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
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
On 11.07.11 13:29, Hannes Magnusson wrote: On Mon, Jul 11, 2011 at 13:16, Christian Stocker chr...@php.net wrote: chregu Mon, 11 Jul 2011 11:16:22 + Revision: http://svn.php.net/viewvc?view=revisionrevision=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. copypaste ;) 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
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 chr...@php.net wrote: chregu Mon, 11 Jul 2011 11:16:22 + Revision: http://svn.php.net/viewvc?view=revisionrevision=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
[PHP-CVS] svn: /php/php-src/trunk/ NEWS ext/dom/document.c ext/libxml/libxml.c
chregu Mon, 11 Jul 2011 15:02:56 + Revision: http://svn.php.net/viewvc?view=revisionrevision=313133 Log: Added the ability to pass options to loadHTML (Chregu, fxmulder at gmail dot com) Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/ext/dom/document.c U php/php-src/trunk/ext/libxml/libxml.c Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2011-07-11 12:08:02 UTC (rev 313132) +++ php/php-src/trunk/NEWS 2011-07-11 15:02:56 UTC (rev 313133) @@ -140,6 +140,9 @@ . Added Tokyo Cabinet abstract DB support. (Michael Maclean) . Added Berkeley DB 5 support. (Johannes, Chris Jones) +- Improved DOM extension: + . Added the ability to pass options to loadHTML (Chregu, fxmulder at gmail dot com) + - Improved filesystem functions: . scandir() now accepts SCANDIR_SORT_NONE as a possible sorting_order value. FR #53407. (Adam) Modified: php/php-src/trunk/ext/dom/document.c === --- php/php-src/trunk/ext/dom/document.c2011-07-11 12:08:02 UTC (rev 313132) +++ php/php-src/trunk/ext/dom/document.c2011-07-11 15:02:56 UTC (rev 313133) @@ -149,10 +149,12 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_loadhtml, 0, 0, 1) ZEND_ARG_INFO(0, source) + ZEND_ARG_INFO(0, options) ZEND_END_ARG_INFO(); ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_loadhtmlfile, 0, 0, 1) ZEND_ARG_INFO(0, source) + ZEND_ARG_INFO(0, options) ZEND_END_ARG_INFO(); ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_savehtml, 0, 0, 0) @@ -2155,12 +2157,12 @@ dom_object *intern; dom_doc_propsptr doc_prop; char *source; - int source_len, refcount, ret; + int source_len, refcount, ret, options = 0; htmlParserCtxtPtr ctxt; id = getThis(); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s, source, source_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s|l, source, source_len, options) == FAILURE) { return; } @@ -2180,6 +2182,10 @@ RETURN_FALSE; } + if (options) { + htmlCtxtUseOptions(ctxt, options); + } + ctxt-vctxt.error = php_libxml_ctx_error; ctxt-vctxt.warning = php_libxml_ctx_warning; if (ctxt-sax != NULL) { Modified: php/php-src/trunk/ext/libxml/libxml.c === --- php/php-src/trunk/ext/libxml/libxml.c 2011-07-11 12:08:02 UTC (rev 313132) +++ php/php-src/trunk/ext/libxml/libxml.c 2011-07-11 15:02:56 UTC (rev 313133) @@ -618,6 +618,7 @@ REGISTER_LONG_CONSTANT(LIBXML_NSCLEAN,XML_PARSE_NSCLEAN, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(LIBXML_NOCDATA,XML_PARSE_NOCDATA, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(LIBXML_NONET, XML_PARSE_NONET, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(LIBXML_PEDANTIC, XML_PARSE_PEDANTIC, CONST_CS | CONST_PERSISTENT); #if LIBXML_VERSION = 20621 REGISTER_LONG_CONSTANT(LIBXML_COMPACT,XML_PARSE_COMPACT, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(LIBXML_NOXMLDECL, XML_SAVE_NO_DECL, CONST_CS | CONST_PERSISTENT); @@ -627,6 +628,15 @@ #endif REGISTER_LONG_CONSTANT(LIBXML_NOEMPTYTAG, LIBXML_SAVE_NOEMPTYTAG, CONST_CS | CONST_PERSISTENT); + /* Additional constants for use with loading html */ +#if LIBXML_VERSION = 20707 + REGISTER_LONG_CONSTANT(LIBXML_HTML_NOIMPLIED, HTML_PARSE_NOIMPLIED, CONST_CS | CONST_PERSISTENT); +#endif + +#if LIBXML_VERSION = 20708 + REGISTER_LONG_CONSTANT(LIBXML_HTML_NODEFDTD, HTML_PARSE_NODEFDTD, CONST_CS | CONST_PERSISTENT); +#endif + /* Error levels */ REGISTER_LONG_CONSTANT(LIBXML_ERR_NONE, XML_ERR_NONE, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(LIBXML_ERR_WARNING,XML_ERR_WARNING, 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 ext/standard/basic_functions.c ext/standard/head.c ext/standard/head.h
On Mon, Aug 9, 2010 at 15:10, Kalle Sommer Nielsen ka...@php.net wrote: kalle Mon, 09 Aug 2010 13:10:32 + Revision: http://svn.php.net/viewvc?view=revisionrevision=302033 Log: Implemented FR #52555 (Ability to get HTTP response code) - Patch by Paul Dragoonis Errr. You don't think this will create some confusion with $http_response_headers ? $http_response_headers are the headers PHP just retrieved but http_response_code() is what PHP is about to send out ? -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
lytboris Fri, 17 Jun 2011 18:18:21 + Revision: http://svn.php.net/viewvc?view=revisionrevision=312237 Log: expand SNMP section Changed paths: U php/php-src/trunk/NEWS Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2011-06-17 18:15:30 UTC (rev 312236) +++ php/php-src/trunk/NEWS 2011-06-17 18:18:21 UTC (rev 312237) @@ -206,14 +206,19 @@ - Improved ZLIB extension: . Re-implemented non-file related functionality. (Mike) -- Improved SNMP extension: - . Added OO API. FR #53594. +- Improved SNMP extension (Boris Lytochkin): + . Added OO API. FR #53594 (php-snmp rewrite). . Sanitized return values of existing functions. Now it returns FALSE on failure. . Allow ~infinite OIDs in GET/GETNEXT/SET queries. Autochunk them to max_oids upon request. . Introducing unit tests for extension with ~full coverage. - . Fixed bugs #44193, #44193, #45893, #46065, #51336, #53862. + . Fixed bugs +. #44193 (snmp v3 noAuthNoPriv doesn't work) +. #45893 (Snmp buffer limited to 2048 char) +. #46065 (snmp_set_quick_print() persists between requests) +. #51336 (snmprealwalk (snmp v1) does not handle end of OID tree correctly) +. #53862 (snmp_set_oid_output_format does not allow returning to default) ## UNSORTED ## -- 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 ext/spl/spl_iterators.c ext/spl/spl_iterators.h ext/spl/tests/CallbackFilterIteratorTest-002.phpt ext/spl/tests/CallbackFilterIteratorTest.phpt ext/spl/tests/Re
lbarnaud Sun, 27 Mar 2011 20:13:27 + Revision: http://svn.php.net/viewvc?view=revisionrevision=309749 Log: Added CallbackFilterIterator and RecursiveCallbackFilterIterator classes [DOC] This is a concrete FilterIterator which takes a callback as constructor parameter, and uses this callback for filtering. This allows to use FilterIterator without extending it. CallbackFilterIterator Example: $it = new ArrayIterator(range(1,100)); $it = new CallbackFilterIterator($it, function($value) { return $value % 2; }); foreach($it as $value) // ... RecursiveCallbackFilterIterator Example: $it = new RecursiveDirectoryIterator(/); $it = new RecursiveCallbackFilterIterator($it, function($file, $k, $it) { return $it-hasChildren() || $file-getSize() 1024; }); foreach(new RecursiveIteratorIterator($it) as $file) // ... The callback takes the current value, the current key and the inner iterator as parameters. Changed paths: U php/php-src/trunk/NEWS 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/CallbackFilterIteratorTest-002.phpt A php/php-src/trunk/ext/spl/tests/CallbackFilterIteratorTest.phpt A php/php-src/trunk/ext/spl/tests/RecursiveCallbackFilterIteratorTest.phpt Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2011-03-27 18:14:58 UTC (rev 309748) +++ php/php-src/trunk/NEWS 2011-03-27 20:13:27 UTC (rev 309749) @@ -197,6 +197,7 @@ . Added RegexIterator::getRegex() method. (Joshua Thijssen) . Added SplObjectStorage::getHash() hook. (Etienne) . Added SplFileInfo::getExtension(). FR #48767. (Peter Cowburn) + . Added CallbackFilterIterator and RecursiveCallbackFilterIterator (Arnaud) - Improved ZLIB extension: . Re-implemented non-file related functionality. (Mike) Modified: php/php-src/trunk/ext/spl/spl_iterators.c === --- php/php-src/trunk/ext/spl/spl_iterators.c 2011-03-27 18:14:58 UTC (rev 309748) +++ php/php-src/trunk/ext/spl/spl_iterators.c 2011-03-27 20:13:27 UTC (rev 309749) @@ -44,7 +44,9 @@ PHPAPI zend_class_entry *spl_ce_RecursiveIterator; PHPAPI zend_class_entry *spl_ce_RecursiveIteratorIterator; PHPAPI zend_class_entry *spl_ce_FilterIterator; +PHPAPI zend_class_entry *spl_ce_CallbackFilterIterator; PHPAPI zend_class_entry *spl_ce_RecursiveFilterIterator; +PHPAPI zend_class_entry *spl_ce_RecursiveCallbackFilterIterator; PHPAPI zend_class_entry *spl_ce_ParentIterator; PHPAPI zend_class_entry *spl_ce_SeekableIterator; PHPAPI zend_class_entry *spl_ce_LimitIterator; @@ -1499,6 +1501,23 @@ break; } #endif + case DIT_CallbackFilterIterator: + case DIT_RecursiveCallbackFilterIterator: { + _spl_cbfilter_it_intern *cfi = emalloc(sizeof(*cfi)); + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, Of, zobject, ce_inner, cfi-fci, cfi-fcc) == FAILURE) { +zend_restore_error_handling(error_handling TSRMLS_CC); +efree(cfi); +return NULL; + } + if (cfi-fci.function_name) { +Z_ADDREF_P(cfi-fci.function_name); + } + if (cfi-fci.object_ptr) { +Z_ADDREF_P(cfi-fci.object_ptr); + } + intern-u.cbfilter = cfi; + break; + } default: if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, O, zobject, ce_inner) == FAILURE) { zend_restore_error_handling(error_handling TSRMLS_CC); @@ -1527,6 +1546,13 @@ spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, spl_ce_FilterIterator, zend_ce_iterator, DIT_FilterIterator); } /* }}} */ +/* {{{ proto void CallbackFilterIterator::__construct(Iterator it, callback) + Create an Iterator from another iterator */ +SPL_METHOD(CallbackFilterIterator, __construct) +{ + spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, spl_ce_CallbackFilterIterator, zend_ce_iterator, DIT_CallbackFilterIterator); +} /* }}} */ + /* {{{ proto Iterator FilterIterator::getInnerIterator() proto Iterator CachingIterator::getInnerIterator() proto Iterator LimitIterator::getInnerIterator() @@ -1800,6 +1826,14 @@ spl_filter_it_next(getThis(), intern TSRMLS_CC); } /* }}} */ +/* {{{ proto void RecursiveCallbackFilterIterator::__construct(RecursiveIterator it, callback) + Create a RecursiveCallbackFilterIterator from a RecursiveIterator */ +SPL_METHOD(RecursiveCallbackFilterIterator, __construct) +{ + spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, spl_ce_RecursiveCallbackFilterIterator, spl_ce_RecursiveIterator, DIT_RecursiveCallbackFilterIterator); +} /* }}} */ + + /* {{{ proto void RecursiveFilterIterator::__construct(RecursiveIterator it) Create a RecursiveFilterIterator from a RecursiveIterator */ SPL_METHOD(RecursiveFilterIterator, __construct) @@ -1850,6 +1884,27 @@ } } /* }}} */ +/* {{{ proto RecursiveCallbackFilterIterator RecursiveCallbackFilterIterator::getChildren() + Return
Re: [PHP-CVS] svn: /php/php-src/trunk/ NEWS ext/spl/spl_iterators.c ext/spl/spl_iterators.h ext/spl/tests/CallbackFilterIteratorTest-002.phpt ext/spl/tests/CallbackFilterIteratorTest.phpt ext/spl/test
hi Arnaud, Please add a note in the UPGRADING guide. Thanks, On Sun, Mar 27, 2011 at 10:13 PM, Arnaud Le Blanc lbarn...@php.net wrote: lbarnaud Sun, 27 Mar 2011 20:13:27 + Revision: http://svn.php.net/viewvc?view=revisionrevision=309749 Log: Added CallbackFilterIterator and RecursiveCallbackFilterIterator classes [DOC] This is a concrete FilterIterator which takes a callback as constructor parameter, and uses this callback for filtering. This allows to use FilterIterator without extending it. CallbackFilterIterator Example: $it = new ArrayIterator(range(1,100)); $it = new CallbackFilterIterator($it, function($value) { return $value % 2; }); foreach($it as $value) // ... RecursiveCallbackFilterIterator Example: $it = new RecursiveDirectoryIterator(/); $it = new RecursiveCallbackFilterIterator($it, function($file, $k, $it) { return $it-hasChildren() || $file-getSize() 1024; }); foreach(new RecursiveIteratorIterator($it) as $file) // ... The callback takes the current value, the current key and the inner iterator as parameters. Changed paths: U php/php-src/trunk/NEWS 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/CallbackFilterIteratorTest-002.phpt A php/php-src/trunk/ext/spl/tests/CallbackFilterIteratorTest.phpt A php/php-src/trunk/ext/spl/tests/RecursiveCallbackFilterIteratorTest.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- 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
While you're about it, how about being a little less ppositive about the pposition of multibyte suppport? Cheers! Mike -- Mike Ford, Electronic Information Developer, Libraries and Learning Innovation, Leeds Metropolitan University, C507 City Campus, Woodhouse Lane, LEEDS, LS1 3HE, United Kingdom Email: m.f...@leedsmet.ac.uk Tel: +44 113 812 4730 -Original Message- From: Sebastian Bergmann [mailto:sebast...@php.net] Sent: 06 March 2011 21:48 To: php-cvs@lists.php.net Subject: [PHP-CVS] svn: /php/php-src/trunk/ NEWS sebastianSun, 06 Mar 2011 21:47:46 + Revision: http://svn.php.net/viewvc?view=revisionrevision=308980 Log: Fix speling. Changed paths: U php/php-src/trunk/NEWS Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS2011-03-06 19:31:23 UTC (rev 308979) +++ php/php-src/trunk/NEWS2011-03-06 21:47:46 UTC (rev 308980) @@ -31,7 +31,7 @@ a property into a warning. (Scott) - General improvements: - . Added multibyte suppport by default. Previosly php had to be compiled + . Added multibyte suppport by default. Previously php had to be compiled with --enable-zend-multibyte. Now it can be enabled or disabled throug zend.multibyte directive in php.ini (Dmitry) . Removed compile time dependency from ext/mbstring (Dmitry) To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm
[PHP-CVS] svn: /php/php-src/trunk/ NEWS
tony2001 Tue, 08 Mar 2011 14:53:38 + Revision: http://svn.php.net/viewvc?view=revisionrevision=309022 Log: fix typppo Changed paths: U php/php-src/trunk/NEWS Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2011-03-08 14:07:25 UTC (rev 309021) +++ php/php-src/trunk/NEWS 2011-03-08 14:53:38 UTC (rev 309022) @@ -31,8 +31,8 @@ a property into a warning. (Scott) - General improvements: - . Added multibyte suppport by default. Previously php had to be compiled -with --enable-zend-multibyte. Now it can be enabled or disabled throug + . Added multibyte support by default. Previously php had to be compiled +with --enable-zend-multibyte. Now it can be enabled or disabled through zend.multibyte directive in php.ini (Dmitry) . Removed compile time dependency from ext/mbstring (Dmitry) . Added scalar typehints to the parser and the reflection API. (Ilia, Derick) -- 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
sebastianSun, 06 Mar 2011 21:47:46 + Revision: http://svn.php.net/viewvc?view=revisionrevision=308980 Log: Fix speling. Changed paths: U php/php-src/trunk/NEWS Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2011-03-06 19:31:23 UTC (rev 308979) +++ php/php-src/trunk/NEWS 2011-03-06 21:47:46 UTC (rev 308980) @@ -31,7 +31,7 @@ a property into a warning. (Scott) - General improvements: - . Added multibyte suppport by default. Previosly php had to be compiled + . Added multibyte suppport by default. Previously php had to be compiled with --enable-zend-multibyte. Now it can be enabled or disabled throug zend.multibyte directive in php.ini (Dmitry) . Removed compile time dependency from ext/mbstring (Dmitry) -- 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 ext/standard/basic_functions.c ext/standard/basic_functions.h main/SAPI.c main/SAPI.h
scottmac Thu, 03 Feb 2011 16:47:28 + Revision: http://svn.php.net/viewvc?view=revisionrevision=307977 Log: Add header_register_callback(), allows a userland function to be called as all the headers are being sent and after all of the default headers have been merged. headers_list(), header_remove() and header() can all be used inside the callback. ?php header('Content-Type: text/plain'); header('X-Test: foo'); function foo() { foreach (headers_list() as $header) { if (strpos($header, 'X-Powered') !== false) { header_remove('X-Powered-By'); } header_remove('X-Test'); } } $result = header_register_callback('foo'); echo a; Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/ext/standard/basic_functions.c U php/php-src/trunk/ext/standard/basic_functions.h U php/php-src/trunk/main/SAPI.c U php/php-src/trunk/main/SAPI.h Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2011-02-03 16:29:23 UTC (rev 307976) +++ php/php-src/trunk/NEWS 2011-02-03 16:47:28 UTC (rev 307977) @@ -42,6 +42,9 @@ . Added support for object references in recursive serialize() calls. FR #36424. (Mike) . Added http_response_code() function. FR #52555. (Paul Dragoonis, Kalle) + . Added header_register_callback() which is invoked immediately +prior to the sending of headers and after default headers have +been added. (Scott) . Added DTrace support. (David Soria Parra) . Improved output layer, see README.NEW-OUTPUT-API for internals. (Mike) . Improved unserialize() performance. Modified: php/php-src/trunk/ext/standard/basic_functions.c === --- php/php-src/trunk/ext/standard/basic_functions.c2011-02-03 16:29:23 UTC (rev 307976) +++ php/php-src/trunk/ext/standard/basic_functions.c2011-02-03 16:47:28 UTC (rev 307977) @@ -141,6 +141,13 @@ ZEND_ARG_INFO(0, seconds) ZEND_END_ARG_INFO() /* }}} */ + +/* {{{ main/sapi.c */ +ZEND_BEGIN_ARG_INFO(arginfo_header_register_callback, 0) + ZEND_ARG_INFO(0, callback) +ZEND_END_ARG_INFO() +/* }}} */ + /* {{{ main/output.c */ ZEND_BEGIN_ARG_INFO_EX(arginfo_ob_start, 0, 0, 0) ZEND_ARG_INFO(0, user_function) @@ -2940,6 +2947,7 @@ PHP_FE(convert_cyr_string, arginfo_convert_cyr_string) PHP_FE(get_current_user, arginfo_get_current_user) PHP_FE(set_time_limit, arginfo_set_time_limit) + PHP_FE(header_register_callback, arginfo_header_register_callback) PHP_FE(get_cfg_var, arginfo_get_cfg_var) PHP_DEP_FALIAS(magic_quotes_runtime,set_magic_quotes_runtime, arginfo_set_magic_quotes_runtime) Modified: php/php-src/trunk/ext/standard/basic_functions.h === --- php/php-src/trunk/ext/standard/basic_functions.h2011-02-03 16:29:23 UTC (rev 307976) +++ php/php-src/trunk/ext/standard/basic_functions.h2011-02-03 16:47:28 UTC (rev 307977) @@ -69,6 +69,8 @@ PHP_FUNCTION(get_current_user); PHP_FUNCTION(set_time_limit); +PHP_FUNCTION(header_register_callback); + PHP_FUNCTION(get_cfg_var); PHP_FUNCTION(set_magic_quotes_runtime); PHP_FUNCTION(get_magic_quotes_runtime); Modified: php/php-src/trunk/main/SAPI.c === --- php/php-src/trunk/main/SAPI.c 2011-02-03 16:29:23 UTC (rev 307976) +++ php/php-src/trunk/main/SAPI.c 2011-02-03 16:47:28 UTC (rev 307977) @@ -116,7 +116,59 @@ efree(sapi_header-header); } +/* {{{ proto bool header_register_callback(mixed callback) + call a header function */ +PHP_FUNCTION(header_register_callback) +{ + zval *callback_func; + char *callback_name; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, z, callback_func) == FAILURE) { + return; + } + + if (!zend_is_callable(callback_func, 0, callback_name TSRMLS_CC)) { + efree(callback_name); + RETURN_FALSE; + } + efree(callback_name); + if (SG(callback_func)) { + zval_ptr_dtor(SG(callback_func)); + SG(fci_cache) = empty_fcall_info_cache; + } + + Z_ADDREF_P(callback_func); + + SG(callback_func) = callback_func; + + RETURN_TRUE; +} +/* }}} */ + +static void sapi_run_header_callback() +{ + int error; +
[PHP-CVS] svn: /php/php-src/trunk/ NEWS ext/snmp/php_snmp.h ext/snmp/snmp.c ext/snmp/tests/snmp_parse_oid.phpt
lytboris Tue, 01 Feb 2011 07:45:30 + Revision: http://svn.php.net/viewvc?view=revisionrevision=307897 Log: - Improved SNMP extension: . Allow ~infinite OIDs in GET/GETNEXT/SET queries. Autochunk them to max_oids upon request. Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/ext/snmp/php_snmp.h U php/php-src/trunk/ext/snmp/snmp.c D php/php-src/trunk/ext/snmp/tests/snmp_parse_oid.phpt Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2011-02-01 06:04:38 UTC (rev 307896) +++ php/php-src/trunk/NEWS 2011-02-01 07:45:30 UTC (rev 307897) @@ -200,9 +200,11 @@ - Improved SNMP extension: . Added OO API. FR #53594. . Sanitized return values of existing functions. Now it returns FALSE on -failure - . Introducing unit tests for extension with ~full coverage - . Fixed bugs #44193, #44193, #45893, #46065, #51336, #53862 +failure. + . Allow ~infinite OIDs in GET/GETNEXT/SET queries. Autochunk them to max_oids +upon request. + . Introducing unit tests for extension with ~full coverage. + . Fixed bugs #44193, #44193, #45893, #46065, #51336, #53862. ## UNSORTED ## Modified: php/php-src/trunk/ext/snmp/php_snmp.h === --- php/php-src/trunk/ext/snmp/php_snmp.h 2011-02-01 06:04:38 UTC (rev 307896) +++ php/php-src/trunk/ext/snmp/php_snmp.h 2011-02-01 07:45:30 UTC (rev 307897) @@ -83,6 +83,7 @@ typedef struct _php_snmp_object { zend_object zo; struct snmp_session *session; + int max_oids; int valueretrieval; int quick_print; #ifdef HAVE_NET_SNMP Modified: php/php-src/trunk/ext/snmp/snmp.c === --- php/php-src/trunk/ext/snmp/snmp.c 2011-02-01 06:04:38 UTC (rev 307896) +++ php/php-src/trunk/ext/snmp/snmp.c 2011-02-01 07:45:30 UTC (rev 307897) @@ -405,13 +405,12 @@ } snmpobjarg; -#define SNMP_MAXOIDS_IN_PDU 64 struct objid_set { int count; int offset; int step; int array_output; - snmpobjarg vars[SNMP_MAXOIDS_IN_PDU]; + snmpobjarg *vars; }; /* {{{ snmp_functions[] @@ -548,7 +547,7 @@ buf = dbuf; buflen = val_len; } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, malloc() failed: %s, fallback to static array, strerror(errno)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, emalloc() failed: %s, fallback to static array, strerror(errno)); } } @@ -931,6 +930,11 @@ objid_set-count = 0; objid_set-array_output = ((st SNMP_CMD_WALK) ? TRUE : FALSE); if (Z_TYPE_PP(oid) == IS_STRING) { + objid_set-vars = (snmpobjarg *)emalloc(sizeof(snmpobjarg)); + if (objid_set-vars == NULL) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, emalloc() failed while parsing oid: %s, strerror(errno)); + return FALSE; + } objid_set-vars[objid_set-count].oid = Z_STRVAL_PP(oid); if (st SNMP_CMD_SET) { if (Z_TYPE_PP(type) == IS_STRING Z_TYPE_PP(value) == IS_STRING) { @@ -952,6 +956,11 @@ php_error_docref(NULL TSRMLS_CC, E_WARNING, Got empty OID array); return FALSE; } + objid_set-vars = (snmpobjarg *)emalloc(sizeof(snmpobjarg) * zend_hash_num_elements(Z_ARRVAL_PP(oid))); + if (objid_set-vars == NULL) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, emalloc() failed while parsing oid array: %s, strerror(errno)); + return FALSE; + } objid_set-array_output = ( (st SNMP_CMD_SET) ? FALSE : TRUE ); for ( zend_hash_internal_pointer_reset_ex(Z_ARRVAL_PP(oid), pos_oid); zend_hash_get_current_data_ex(Z_ARRVAL_PP(oid), (void **) tmp_oid, pos_oid) == SUCCESS; @@ -992,11 +1001,7 @@ } } } - - if (objid_set-count++ = SNMP_MAXOIDS_IN_PDU) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Could not process more than %u OIDs in singe GET/GETNEXT/SET query, SNMP_MAXOIDS_IN_PDU); - return FALSE; - } + objid_set-count++; } } @@ -1269,7 +1274,7 @@ long timeout = SNMP_DEFAULT_TIMEOUT; long retries = SNMP_DEFAULT_RETRIES; int non_repeaters = 0; - int max_repetitions = 20; + int max_repetitions = -1; int argc = ZEND_NUM_ARGS(); struct objid_set objid_set;
[PHP-CVS] svn: /php/php-src/trunk/ NEWS ext/pgsql/pgsql.c
iliaaThu, 27 Jan 2011 16:02:30 + Revision: http://svn.php.net/viewvc?view=revisionrevision=307797 Log: Added support for extra parameter for PGNotify(). Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/ext/pgsql/pgsql.c Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2011-01-27 15:37:38 UTC (rev 307796) +++ php/php-src/trunk/NEWS 2011-01-27 16:02:30 UTC (rev 307797) @@ -174,6 +174,10 @@ . Added nextRowset support. . Fixed bug #50755 (PDO DBLIB Fails with OOM). +- Improved PostgreSQL extension: + . Added support for extra parameter for PGNotify(). +(r dot i dot k at free dot fr, Ilia) + - Improved Reflection extension: (Johannes) . Added ReflectionExtension::isTemporary() and ReflectionExtension::isPersistent() methods. Modified: php/php-src/trunk/ext/pgsql/pgsql.c === --- php/php-src/trunk/ext/pgsql/pgsql.c 2011-01-27 15:37:38 UTC (rev 307796) +++ php/php-src/trunk/ext/pgsql/pgsql.c 2011-01-27 16:02:30 UTC (rev 307797) @@ -4782,10 +4782,24 @@ if (result_type PGSQL_NUM) { add_index_string(return_value, 0, pgsql_notify-relname, 1); add_index_long(return_value, 1, pgsql_notify-be_pid); +#if HAVE_PQPROTOCOLVERSION HAVE_PQPARAMETERSTATUS + if (PQprotocolVersion(pgsql) = 3 atof(PQparameterStatus(pgsql, server_version)) = 9.0) { +#else + if (atof(PG_VERSION) = 9.0) { +#endif + add_index_string(return_value, 2, pgsql_notify-extra, 1); + } } if (result_type PGSQL_ASSOC) { add_assoc_string(return_value, message, pgsql_notify-relname, 1); add_assoc_long(return_value, pid, pgsql_notify-be_pid); +#if HAVE_PQPROTOCOLVERSION HAVE_PQPARAMETERSTATUS + if (PQprotocolVersion(pgsql) = 3 atof(PQparameterStatus(pgsql, server_version)) = 9.0) { +#else + if (atof(PG_VERSION) = 9.0) { +#endif + add_assoc_string(return_value, payload, pgsql_notify-extra, 1); + } } PQfreemem(pgsql_notify); } -- 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/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/
kalleMon, 17 Jan 2011 10:43:53 + Revision: http://svn.php.net/viewvc?view=revisionrevision=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(stdClass)#6 (12) { +object(stdClass)#6 (13) { [%u|b%name]= %unicode|string%(3) foo [%u|b%orgname]= @@ -183,6 +191,8 @@
[PHP-CVS] svn: /php/php-src/trunk/ NEWS ext/intl/config.m4 ext/intl/config.w32 ext/intl/php_intl.c ext/intl/spoofchecker/spoofchecker.c ext/intl/spoofchecker/spoofchecker.h ext/intl/spoofchecker/spoof
scottmac Thu, 13 Jan 2011 06:53:09 + Revision: http://svn.php.net/viewvc?view=revisionrevision=307431 Log: Add Spoofchecker to intl extension. Implements part of Unicode TR36 and TR39 Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/ext/intl/config.m4 U php/php-src/trunk/ext/intl/config.w32 U php/php-src/trunk/ext/intl/php_intl.c A php/php-src/trunk/ext/intl/spoofchecker/ A php/php-src/trunk/ext/intl/spoofchecker/spoofchecker.c A php/php-src/trunk/ext/intl/spoofchecker/spoofchecker.h A php/php-src/trunk/ext/intl/spoofchecker/spoofchecker_class.c A php/php-src/trunk/ext/intl/spoofchecker/spoofchecker_class.h A php/php-src/trunk/ext/intl/spoofchecker/spoofchecker_create.c A php/php-src/trunk/ext/intl/spoofchecker/spoofchecker_create.h A php/php-src/trunk/ext/intl/spoofchecker/spoofchecker_main.c A php/php-src/trunk/ext/intl/spoofchecker/spoofchecker_main.h A php/php-src/trunk/ext/intl/tests/spoofchecker_001.phpt A php/php-src/trunk/ext/intl/tests/spoofchecker_002.phpt A php/php-src/trunk/ext/intl/tests/spoofchecker_003.phpt A php/php-src/trunk/ext/intl/tests/spoofchecker_004.phpt Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2011-01-12 23:41:54 UTC (rev 307430) +++ php/php-src/trunk/NEWS 2011-01-13 06:53:09 UTC (rev 307431) @@ -140,6 +140,10 @@ . Added FNV-1 hash support. (Michael Maclean) . Made Adler32 algorithm faster. FR #53213. (zavasek at yandex dot ru) +- Improved intl extension: + . Added Spoofchecker, allows checking for visibly confusable characters and +other security issues. (Scott) + - Improved JSON extension: . Added JsonSerializable interface. (Sara) . Added JSON_BIGINT_AS_STRING, extended json_decode() sig with $options. Modified: php/php-src/trunk/ext/intl/config.m4 === --- php/php-src/trunk/ext/intl/config.m4 2011-01-12 23:41:54 UTC (rev 307430) +++ php/php-src/trunk/ext/intl/config.m4 2011-01-13 06:53:09 UTC (rev 307431) @@ -58,7 +58,11 @@ transliterator/transliterator.c \ transliterator/transliterator_class.c \ transliterator/transliterator_methods.c \ -idn/idn.c, $ext_shared,,$ICU_INCS) +idn/idn.c \ +spoofchecker/spoofchecker_class.c \ +spoofchecker/spoofchecker.c\ +spoofchecker/spoofchecker_create.c\ +spoofchecker/spoofchecker_main.c, $ext_shared,,$ICU_INCS) PHP_ADD_BUILD_DIR($ext_builddir/collator) PHP_ADD_BUILD_DIR($ext_builddir/common) @@ -71,4 +75,5 @@ PHP_ADD_BUILD_DIR($ext_builddir/resourcebundle) PHP_ADD_BUILD_DIR($ext_builddir/transliterator) PHP_ADD_BUILD_DIR($ext_builddir/idn) + PHP_ADD_BUILD_DIR($ext_builddir/spoofchecker) fi Modified: php/php-src/trunk/ext/intl/config.w32 === --- php/php-src/trunk/ext/intl/config.w32 2011-01-12 23:41:54 UTC (rev 307430) +++ php/php-src/trunk/ext/intl/config.w32 2011-01-13 06:53:09 UTC (rev 307431) @@ -71,6 +71,12 @@ resourcebundle_class.c \ resourcebundle_iterator.c, intl); + ADD_SOURCES(configure_module_dirname + /spoofchecker, \ +spoofchecker.c \ +spoofchecker_class.c \ +spoofchecker_create.c \ +spoofchecker_main.c, +intl); ADD_SOURCES(configure_module_dirname + /transliterator, \ transliterator.c \ transliterator_class.c \ Modified: php/php-src/trunk/ext/intl/php_intl.c === --- php/php-src/trunk/ext/intl/php_intl.c 2011-01-12 23:41:54 UTC (rev 307430) +++ php/php-src/trunk/ext/intl/php_intl.c 2011-01-13 06:53:09 UTC (rev 307431) @@ -70,6 +70,11 @@ #include idn/idn.h +#include spoofchecker/spoofchecker_class.h +#include spoofchecker/spoofchecker.h +#include spoofchecker/spoofchecker_create.h +#include spoofchecker/spoofchecker_main.h + #include msgformat/msgformat.h #include common/common_error.h @@ -511,7 +516,7 @@ PHP_FE( resourcebundle_locales, arginfo_resourcebundle_locales_proc ) PHP_FE( resourcebundle_get_error_code, arginfo_resourcebundle_get_error_code_proc ) PHP_FE( resourcebundle_get_error_message, arginfo_resourcebundle_get_error_message_proc ) - + /* Transliterator functions */ PHP_FE( transliterator_create, arginfo_transliterator_create ) PHP_FE( transliterator_create_from_rules, arginfo_transliterator_create_from_rules ) @@ -633,6 +638,12 @@ /* Expose IDN constants to PHP scripts. */ idn_register_constants(INIT_FUNC_ARGS_PASSTHRU); + /* Register 'Spoofchecker' PHP class */ + spoofchecker_register_Spoofchecker_class( TSRMLS_C ); + + /* Expose Spoofchecker constants to PHP scripts */ + spoofchecker_register_constants( INIT_FUNC_ARGS_PASSTHRU ); + /* Global error handling. */ intl_error_init( NULL TSRMLS_CC ); Added:
[PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING ext/pdo_mysql/mysql_driver.c ext/pdo_mysql/php_pdo_mysql_int.h
kalleFri, 07 Jan 2011 14:39:56 + Revision: http://svn.php.net/viewvc?view=revisionrevision=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
Re: [PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING ext/pdo_mysql/mysql_driver.c ext/pdo_mysql/php_pdo_mysql_int.h
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=revisionrevision=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
Re: [PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING ext/pdo_mysql/mysql_driver.c ext/pdo_mysql/php_pdo_mysql_int.h
Hi Andrey 2011/1/7 Andrey Hristov p...@hristov.com: 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
[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/
kalleFri, 07 Jan 2011 18:25:55 + Revision: http://svn.php.net/viewvc?view=revisionrevision=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|string%(4) test [%u|b%max_length]= int(0) [%u|b%length]= @@ -136,7 +142,7 @@
[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
aharvey Thu, 06 Jan 2011 02:32:02 + Revision: http://svn.php.net/viewvc?view=revisionrevision=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-- +SPL:
[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
scottmac Fri, 31 Dec 2010 16:57:45 + Revision: http://svn.php.net/viewvc?view=revisionrevision=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. ?php $x = ''; // $x = null; // $x = false; $x-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.
[PHP-CVS] svn: /php/php-src/trunk/ NEWS
salathe Fri, 24 Dec 2010 07:28:59 + Revision: http://svn.php.net/viewvc?view=revisionrevision=306609 Log: NEWS for FR #48767 (SplFileInfo::getExtension()) Bug: http://bugs.php.net/48767 (Open) SplFileInfo::getExtension() Changed paths: U php/php-src/trunk/NEWS Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2010-12-24 07:03:35 UTC (rev 306608) +++ php/php-src/trunk/NEWS 2010-12-24 07:28:59 UTC (rev 306609) @@ -181,6 +181,7 @@ - Improved SPL extension: . Added SplObjectStorage::getHash() hook. (Etienne) + . Added SplFileInfo::getExtension(). FR #48767. (Peter Cowburn) - Improved ZLIB extension: . Re-implemented non-file related functionality. (Mike) -- 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
derick Sun, 12 Dec 2010 17:07:40 + Revision: http://svn.php.net/viewvc?view=revisionrevision=306270 Log: - Keep extension order alphabetically #- I guess that's what was intended? Changed paths: U php/php-src/trunk/NEWS Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2010-12-12 17:07:36 UTC (rev 306269) +++ php/php-src/trunk/NEWS 2010-12-12 17:07:40 UTC (rev 306270) @@ -125,14 +125,6 @@ . Added Tokyo Cabinet abstract DB support. (Michael Maclean) . Added Berkeley DB 5 support. (Johannes, Chris Jones) -- Improved MySQL extensions: - . MySQL: Deprecated mysql_list_dbs(). FR #50667. (Andrey) - . mysqlnd: Added named pipes support. FR #48082. (Andrey) - . MySQLi: Added iterator support in MySQLi. mysqli_result implements -Traversable. (Andrey, Johannes) - . 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) @@ -155,6 +147,14 @@ . Added paged results support. FR #42060. (a...@openldap.org, iaren...@eteo.mondragon.edu, jean...@au-fil-du.net, remy.sai...@gmail.com) +- Improved MySQL extensions: + . MySQL: Deprecated mysql_list_dbs(). FR #50667. (Andrey) + . mysqlnd: Added named pipes support. FR #48082. (Andrey) + . MySQLi: Added iterator support in MySQLi. mysqli_result implements +Traversable. (Andrey, Johannes) + . PDO_mysql: Removed support for linking with MySQL client libraries older +than 4.1. (Johannes) + - Improved OpenSSL extension: . Added AES support. FR #48632. (yonas dot y at gmail dot com, Pierre) . Added a no_ticket SSL context option to disable the SessionTicket TLS -- 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 ext/date/lib/parse_date.c ext/date/lib/parse_date.re ext/date/tests/bug51866.phpt
derick Sun, 12 Dec 2010 17:17:16 + Revision: http://svn.php.net/viewvc?view=revisionrevision=306273 Log: - Added the + modifier to parseFromFormat to allow trailing text in the string to parse without throwing an error. #- Patch by Stas, test case by me. Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/ext/date/lib/parse_date.c U php/php-src/trunk/ext/date/lib/parse_date.re A php/php-src/trunk/ext/date/tests/bug51866.phpt Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2010-12-12 17:12:29 UTC (rev 306272) +++ php/php-src/trunk/NEWS 2010-12-12 17:17:16 UTC (rev 306273) @@ -121,6 +121,10 @@ . Added support for CURLOPT_MAX_RECV_SPEED_LARGE and CURLOPT_MAX_SEND_SPEED_LARGE. FR #51815. (Pierrick) +- Improved Date extension: + . Added the + modifier to parseFromFormat to allow trailing text in the +string to parse without throwing an error. (Stas, Derick) + - Improved DBA extension: . Added Tokyo Cabinet abstract DB support. (Michael Maclean) . Added Berkeley DB 5 support. (Johannes, Chris Jones) Modified: php/php-src/trunk/ext/date/lib/parse_date.c === --- php/php-src/trunk/ext/date/lib/parse_date.c 2010-12-12 17:12:29 UTC (rev 306272) +++ php/php-src/trunk/ext/date/lib/parse_date.c 2010-12-12 17:17:16 UTC (rev 306273) @@ -1,4 +1,4 @@ -/* Generated by re2c 0.13.5 on Sat Nov 13 14:56:03 2010 */ +/* Generated by re2c 0.13.5 on Sun Dec 12 16:09:49 2010 */ #line 1 ext/date/lib/parse_date.re /* +--+ @@ -24824,6 +24824,7 @@ timelib_sll tmp; Scanner in; Scanner *s = in; + int allow_extra = 0; memset(in, 0, sizeof(in)); in.errors = malloc(sizeof(struct timelib_error_container)); @@ -25049,6 +25050,10 @@ timelib_eat_until_separator((char **) ptr); break; + case '+': /* allow extra chars in the format */ + allow_extra = 1; + break; + default: if (*fptr != *ptr) { add_pbf_error(s, The format separator does not match, string, begin); @@ -25058,8 +25063,16 @@ fptr++; } if (*ptr) { - add_pbf_error(s, Trailing data, string, ptr); + if (allow_extra) { + add_pbf_warning(s, Trailing data, string, ptr); + } else { + add_pbf_error(s, Trailing data, string, ptr); + } } + /* ignore trailing +'s */ + while (*fptr == '+') { + fptr++; + } if (*fptr) { add_pbf_error(s, Data missing, string, ptr); } Modified: php/php-src/trunk/ext/date/lib/parse_date.re === --- php/php-src/trunk/ext/date/lib/parse_date.re2010-12-12 17:12:29 UTC (rev 306272) +++ php/php-src/trunk/ext/date/lib/parse_date.re2010-12-12 17:17:16 UTC (rev 306273) @@ -1831,6 +1831,7 @@ timelib_sll tmp; Scanner in; Scanner *s = in; + int allow_extra = 0; memset(in, 0, sizeof(in)); in.errors = malloc(sizeof(struct timelib_error_container)); @@ -2056,6 +2057,10 @@ timelib_eat_until_separator((char **) ptr); break; + case '+': /* allow extra chars in the format */ + allow_extra = 1; + break; + default: if (*fptr != *ptr) { add_pbf_error(s, The format separator does not match, string, begin); @@ -2065,8 +2070,16 @@ fptr++; } if (*ptr) { - add_pbf_error(s, Trailing data, string, ptr); + if (allow_extra) { + add_pbf_warning(s, Trailing data, string, ptr); + } else { + add_pbf_error(s, Trailing data, string, ptr); + } } + /* ignore trailing +'s */ + while (*fptr == '+') { + fptr++; + } if (*fptr) { add_pbf_error(s, Data missing, string, ptr); } Added: php/php-src/trunk/ext/date/tests/bug51866.phpt === --- php/php-src/trunk/ext/date/tests/bug51866.phpt (rev 0) +++ php/php-src/trunk/ext/date/tests/bug51866.phpt 2010-12-12 17:17:16 UTC (rev 306273) @@ -0,0 +1,159 @@ +--TEST-- +Bug #51866 (Lenient parsing with
[PHP-CVS] svn: /php/php-src/trunk/ NEWS
iliaaSun, 12 Dec 2010 18:01:46 + Revision: http://svn.php.net/viewvc?view=revisionrevision=306279 Log: sqlite3 lib news Changed paths: U php/php-src/trunk/NEWS Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2010-12-12 18:00:25 UTC (rev 306278) +++ php/php-src/trunk/NEWS 2010-12-12 18:01:46 UTC (rev 306279) @@ -1,7 +1,7 @@ PHPNEWS ||| ?? ??? 201?, PHP 5.3.99 -- Upgraded bundled Sqlite3 to version 3.7.3. (Ilia) +- Upgraded bundled Sqlite3 to version 3.7.4. (Ilia) - Upgraded bundled PCRE to version 8.10. (Ilia) - Removed legacy features: -- 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 Zend/zend_compile.c Zend/zend_globals.h Zend/zend_multibyte.c Zend/zend_multibyte.h ext/exif/exif.c ext/mbstring/mbstring.c ext/standard/html.c main/rfc1867
Hi Moriyoshi, Ops, sorry. I didn't understand your disagreement, and I didn't see any other objections. So I committed the patch as it was planned. Could you prepare a patch on top of this one? I'm also going to look into your recommendation of moving mbstring.script_encoding into zend.script_encoding instead of zend.multibyte. Thanks. Dmitry. On 12/09/2010 09:02 AM, Moriyoshi Koizumi wrote: Please revert. On Thu, Dec 9, 2010 at 3:00 PM, Moriyoshi Koizumim...@mozo.jp wrote: Hey, I don't think there was agreement on this yet. I've actually been preparing a patch that minimizes the extra hook points in SAPI. Moriyoshi On Wed, Dec 8, 2010 at 8:27 PM, Dmitry Stogovdmi...@php.net wrote: dmitry Wed, 08 Dec 2010 11:27:34 + Revision: http://svn.php.net/viewvc?view=revisionrevision=306077 Log: Removed compile time dependency from ext/mbstring Changed paths: U php/php-src/trunk/NEWS 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_multibyte.c U php/php-src/trunk/Zend/zend_multibyte.h U php/php-src/trunk/ext/exif/exif.c U php/php-src/trunk/ext/mbstring/mbstring.c U php/php-src/trunk/ext/standard/html.c U php/php-src/trunk/main/rfc1867.c U php/php-src/trunk/main/rfc1867.h A php/php-src/trunk/tests/basic/028.phpt A php/php-src/trunk/tests/basic/029.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- 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 Zend/zend_compile.c Zend/zend_globals.h Zend/zend_multibyte.c Zend/zend_multibyte.h ext/exif/exif.c ext/mbstring/mbstring.c ext/standard/html.c main/rfc1867
I was thinking that this is rather a *big* change, so we'd better roll our patches into one and commit it altogether. I am fine if that works for anyone else. Regards, Moriyoshi On Thu, Dec 9, 2010 at 6:11 PM, Dmitry Stogov dmi...@zend.com wrote: Hi Moriyoshi, Ops, sorry. I didn't understand your disagreement, and I didn't see any other objections. So I committed the patch as it was planned. Could you prepare a patch on top of this one? I'm also going to look into your recommendation of moving mbstring.script_encoding into zend.script_encoding instead of zend.multibyte. Thanks. Dmitry. On 12/09/2010 09:02 AM, Moriyoshi Koizumi wrote: Please revert. On Thu, Dec 9, 2010 at 3:00 PM, Moriyoshi Koizumim...@mozo.jp wrote: Hey, I don't think there was agreement on this yet. I've actually been preparing a patch that minimizes the extra hook points in SAPI. Moriyoshi On Wed, Dec 8, 2010 at 8:27 PM, Dmitry Stogovdmi...@php.net wrote: dmitry Wed, 08 Dec 2010 11:27:34 + Revision: http://svn.php.net/viewvc?view=revisionrevision=306077 Log: Removed compile time dependency from ext/mbstring Changed paths: U php/php-src/trunk/NEWS 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_multibyte.c U php/php-src/trunk/Zend/zend_multibyte.h U php/php-src/trunk/ext/exif/exif.c U php/php-src/trunk/ext/mbstring/mbstring.c U php/php-src/trunk/ext/standard/html.c U php/php-src/trunk/main/rfc1867.c U php/php-src/trunk/main/rfc1867.h A php/php-src/trunk/tests/basic/028.phpt A php/php-src/trunk/tests/basic/029.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- 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 Zend/zend_compile.c Zend/zend_globals.h Zend/zend_multibyte.c Zend/zend_multibyte.h ext/exif/exif.c ext/mbstring/mbstring.c ext/standard/html.c main/rfc1867
On 12/09/2010 08:51 PM, Moriyoshi Koizumi wrote: I was thinking that this is rather a *big* change, so we'd better roll our patches into one and commit it altogether. Sorry, that time I didn't understand that you started to improve the patch. I am fine if that works for anyone else. The patch had few small issues, but they are already fixed. Thanks. Dmitry. Regards, Moriyoshi On Thu, Dec 9, 2010 at 6:11 PM, Dmitry Stogovdmi...@zend.com wrote: Hi Moriyoshi, Ops, sorry. I didn't understand your disagreement, and I didn't see any other objections. So I committed the patch as it was planned. Could you prepare a patch on top of this one? I'm also going to look into your recommendation of moving mbstring.script_encoding into zend.script_encoding instead of zend.multibyte. Thanks. Dmitry. On 12/09/2010 09:02 AM, Moriyoshi Koizumi wrote: Please revert. On Thu, Dec 9, 2010 at 3:00 PM, Moriyoshi Koizumim...@mozo.jpwrote: Hey, I don't think there was agreement on this yet. I've actually been preparing a patch that minimizes the extra hook points in SAPI. Moriyoshi On Wed, Dec 8, 2010 at 8:27 PM, Dmitry Stogovdmi...@php.netwrote: dmitry Wed, 08 Dec 2010 11:27:34 + Revision: http://svn.php.net/viewvc?view=revisionrevision=306077 Log: Removed compile time dependency from ext/mbstring Changed paths: U php/php-src/trunk/NEWS 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_multibyte.c U php/php-src/trunk/Zend/zend_multibyte.h U php/php-src/trunk/ext/exif/exif.c U php/php-src/trunk/ext/mbstring/mbstring.c U php/php-src/trunk/ext/standard/html.c U php/php-src/trunk/main/rfc1867.c U php/php-src/trunk/main/rfc1867.h A php/php-src/trunk/tests/basic/028.phpt A php/php-src/trunk/tests/basic/029.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- 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 Zend/zend_compile.c Zend/zend_globals.h Zend/zend_multibyte.c Zend/zend_multibyte.h ext/exif/exif.c ext/mbstring/mbstring.c ext/standard/html.c main/rfc1867.c m
dmitry Wed, 08 Dec 2010 11:27:34 + Revision: http://svn.php.net/viewvc?view=revisionrevision=306077 Log: Removed compile time dependency from ext/mbstring Changed paths: U php/php-src/trunk/NEWS 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_multibyte.c U php/php-src/trunk/Zend/zend_multibyte.h U php/php-src/trunk/ext/exif/exif.c U php/php-src/trunk/ext/mbstring/mbstring.c U php/php-src/trunk/ext/standard/html.c U php/php-src/trunk/main/rfc1867.c U php/php-src/trunk/main/rfc1867.h A php/php-src/trunk/tests/basic/028.phpt A php/php-src/trunk/tests/basic/029.phpt Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2010-12-08 09:38:47 UTC (rev 306076) +++ php/php-src/trunk/NEWS 2010-12-08 11:27:34 UTC (rev 306077) @@ -32,6 +32,7 @@ . 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) + . Removed compile time dependency from ext/mbstring (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/Zend/zend_compile.c === --- php/php-src/trunk/Zend/zend_compile.c 2010-12-08 09:38:47 UTC (rev 306076) +++ php/php-src/trunk/Zend/zend_compile.c 2010-12-08 11:27:34 UTC (rev 306077) @@ -200,9 +200,6 @@ CG(script_encoding_list) = NULL; CG(script_encoding_list_size) = 0; CG(internal_encoding) = NULL; - CG(encoding_detector) = NULL; - CG(encoding_converter) = NULL; - CG(encoding_oddlen) = NULL; CG(encoding_declared) = 0; } /* }}} */ Modified: php/php-src/trunk/Zend/zend_globals.h === --- php/php-src/trunk/Zend/zend_globals.h 2010-12-08 09:38:47 UTC (rev 306076) +++ php/php-src/trunk/Zend/zend_globals.h 2010-12-08 11:27:34 UTC (rev 306077) @@ -155,11 +155,6 @@ zend_encoding *internal_encoding; - /* multibyte utility functions */ - zend_encoding_detector encoding_detector; - zend_encoding_converter encoding_converter; - zend_encoding_oddlen encoding_oddlen; - #ifdef ZTS zval ***static_members_table; int last_static_member; Modified: php/php-src/trunk/Zend/zend_multibyte.c === --- php/php-src/trunk/Zend/zend_multibyte.c 2010-12-08 09:38:47 UTC (rev 306076) +++ php/php-src/trunk/Zend/zend_multibyte.c 2010-12-08 11:27:34 UTC (rev 306077) @@ -513,8 +513,37 @@ NULL }; +static char* dummy_encoding_detector(const unsigned char *string, size_t length, char *list TSRMLS_DC) +{ + return NULL; +} +static int dummy_encoding_converter(unsigned char **to, size_t *to_length, const unsigned char *from, size_t from_length, const char *encoding_to, const char *encoding_from TSRMLS_DC) +{ + return -1; +} +static size_t dummy_encoding_oddlen(const unsigned char *string, size_t length, const char *encoding TSRMLS_DC) +{ + return 0; +} + +static int dummy_encoding_list_checker(const char *encoding_list TSRMLS_DC) +{ + return 0; +} + +static const char* dummy_get_internal_encoding(TSRMLS_D) +{ + return NULL; +} + +ZEND_API zend_encoding_detector zend_multibyte_encoding_detector = dummy_encoding_detector; +ZEND_API zend_encoding_converter zend_multibyte_encoding_converter = dummy_encoding_converter; +ZEND_API zend_encoding_oddlen zend_multibyte_encoding_oddlen = dummy_encoding_oddlen; +ZEND_API zend_encoding_list_checker zend_multibyte_check_encoding_list = dummy_encoding_list_checker; +ZEND_API zend_encoding_name_getter zend_multibyte_get_internal_encoding = dummy_get_internal_encoding; + ZEND_API int zend_multibyte_set_script_encoding(const char *encoding_list, size_t encoding_list_size TSRMLS_DC) { @@ -540,11 +569,13 @@ return 0; } -ZEND_API int zend_multibyte_set_functions(zend_encoding_detector encoding_detector, zend_encoding_converter encoding_converter, zend_encoding_oddlen encoding_oddlen TSRMLS_DC) +ZEND_API int zend_multibyte_set_functions(zend_encoding_detector encoding_detector, zend_encoding_converter encoding_converter, zend_encoding_oddlen encoding_oddlen, zend_encoding_list_checker encoding_list_checker, zend_encoding_name_getter get_internal_encoding TSRMLS_DC) { - CG(encoding_detector) = encoding_detector; - CG(encoding_converter) = encoding_converter; - CG(encoding_oddlen) = encoding_oddlen; + zend_multibyte_encoding_detector = encoding_detector; + zend_multibyte_encoding_converter = encoding_converter; + zend_multibyte_encoding_oddlen = encoding_oddlen; + zend_multibyte_check_encoding_list = encoding_list_checker; + zend_multibyte_get_internal_encoding =
Re: [PHP-CVS] svn: /php/php-src/trunk/ NEWS Zend/zend_compile.c Zend/zend_globals.h Zend/zend_multibyte.c Zend/zend_multibyte.h ext/exif/exif.c ext/mbstring/mbstring.c ext/standard/html.c main/rfc1867
Hello Dmitry. After this update ext/exif always produces these warnings: # php -v PHP Warning: PHP Startup: Illegal encoding ignored: 'ISO-8859-15' in Unknown on line 0 PHP Warning: PHP Startup: Illegal encoding ignored: 'UCS-2BE' in Unknown on line 0 PHP Warning: PHP Startup: Illegal encoding ignored: 'UCS-2LE' in Unknown on line 0 PHP Warning: PHP Startup: Illegal encoding ignored: 'JIS' in Unknown on line 0 PHP Warning: PHP Startup: Illegal encoding ignored: 'JIS' in Unknown on line 0 PHP 5.3.99-dev (cli) (built: Dec 8 2010 14:37:43) (DEBUG) Copyright (c) 1997-2010 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2010 Zend Technologies On 12/08/2010 02:27 PM, Dmitry Stogov wrote: dmitry Wed, 08 Dec 2010 11:27:34 + Revision: http://svn.php.net/viewvc?view=revisionrevision=306077 Log: Removed compile time dependency from ext/mbstring Changed paths: U php/php-src/trunk/NEWS 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_multibyte.c U php/php-src/trunk/Zend/zend_multibyte.h U php/php-src/trunk/ext/exif/exif.c U php/php-src/trunk/ext/mbstring/mbstring.c U php/php-src/trunk/ext/standard/html.c U php/php-src/trunk/main/rfc1867.c U php/php-src/trunk/main/rfc1867.h A php/php-src/trunk/tests/basic/028.phpt A php/php-src/trunk/tests/basic/029.phpt -- Wbr, Antony Dovgal --- http://pinba.org - realtime statistics for PHP -- 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 Zend/zend_compile.c Zend/zend_globals.h Zend/zend_multibyte.c Zend/zend_multibyte.h ext/exif/exif.c ext/mbstring/mbstring.c ext/standard/html.c main/rfc1867
Hey, I don't think there was agreement on this yet. I've actually been preparing a patch that minimizes the extra hook points in SAPI. Moriyoshi On Wed, Dec 8, 2010 at 8:27 PM, Dmitry Stogov dmi...@php.net wrote: dmitry Wed, 08 Dec 2010 11:27:34 + Revision: http://svn.php.net/viewvc?view=revisionrevision=306077 Log: Removed compile time dependency from ext/mbstring Changed paths: U php/php-src/trunk/NEWS 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_multibyte.c U php/php-src/trunk/Zend/zend_multibyte.h U php/php-src/trunk/ext/exif/exif.c U php/php-src/trunk/ext/mbstring/mbstring.c U php/php-src/trunk/ext/standard/html.c U php/php-src/trunk/main/rfc1867.c U php/php-src/trunk/main/rfc1867.h A php/php-src/trunk/tests/basic/028.phpt A php/php-src/trunk/tests/basic/029.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- 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 Zend/zend_compile.c Zend/zend_globals.h Zend/zend_multibyte.c Zend/zend_multibyte.h ext/exif/exif.c ext/mbstring/mbstring.c ext/standard/html.c main/rfc1867
Please revert. On Thu, Dec 9, 2010 at 3:00 PM, Moriyoshi Koizumi m...@mozo.jp wrote: Hey, I don't think there was agreement on this yet. I've actually been preparing a patch that minimizes the extra hook points in SAPI. Moriyoshi On Wed, Dec 8, 2010 at 8:27 PM, Dmitry Stogov dmi...@php.net wrote: dmitry Wed, 08 Dec 2010 11:27:34 + Revision: http://svn.php.net/viewvc?view=revisionrevision=306077 Log: Removed compile time dependency from ext/mbstring Changed paths: U php/php-src/trunk/NEWS 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_multibyte.c U php/php-src/trunk/Zend/zend_multibyte.h U php/php-src/trunk/ext/exif/exif.c U php/php-src/trunk/ext/mbstring/mbstring.c U php/php-src/trunk/ext/standard/html.c U php/php-src/trunk/main/rfc1867.c U php/php-src/trunk/main/rfc1867.h A php/php-src/trunk/tests/basic/028.phpt A php/php-src/trunk/tests/basic/029.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- 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 ext/openssl/xp_ssl.c
aharvey Fri, 03 Dec 2010 09:34:35 + Revision: http://svn.php.net/viewvc?view=revisionrevision=305936 Log: Implemented FR #53447 (Cannot disable SessionTicket extension for servers that do not support it). I haven't written a test due to the need for such a test to have a HTTPS server available which mishandles SessionTicket requests; it's likely that server administrators will gradually fix this either intentionally or through OpenSSL upgrades. That said, if there's a great clamoring for a test, I'll work one up. Bug: http://bugs.php.net/53447 (Assigned) Cannot disable SessionTicket extension for servers that do not support it Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/ext/openssl/xp_ssl.c Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2010-12-03 09:11:31 UTC (rev 305935) +++ php/php-src/trunk/NEWS 2010-12-03 09:34:35 UTC (rev 305936) @@ -152,6 +152,8 @@ - Improved OpenSSL extension: . Added AES support. FR #48632. (yonas dot y at gmail dot com, Pierre) + . Added a no_ticket SSL context option to disable the SessionTicket TLS +extension. FR #53447. (Adam) - Improved PDO DB-LIB: (Stanley) . Added nextRowset support. Modified: php/php-src/trunk/ext/openssl/xp_ssl.c === --- php/php-src/trunk/ext/openssl/xp_ssl.c 2010-12-03 09:11:31 UTC (rev 305935) +++ php/php-src/trunk/ext/openssl/xp_ssl.c 2010-12-03 09:34:35 UTC (rev 305936) @@ -369,6 +369,18 @@ SSL_CTX_set_options(sslsock-ctx, SSL_OP_ALL); +#if OPENSSL_VERSION_NUMBER = 0x0090806fL + { + zval **val; + + if (SUCCESS == php_stream_context_get_option( + stream-context, ssl, no_ticket, val) + zval_is_true(*val)) { + SSL_CTX_set_options(sslsock-ctx, SSL_OP_NO_TICKET); + } + } +#endif + sslsock-ssl_handle = php_SSL_new_from_context(sslsock-ctx, stream TSRMLS_CC); if (sslsock-ssl_handle == NULL) { php_error_docref(NULL TSRMLS_CC, E_WARNING, failed to create an SSL handle); -- 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/math.c ext/standard/php_math.h ext/standard/tests/math/number_format_multichar.phpt
aharvey Fri, 03 Dec 2010 10:10:08 + Revision: http://svn.php.net/viewvc?view=revisionrevision=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 apos; 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
aharvey Fri, 26 Nov 2010 09:52:28 + Revision: http://svn.php.net/viewvc?view=revisionrevision=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 (rev 0)
[PHP-CVS] svn: /php/php-src/trunk/ NEWS Zend/zend_compile.c Zend/zend_execute.c Zend/zend_vm_def.h Zend/zend_vm_execute.h
dmitry Wed, 24 Nov 2010 12:19:56 + Revision: http://svn.php.net/viewvc?view=revisionrevision=305716 Log: Removed support for break/continue $var syntax Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/Zend/zend_compile.c U php/php-src/trunk/Zend/zend_execute.c U php/php-src/trunk/Zend/zend_vm_def.h U php/php-src/trunk/Zend/zend_vm_execute.h Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2010-11-24 11:56:24 UTC (rev 305715) +++ php/php-src/trunk/NEWS 2010-11-24 12:19:56 UTC (rev 305716) @@ -5,6 +5,7 @@ - Upgraded bundled PCRE to version 8.10. (Ilia) - Removed legacy features: + . break/continue $var syntax. (Dmitry) . Safe mode and all related ini options. (Kalle) . register_globals and register_long_arrays ini options. (Kalle) . import_request_variables(). (Kalle) Modified: php/php-src/trunk/Zend/zend_compile.c === --- php/php-src/trunk/Zend/zend_compile.c 2010-11-24 11:56:24 UTC (rev 305715) +++ php/php-src/trunk/Zend/zend_compile.c 2010-11-24 12:19:56 UTC (rev 305716) @@ -4302,6 +4302,11 @@ opline-op1.opline_num = CG(context).current_brk_cont; SET_UNUSED(opline-op1); if (expr) { + if (expr-op_type != IS_CONST) { + zend_error(E_COMPILE_ERROR, '%s' operator with non-constant operand is no longer supported, op == ZEND_BRK ? break : continue); + } else if (Z_TYPE(expr-u.constant) != IS_LONG || Z_LVAL(expr-u.constant) 1) { + zend_error(E_COMPILE_ERROR, '%s' operator accepts only positive numbers, op == ZEND_BRK ? break : continue); + } SET_NODE(opline-op2, expr); } else { LITERAL_LONG(opline-op2, 1); Modified: php/php-src/trunk/Zend/zend_execute.c === --- php/php-src/trunk/Zend/zend_execute.c 2010-11-24 11:56:24 UTC (rev 305715) +++ php/php-src/trunk/Zend/zend_execute.c 2010-11-24 12:19:56 UTC (rev 305716) @@ -1362,21 +1362,12 @@ } } -static inline zend_brk_cont_element* zend_brk_cont(zval *nest_levels_zval, int array_offset, const zend_op_array *op_array, const temp_variable *Ts TSRMLS_DC) +static inline zend_brk_cont_element* zend_brk_cont(int nest_levels, int array_offset, const zend_op_array *op_array, const temp_variable *Ts TSRMLS_DC) { zval tmp; - int nest_levels, original_nest_levels; + int original_nest_levels = nest_levels; zend_brk_cont_element *jmp_to; - if (nest_levels_zval-type != IS_LONG) { - tmp = *nest_levels_zval; - zval_copy_ctor(tmp); - convert_to_long(tmp); - nest_levels = tmp.value.lval; - } else { - nest_levels = nest_levels_zval-value.lval; - } - original_nest_levels = nest_levels; do { if (array_offset==-1) { zend_error_noreturn(E_ERROR, Cannot break/continue %d level%s, original_nest_levels, (original_nest_levels == 1) ? : s); Modified: php/php-src/trunk/Zend/zend_vm_def.h === --- php/php-src/trunk/Zend/zend_vm_def.h 2010-11-24 11:56:24 UTC (rev 305715) +++ php/php-src/trunk/Zend/zend_vm_def.h 2010-11-24 12:19:56 UTC (rev 305716) @@ -3171,27 +3171,25 @@ ZEND_VM_NEXT_OPCODE(); } -ZEND_VM_HANDLER(50, ZEND_BRK, ANY, CONST|TMP|VAR|CV) +ZEND_VM_HANDLER(50, ZEND_BRK, ANY, CONST) { USE_OPLINE - zend_free_op free_op2; zend_brk_cont_element *el; SAVE_OPLINE(); - el = zend_brk_cont(GET_OP2_ZVAL_PTR(BP_VAR_R), opline-op1.opline_num, + el = zend_brk_cont(Z_LVAL_P(opline-op2.zv), opline-op1.opline_num, EX(op_array), EX_Ts() TSRMLS_CC); FREE_OP2(); ZEND_VM_JMP(EX(op_array)-opcodes + el-brk); } -ZEND_VM_HANDLER(51, ZEND_CONT, ANY, CONST|TMP|VAR|CV) +ZEND_VM_HANDLER(51, ZEND_CONT, ANY, CONST) { USE_OPLINE - zend_free_op free_op2; zend_brk_cont_element *el; SAVE_OPLINE(); - el = zend_brk_cont(GET_OP2_ZVAL_PTR(BP_VAR_R), opline-op1.opline_num, + el = zend_brk_cont(Z_LVAL_P(opline-op2.zv), opline-op1.opline_num, EX(op_array), EX_Ts() TSRMLS_CC); FREE_OP2(); ZEND_VM_JMP(EX(op_array)-opcodes + el-cont); @@ -3204,7 +3202,7 @@ zend_brk_cont_element *el; SAVE_OPLINE(); - el = zend_brk_cont(opline-op2.zv, opline-extended_value, + el = zend_brk_cont(Z_LVAL_P(opline-op2.zv), opline-extended_value, EX(op_array), EX_Ts() TSRMLS_CC); brk_opline = EX(op_array)-opcodes + el-brk; Modified: php/php-src/trunk/Zend/zend_vm_execute.h === --- php/php-src/trunk/Zend/zend_vm_execute.h 2010-11-24 11:56:24 UTC (rev 305715) +++ php/php-src/trunk/Zend/zend_vm_execute.h 2010-11-24 12:19:56 UTC (rev 305716) @@ -1304,11 +1304,10 @@ static int ZEND_FASTCALL ZEND_BRK_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { USE_OPLINE - zend_brk_cont_element *el; SAVE_OPLINE(); - el = zend_brk_cont(opline-op2.zv, opline-op1.opline_num, + el =
[PHP-CVS] svn: /php/php-src/trunk/ NEWS
andi Wed, 24 Nov 2010 04:31:45 + Revision: http://svn.php.net/viewvc?view=revisionrevision=305709 Log: - Fix typo Changed paths: U php/php-src/trunk/NEWS Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2010-11-24 00:56:15 UTC (rev 305708) +++ php/php-src/trunk/NEWS 2010-11-24 04:31:45 UTC (rev 305709) @@ -61,7 +61,7 @@ in zend_class_entry.ce_flags. . Reduced the size of zend_class_entry by sharing the same memory space by different information for internal and user classes. -See zend_class_inttry.info union. +See zend_class_entry.info union. . Reduced size of temp_variable. - Changed the structure of op_array.opcodes. The constant values are moved from -- 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 Zend/tests/declare_001.phpt Zend/tests/declare_002.phpt Zend/tests/multibyte/multibyte_encoding_001.phpt Zend/tests/multibyte/multibyte_e
dmitry Wed, 24 Nov 2010 05:41:23 + Revision: http://svn.php.net/viewvc?view=revisionrevision=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-- ?php -if (in_array(detect_unicode,
[PHP-CVS] svn: /php/php-src/trunk/ NEWS
johannes Fri, 19 Nov 2010 10:00:10 + Revision: http://svn.php.net/viewvc?view=revisionrevision=305556 Log: Add entry for sqlite Changed paths: U php/php-src/trunk/NEWS Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2010-11-19 09:55:48 UTC (rev 30) +++ php/php-src/trunk/NEWS 2010-11-19 10:00:10 UTC (rev 305556) @@ -17,6 +17,9 @@ functions. (Kalle) . y2k_compliance ini option. (Kalle) +- Moved extensions to PECL: (Johannes) + . ext/sqlite. + - Changed $_SERVER['REQUEST_TIME'] to include microsecond precision. (Ilia) - Changed default value of default_charset php.ini option from ISO-8859-1 to UTF-8. (Rasmus) -- 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
jani Wed, 17 Nov 2010 16:56:21 + Revision: http://svn.php.net/viewvc?view=revisionrevision=305465 Log: - NEWS cleanup, please do not mess it anymore :) Changed paths: U php/php-src/trunk/NEWS diffs exceeded maximum size -- 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
sixd Wed, 17 Nov 2010 17:59:41 + Revision: http://svn.php.net/viewvc?view=revisionrevision=305468 Log: Some grammar tweaks Changed paths: U php/php-src/trunk/NEWS Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2010-11-17 17:55:18 UTC (rev 305467) +++ php/php-src/trunk/NEWS 2010-11-17 17:59:41 UTC (rev 305468) @@ -45,7 +45,7 @@ . Replaced zend_function.return_reference by ZEND_ACC_RETURN_REFERENCE in zend_function.fn_flags. . Removed zend_arg_info.required_num_args as it was only needed for internal -functions. Now the first arg_info for internal function (which has special +functions. Now the first arg_info for internal functions (which has special meaning) is represented by zend_internal_function_info structure. . Moved zend_op_array.size, size_var, size_literal, current_brk_cont, backpatch_count into CG(context) as they are used only during compilation. @@ -79,22 +79,21 @@ . ZEND_RECV now always has IS_CV as its result. . ZEND_CATCH now has to be used only with constant class names. . ZEND_FETCH_DIM_? may fetch array and dimension operands in different order. - . ZEND_FETCH_*_R operations simplified and can't be used with EXT_TYPE_UNUSED -flag any more. This is very rare and useless case. ZEND_FREE might be -required after them instead. - . ZEND_RETURN is splitted into two new instructions ZEND_RETURN and + . Simplified ZEND_FETCH_*_R operations. They can't be used with the +EXT_TYPE_UNUSED flag any more. This is a very rare and useless case. +ZEND_FREE might be required after them instead. + . Split ZEND_RETURN into two new instructions ZEND_RETURN and ZEND_RETURN_BY_REF. . Optimized access to global constants using values with pre-calculated -hash_values from literals table. +hash_values from the literals table. . Optimized access to static properties using executor specialization. A constant class name may be used as a direct operand of ZEND_FETCH_* instruction without previous ZEND_FETCH_CLASS. - . zend_stack and zend_ptr_stack allocation is delayed before the actual -usage. + . zend_stack and zend_ptr_stack allocation is delayed until actual usage. - Improved CLI SAPI: (Johannes) - . Added command line option --rz name which shows information of named -Zend extension. + . Added command line option --rz name which shows information of the +named Zend extension. . Interactive readline shell improvements: . Added cli.pager php.ini setting to set a pager for output. . Added cli.prompt php.ini setting to configure the shell prompt. -- 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 acinclude.m4 configure.in
jani Sat, 13 Nov 2010 11:12:07 + Revision: http://svn.php.net/viewvc?view=revisionrevision=305312 Log: - WS + cleanup # Note: # Considering DTrace support: Why does it really need any configure time stuff? # 3 macros for static stuff that could be made much cleaner with simple Makefile.dtrace # addition. The only thing required in configure is that --enable flag part.. # Bug: http://bugs.php.net/3 (Closed) extern for errno missing in debugger.c Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/acinclude.m4 U php/php-src/trunk/configure.in Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2010-11-13 11:07:38 UTC (rev 305311) +++ php/php-src/trunk/NEWS 2010-11-13 11:12:07 UTC (rev 305312) @@ -1,14 +1,17 @@ -PHP NEWS +PHPNEWS ||| ?? ??? 201?, PHP 5.3.99 - Upgraded bundled sqlite to version 3.7.3. (Ilia) - Upgraded bundled PCRE to version 8.10. (Ilia) -- Updated _SERVER['REQUEST_TIME'] to include microsecond precision. (Ilia) +- Changed $_SERVER['REQUEST_TIME'] to include microsecond precision. (Ilia) + - Added apache compatible functions (apache_child_terminate, getallheaders, - apache_request_headers, apache_response_headers) to FastCGI SAPI (Dmitry) + apache_request_headers, apache_response_headers) to FastCGI SAPI. (Dmitry) + - Added caches to eliminate repeatable run-time bindings of functions, classes, - constants, methods and properties (Dmitry) + constants, methods and properties. (Dmitry) + - Added a number of small performance tweaks and optimizations (Dmitry) . ZEND_RECV now always has IS_CV as its result . ZEND_CATCH now has to be used only with constant class names @@ -30,44 +33,55 @@ required after them instead. . improved performance of FastCGI request parsing . improved performance of @ (silence) operator + - Added concept of interned strings. All strings constants known at compile time are allocated in a single copy and never changed. (Dmitry) - Added an optimization which saves memory and emalloc/efree calls for empty - HashTables (Stas, Dmitry) + HashTables. (Stas, Dmitry) -- Added named pipes support in mysqlnd (Request#48082). (Andrey) +- Added named pipes support in mysqlnd (FR #48082). (Andrey) - Added support for Traits. (Stefan) - Added array dereferencing support. (Felipe) - Added DTrace support. (David Soria Parra) - Added Tokyo Cabinet abstract DB support to ext/dba. (Michael Maclean) +- Added Berkeley DB 5 support to the DBA extension (Johannes, Chris Jones) + - Added Jenkins's one-at-a-time hash support to ext/hash. (Martin Jansen) - Added FNV-1 hash support to ext/hash. (Michael Maclean) -- Added ReflectionExtension::isTemporary() and - ReflectionExtension::isPersistent(). (Johannes) + +- Added ReflectionExtension::isTemporary() and ReflectionExtension::isPersistent(). (Johannes) - Added ReflectionZendExtension class. (Johannes) - Added ReflectionClass::isCloneable(). (Felipe) + - Added command line option --rz to CLI. (Johannes) + - Added closure $this support back. (Stas) + - Added SplObjectStorage::getHash() hook. (Etienne) -- Added JsonSerializable interface (Sara) + +- Added JsonSerializable interface. (Sara) - Added JSON_BIGINT_AS_STRING, extended json_decode() sig with $options. (Sara) +- Added support for JSON_NUMERIC_CHECK option in json_encode() that converts + numeric strings to integers. (Ilia) + - 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) + (FR #51815). (Pierrick) + - Added iterator support in MySQLi. mysqli_result implements Traversable. (Andrey, Johannes) + - Added scalar typehints to the parser and the reflection API. (Ilia, Derick) -- Added support for JSON_NUMERIC_CHECK option in json_encode() that converts - numeric strings to integers. (Ilia) -- Added support for object references in recursive serialize() calls. FR #36424. - (Mike) -- Added Berkeley DB 5 support to the DBA extension (Johannes, Chris Jones) +- Added support for object references in recursive serialize() calls. (FR #36424). (Mike) + - default_charset if not specified is now UTF-8 instead of ISO-8859-1. (Rasmus) - Changed the structure of op_array.opcodes. The constant values are moved from opcode operands into a separate literal table. (Dmitry) + - Changed session.entropy_file to default to /dev/urandom or /dev/arandom if either is present at compile time. (Rasmus) @@ -142,6 +156,7 @@ - Fixed bug #52211 (iconv() returns part of string on
[PHP-CVS] svn: /php/php-src/trunk/ NEWS ext/hash/hash_adler32.c
aharvey Mon, 08 Nov 2010 09:35:33 + Revision: http://svn.php.net/viewvc?view=revisionrevision=305193 Log: Implemented FR #53213 (Adler32 algorithm is very slow). Patch by zavasek at yandex dot ru. Bug: http://bugs.php.net/53213 (error getting bug information) Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/ext/hash/hash_adler32.c Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2010-11-08 09:29:15 UTC (rev 305192) +++ php/php-src/trunk/NEWS 2010-11-08 09:35:33 UTC (rev 305193) @@ -124,6 +124,8 @@ - Implemented FR #53238 (Make third parameter of preg_match_all optional). (Adam) +- Implemented FR #53213 (Adler32 algorithm is very slow). + (zavasek at yandex dot ru) - 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/ext/hash/hash_adler32.c === --- php/php-src/trunk/ext/hash/hash_adler32.c 2010-11-08 09:29:15 UTC (rev 305192) +++ php/php-src/trunk/ext/hash/hash_adler32.c 2010-11-08 09:35:33 UTC (rev 305193) @@ -34,9 +34,16 @@ s[0] = context-state 0x; s[1] = (context-state 16) 0x; for (i = 0; i len; ++i) { - s[0] = (s[0] + input[i]) % 65521; - s[1] = (s[1] + s[0]) % 65521; + s[0] += input[i]; + s[1] += s[0]; + if (s[1]=0x7fff) + { + s[0] = s[0] % 65521; + s[1] = s[1] % 65521; + } } + s[0] = s[0] % 65521; + s[1] = s[1] % 65521; context-state = s[0] + (s[1] 16); } -- 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 main/SAPI.c main/SAPI.h main/php_variables.c sapi/apache/mod_php5.c sapi/apache2filter/sapi_apache2.c sapi/apache2handler/sapi_apache2.c sapi/nsapi/nsapi.c
Done, thanks for the reminder. On Sat, Nov 6, 2010 at 6:49 PM, Pierre Joye pierre@gmail.com wrote: hi Ilia, Please add a note to the UPGRADING file. Thanks! On Sat, Nov 6, 2010 at 6:14 PM, Ilia Alshanetsky il...@php.net wrote: iliaa Sat, 06 Nov 2010 17:14:21 + Revision: http://svn.php.net/viewvc?view=revisionrevision=305129 Log: Updated _SERVER['REQUEST_TIME'] to include microsecond precision. Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/main/SAPI.c U php/php-src/trunk/main/SAPI.h U php/php-src/trunk/main/php_variables.c U php/php-src/trunk/sapi/apache/mod_php5.c U php/php-src/trunk/sapi/apache2filter/sapi_apache2.c U php/php-src/trunk/sapi/apache2handler/sapi_apache2.c U php/php-src/trunk/sapi/nsapi/nsapi.c Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2010-11-06 16:24:58 UTC (rev 305128) +++ php/php-src/trunk/NEWS 2010-11-06 17:14:21 UTC (rev 305129) @@ -4,6 +4,7 @@ - Upgraded bundled sqlite to version 3.7.3. (Ilia) - Upgraded bundled PCRE to version 8.10. (Ilia) +- Updated _SERVER['REQUEST_TIME'] to include microsecond precision. (Ilia) - Added apache compatible functions (apache_child_terminate, getallheaders, apache_request_headers, apache_response_headers) to FastCGI SAPI (Dmitry) - Added caches to eliminate repeatable run-time bindings of functions, classes, Modified: php/php-src/trunk/main/SAPI.c === --- php/php-src/trunk/main/SAPI.c 2010-11-06 16:24:58 UTC (rev 305128) +++ php/php-src/trunk/main/SAPI.c 2010-11-06 17:14:21 UTC (rev 305129) @@ -961,14 +961,19 @@ } } -SAPI_API time_t sapi_get_request_time(TSRMLS_D) +SAPI_API double sapi_get_request_time(TSRMLS_D) { if(SG(global_request_time)) return SG(global_request_time); if (sapi_module.get_request_time SG(server_context)) { SG(global_request_time) = sapi_module.get_request_time(TSRMLS_C); } else { - SG(global_request_time) = time(0); + struct timeval tp = {0}; + if (!gettimeofday(tp, NULL)) { + SG(global_request_time) = (double)(tp.tv_sec + tp.tv_usec / 100.00); + } else { + SG(global_request_time) = (double)time(0); + } } return SG(global_request_time); } Modified: php/php-src/trunk/main/SAPI.h === --- php/php-src/trunk/main/SAPI.h 2010-11-06 16:24:58 UTC (rev 305128) +++ php/php-src/trunk/main/SAPI.h 2010-11-06 17:14:21 UTC (rev 305129) @@ -129,7 +129,7 @@ long post_max_size; int options; zend_bool sapi_started; - time_t global_request_time; + double global_request_time; HashTable known_post_content_types; } sapi_globals_struct; @@ -208,7 +208,7 @@ SAPI_API int sapi_get_target_uid(uid_t * TSRMLS_DC); SAPI_API int sapi_get_target_gid(gid_t * TSRMLS_DC); -SAPI_API time_t sapi_get_request_time(TSRMLS_D); +SAPI_API double sapi_get_request_time(TSRMLS_D); SAPI_API void sapi_terminate_process(TSRMLS_D); END_EXTERN_C() Modified: php/php-src/trunk/main/php_variables.c === --- php/php-src/trunk/main/php_variables.c 2010-11-06 16:24:58 UTC (rev 305128) +++ php/php-src/trunk/main/php_variables.c 2010-11-06 17:14:21 UTC (rev 305129) @@ -590,8 +590,8 @@ /* store request init time */ { zval new_entry; - Z_TYPE(new_entry) = IS_LONG; - Z_LVAL(new_entry) = sapi_get_request_time(TSRMLS_C); + Z_TYPE(new_entry) = IS_DOUBLE; + Z_DVAL(new_entry) = sapi_get_request_time(TSRMLS_C); php_register_variable_ex(REQUEST_TIME, new_entry, array_ptr TSRMLS_CC); } Modified: php/php-src/trunk/sapi/apache/mod_php5.c === --- php/php-src/trunk/sapi/apache/mod_php5.c 2010-11-06 16:24:58 UTC (rev 305128) +++ php/php-src/trunk/sapi/apache/mod_php5.c 2010-11-06 17:14:21 UTC (rev 305129) @@ -438,9 +438,9 @@ /* {{{ php_apache_get_request_time */ -static time_t php_apache_get_request_time(TSRMLS_D) +static double php_apache_get_request_time(TSRMLS_D) { - return ((request_rec *)SG(server_context))-request_time; + return (double) ((request_rec *)SG(server_context))-request_time; } /* }}} */ Modified: php/php-src/trunk/sapi/apache2filter/sapi_apache2.c === --- php/php-src/trunk/sapi/apache2filter/sapi_apache2.c 2010-11-06 16:24:58 UTC (rev 305128) +++
[PHP-CVS] svn: /php/php-src/trunk/ NEWS main/SAPI.c main/SAPI.h main/php_variables.c sapi/apache/mod_php5.c sapi/apache2filter/sapi_apache2.c sapi/apache2handler/sapi_apache2.c sapi/nsapi/nsapi.c
iliaaSat, 06 Nov 2010 17:14:21 + Revision: http://svn.php.net/viewvc?view=revisionrevision=305129 Log: Updated _SERVER['REQUEST_TIME'] to include microsecond precision. Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/main/SAPI.c U php/php-src/trunk/main/SAPI.h U php/php-src/trunk/main/php_variables.c U php/php-src/trunk/sapi/apache/mod_php5.c U php/php-src/trunk/sapi/apache2filter/sapi_apache2.c U php/php-src/trunk/sapi/apache2handler/sapi_apache2.c U php/php-src/trunk/sapi/nsapi/nsapi.c Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2010-11-06 16:24:58 UTC (rev 305128) +++ php/php-src/trunk/NEWS 2010-11-06 17:14:21 UTC (rev 305129) @@ -4,6 +4,7 @@ - Upgraded bundled sqlite to version 3.7.3. (Ilia) - Upgraded bundled PCRE to version 8.10. (Ilia) +- Updated _SERVER['REQUEST_TIME'] to include microsecond precision. (Ilia) - Added apache compatible functions (apache_child_terminate, getallheaders, apache_request_headers, apache_response_headers) to FastCGI SAPI (Dmitry) - Added caches to eliminate repeatable run-time bindings of functions, classes, Modified: php/php-src/trunk/main/SAPI.c === --- php/php-src/trunk/main/SAPI.c 2010-11-06 16:24:58 UTC (rev 305128) +++ php/php-src/trunk/main/SAPI.c 2010-11-06 17:14:21 UTC (rev 305129) @@ -961,14 +961,19 @@ } } -SAPI_API time_t sapi_get_request_time(TSRMLS_D) +SAPI_API double sapi_get_request_time(TSRMLS_D) { if(SG(global_request_time)) return SG(global_request_time); if (sapi_module.get_request_time SG(server_context)) { SG(global_request_time) = sapi_module.get_request_time(TSRMLS_C); } else { - SG(global_request_time) = time(0); + struct timeval tp = {0}; + if (!gettimeofday(tp, NULL)) { + SG(global_request_time) = (double)(tp.tv_sec + tp.tv_usec / 100.00); + } else { + SG(global_request_time) = (double)time(0); + } } return SG(global_request_time); } Modified: php/php-src/trunk/main/SAPI.h === --- php/php-src/trunk/main/SAPI.h 2010-11-06 16:24:58 UTC (rev 305128) +++ php/php-src/trunk/main/SAPI.h 2010-11-06 17:14:21 UTC (rev 305129) @@ -129,7 +129,7 @@ long post_max_size; int options; zend_bool sapi_started; - time_t global_request_time; + double global_request_time; HashTable known_post_content_types; } sapi_globals_struct; @@ -208,7 +208,7 @@ SAPI_API int sapi_get_target_uid(uid_t * TSRMLS_DC); SAPI_API int sapi_get_target_gid(gid_t * TSRMLS_DC); -SAPI_API time_t sapi_get_request_time(TSRMLS_D); +SAPI_API double sapi_get_request_time(TSRMLS_D); SAPI_API void sapi_terminate_process(TSRMLS_D); END_EXTERN_C() Modified: php/php-src/trunk/main/php_variables.c === --- php/php-src/trunk/main/php_variables.c 2010-11-06 16:24:58 UTC (rev 305128) +++ php/php-src/trunk/main/php_variables.c 2010-11-06 17:14:21 UTC (rev 305129) @@ -590,8 +590,8 @@ /* store request init time */ { zval new_entry; - Z_TYPE(new_entry) = IS_LONG; - Z_LVAL(new_entry) = sapi_get_request_time(TSRMLS_C); + Z_TYPE(new_entry) = IS_DOUBLE; + Z_DVAL(new_entry) = sapi_get_request_time(TSRMLS_C); php_register_variable_ex(REQUEST_TIME, new_entry, array_ptr TSRMLS_CC); } Modified: php/php-src/trunk/sapi/apache/mod_php5.c === --- php/php-src/trunk/sapi/apache/mod_php5.c2010-11-06 16:24:58 UTC (rev 305128) +++ php/php-src/trunk/sapi/apache/mod_php5.c2010-11-06 17:14:21 UTC (rev 305129) @@ -438,9 +438,9 @@ /* {{{ php_apache_get_request_time */ -static time_t php_apache_get_request_time(TSRMLS_D) +static double php_apache_get_request_time(TSRMLS_D) { - return ((request_rec *)SG(server_context))-request_time; + return (double) ((request_rec *)SG(server_context))-request_time; } /* }}} */ Modified: php/php-src/trunk/sapi/apache2filter/sapi_apache2.c === --- php/php-src/trunk/sapi/apache2filter/sapi_apache2.c 2010-11-06 16:24:58 UTC (rev 305128) +++ php/php-src/trunk/sapi/apache2filter/sapi_apache2.c 2010-11-06 17:14:21 UTC (rev 305129) @@ -308,10 +308,10 @@ return OK; } -static time_t php_apache_sapi_get_request_time(TSRMLS_D) +static double php_apache_sapi_get_request_time(TSRMLS_D) { php_struct *ctx = SG(server_context); - return
Re: [PHP-CVS] svn: /php/php-src/trunk/ NEWS main/SAPI.c main/SAPI.h main/php_variables.c sapi/apache/mod_php5.c sapi/apache2filter/sapi_apache2.c sapi/apache2handler/sapi_apache2.c sapi/nsapi/nsapi.c
hi Ilia, Please add a note to the UPGRADING file. Thanks! On Sat, Nov 6, 2010 at 6:14 PM, Ilia Alshanetsky il...@php.net wrote: iliaa Sat, 06 Nov 2010 17:14:21 + Revision: http://svn.php.net/viewvc?view=revisionrevision=305129 Log: Updated _SERVER['REQUEST_TIME'] to include microsecond precision. Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/main/SAPI.c U php/php-src/trunk/main/SAPI.h U php/php-src/trunk/main/php_variables.c U php/php-src/trunk/sapi/apache/mod_php5.c U php/php-src/trunk/sapi/apache2filter/sapi_apache2.c U php/php-src/trunk/sapi/apache2handler/sapi_apache2.c U php/php-src/trunk/sapi/nsapi/nsapi.c Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2010-11-06 16:24:58 UTC (rev 305128) +++ php/php-src/trunk/NEWS 2010-11-06 17:14:21 UTC (rev 305129) @@ -4,6 +4,7 @@ - Upgraded bundled sqlite to version 3.7.3. (Ilia) - Upgraded bundled PCRE to version 8.10. (Ilia) +- Updated _SERVER['REQUEST_TIME'] to include microsecond precision. (Ilia) - Added apache compatible functions (apache_child_terminate, getallheaders, apache_request_headers, apache_response_headers) to FastCGI SAPI (Dmitry) - Added caches to eliminate repeatable run-time bindings of functions, classes, Modified: php/php-src/trunk/main/SAPI.c === --- php/php-src/trunk/main/SAPI.c 2010-11-06 16:24:58 UTC (rev 305128) +++ php/php-src/trunk/main/SAPI.c 2010-11-06 17:14:21 UTC (rev 305129) @@ -961,14 +961,19 @@ } } -SAPI_API time_t sapi_get_request_time(TSRMLS_D) +SAPI_API double sapi_get_request_time(TSRMLS_D) { if(SG(global_request_time)) return SG(global_request_time); if (sapi_module.get_request_time SG(server_context)) { SG(global_request_time) = sapi_module.get_request_time(TSRMLS_C); } else { - SG(global_request_time) = time(0); + struct timeval tp = {0}; + if (!gettimeofday(tp, NULL)) { + SG(global_request_time) = (double)(tp.tv_sec + tp.tv_usec / 100.00); + } else { + SG(global_request_time) = (double)time(0); + } } return SG(global_request_time); } Modified: php/php-src/trunk/main/SAPI.h === --- php/php-src/trunk/main/SAPI.h 2010-11-06 16:24:58 UTC (rev 305128) +++ php/php-src/trunk/main/SAPI.h 2010-11-06 17:14:21 UTC (rev 305129) @@ -129,7 +129,7 @@ long post_max_size; int options; zend_bool sapi_started; - time_t global_request_time; + double global_request_time; HashTable known_post_content_types; } sapi_globals_struct; @@ -208,7 +208,7 @@ SAPI_API int sapi_get_target_uid(uid_t * TSRMLS_DC); SAPI_API int sapi_get_target_gid(gid_t * TSRMLS_DC); -SAPI_API time_t sapi_get_request_time(TSRMLS_D); +SAPI_API double sapi_get_request_time(TSRMLS_D); SAPI_API void sapi_terminate_process(TSRMLS_D); END_EXTERN_C() Modified: php/php-src/trunk/main/php_variables.c === --- php/php-src/trunk/main/php_variables.c 2010-11-06 16:24:58 UTC (rev 305128) +++ php/php-src/trunk/main/php_variables.c 2010-11-06 17:14:21 UTC (rev 305129) @@ -590,8 +590,8 @@ /* store request init time */ { zval new_entry; - Z_TYPE(new_entry) = IS_LONG; - Z_LVAL(new_entry) = sapi_get_request_time(TSRMLS_C); + Z_TYPE(new_entry) = IS_DOUBLE; + Z_DVAL(new_entry) = sapi_get_request_time(TSRMLS_C); php_register_variable_ex(REQUEST_TIME, new_entry, array_ptr TSRMLS_CC); } Modified: php/php-src/trunk/sapi/apache/mod_php5.c === --- php/php-src/trunk/sapi/apache/mod_php5.c 2010-11-06 16:24:58 UTC (rev 305128) +++ php/php-src/trunk/sapi/apache/mod_php5.c 2010-11-06 17:14:21 UTC (rev 305129) @@ -438,9 +438,9 @@ /* {{{ php_apache_get_request_time */ -static time_t php_apache_get_request_time(TSRMLS_D) +static double php_apache_get_request_time(TSRMLS_D) { - return ((request_rec *)SG(server_context))-request_time; + return (double) ((request_rec *)SG(server_context))-request_time; } /* }}} */ Modified: php/php-src/trunk/sapi/apache2filter/sapi_apache2.c === --- php/php-src/trunk/sapi/apache2filter/sapi_apache2.c 2010-11-06 16:24:58 UTC (rev 305128) +++ php/php-src/trunk/sapi/apache2filter/sapi_apache2.c 2010-11-06 17:14:21 UTC (rev 305129) @@ -308,10 +308,10 @@
[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
aharvey Fri, 05 Nov 2010 04:37:27 + Revision: http://svn.php.net/viewvc?view=revisionrevision=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 apos; 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), regex, regex_len, + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ss|zll, regex, regex_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; inum_subpats; i++) { ALLOC_ZVAL(match_sets[i]); @@ -649,7 +649,7 @@ } if (global) { /* global pattern matching */ - if (subpats_order == PREG_PATTERN_ORDER) { + if (subpats subpats_order == PREG_PATTERN_ORDER) { /* For each subpattern, insert it into the appropriate array. */ for (i = 0; i count; i++) { if (offset_capture) { @@ -739,7 +739,7 @@ } while (global); /* Add the match sets to the output array and clean up */ - if (global subpats_order == PREG_PATTERN_ORDER) { + if (global subpats subpats_order == PREG_PATTERN_ORDER) { for (i = 0; i num_subpats; i++) { if (subpat_names[i]) { zend_hash_update(Z_ARRVAL_P(subpats), subpat_names[i], @@ -766,7 +766,7 @@ } /* }}} */ -/* {{{ proto int preg_match_all(string pattern, string subject, array subpatterns [, int flags [, int offset]]) +/* {{{ proto int preg_match_all(string pattern, string subject, [array subpatterns [, int flags [, int offset]]]) Perform a Perl-style global regular expression match */ static PHP_FUNCTION(preg_match_all) { Modified: php/php-src/trunk/ext/pcre/tests/002.phpt === --- php/php-src/trunk/ext/pcre/tests/002.phpt 2010-11-05 01:56:28 UTC (rev 305096) +++ php/php-src/trunk/ext/pcre/tests/002.phpt 2010-11-05 04:37:27 UTC (rev 305097) @@ -20,7 +20,7 @@ Warning:
[PHP-CVS] svn: /php/php-src/trunk/ NEWS Zend/zend_execute.c Zend/zend_execute.h Zend/zend_vm_def.h Zend/zend_vm_execute.h
dmitry Fri, 22 Oct 2010 14:51:07 + Revision: http://svn.php.net/viewvc?view=revisionrevision=304626 Log: reduced size of temp_variariable Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/Zend/zend_execute.c U php/php-src/trunk/Zend/zend_execute.h U php/php-src/trunk/Zend/zend_vm_def.h U php/php-src/trunk/Zend/zend_vm_execute.h Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2010-10-22 14:34:33 UTC (rev 304625) +++ php/php-src/trunk/NEWS 2010-10-22 14:51:07 UTC (rev 304626) @@ -91,6 +91,7 @@ . the size of zend_class_entry is reduced by sharing the same memory space by different information for internal and user classes. See zend_class_inttry.info union. + . reduced size of temp_variariable - Improved CLI Interactive readline shell (Johannes) . Added cli.pager ini setting to set a pager for output. . Added cli.prompt ini settingto configure the shell prompt. Modified: php/php-src/trunk/Zend/zend_execute.c === --- php/php-src/trunk/Zend/zend_execute.c 2010-10-22 14:34:33 UTC (rev 304625) +++ php/php-src/trunk/Zend/zend_execute.c 2010-10-22 14:51:07 UTC (rev 304626) @@ -1144,8 +1144,7 @@ result-str_offset.str = container; PZVAL_LOCK(container); result-str_offset.offset = Z_LVAL_P(dim); - result-var.ptr_ptr = NULL; - result-var.ptr = NULL; + result-str_offset.ptr_ptr = NULL; return; } break; Modified: php/php-src/trunk/Zend/zend_execute.h === --- php/php-src/trunk/Zend/zend_execute.h 2010-10-22 14:34:33 UTC (rev 304625) +++ php/php-src/trunk/Zend/zend_execute.h 2010-10-22 14:51:07 UTC (rev 304626) @@ -35,16 +35,13 @@ zend_bool fcall_returned_reference; } var; struct { - zval **ptr_ptr; - zval *ptr; - zend_bool fcall_returned_reference; + zval **ptr_ptr; /* shared with var.ptr_ptr */ zval *str; zend_uint offset; } str_offset; struct { - zval **ptr_ptr; - zval *ptr; - zend_bool fcall_returned_reference; + zval **ptr_ptr; /* shared with var.ptr_ptr */ + zval *ptr; /* shared with var.ptr */ HashPointer fe_pos; } fe; zend_class_entry *class_entry; Modified: php/php-src/trunk/Zend/zend_vm_def.h === --- php/php-src/trunk/Zend/zend_vm_def.h2010-10-22 14:34:33 UTC (rev 304625) +++ php/php-src/trunk/Zend/zend_vm_def.h2010-10-22 14:51:07 UTC (rev 304626) @@ -4039,7 +4039,7 @@ } } - AI_SET_PTR(EX_T(opline-result.var), array_ptr); + EX_T(opline-result.var).fe.ptr = array_ptr; if (iter) { iter-index = 0; @@ -4097,7 +4097,7 @@ { USE_OPLINE zend_free_op free_op1; - zval *array = EX_T(opline-op1.var).var.ptr; + zval *array = EX_T(opline-op1.var).fe.ptr; zval **value; char *str_key; uint str_key_len; Modified: php/php-src/trunk/Zend/zend_vm_execute.h === --- php/php-src/trunk/Zend/zend_vm_execute.h2010-10-22 14:34:33 UTC (rev 304625) +++ php/php-src/trunk/Zend/zend_vm_execute.h2010-10-22 14:51:07 UTC (rev 304626) @@ -2542,7 +2542,7 @@ } } - AI_SET_PTR(EX_T(opline-result.var), array_ptr); + EX_T(opline-result.var).fe.ptr = array_ptr; if (iter) { iter-index = 0; @@ -6805,7 +6805,7 @@ } } - AI_SET_PTR(EX_T(opline-result.var), array_ptr); + EX_T(opline-result.var).fe.ptr = array_ptr; if (iter) { iter-index = 0; @@ -11094,7 +11094,7 @@ } } - AI_SET_PTR(EX_T(opline-result.var), array_ptr); + EX_T(opline-result.var).fe.ptr = array_ptr; if (iter) { iter-index = 0; @@ -11152,7 +11152,7 @@ { USE_OPLINE - zval *array = EX_T(opline-op1.var).var.ptr; + zval *array = EX_T(opline-op1.var).fe.ptr; zval **value; char *str_key; uint str_key_len; @@ -26765,7 +26765,7 @@ } } - AI_SET_PTR(EX_T(opline-result.var), array_ptr); + EX_T(opline-result.var).fe.ptr = array_ptr; if (iter) { iter-index = 0; -- PHP CVS Mailing List (http://www.php.net/) To
[PHP-CVS] svn: /php/php-src/trunk/ NEWS Zend/tests/hint/param_type_hint_001.phpt Zend/tests/hint/param_type_hint_003.phpt Zend/tests/hint/param_type_hint_004.phpt Zend/tests/hint/param_type_hint_005.p
derick Tue, 19 Oct 2010 10:42:38 + Revision: http://svn.php.net/viewvc?view=revisionrevision=304509 Log: - Strip out the typehint *checks* only. They are still parsed, and they are still accessible through the reflection API. Changed paths: U php/php-src/trunk/NEWS D php/php-src/trunk/Zend/tests/hint/param_type_hint_001.phpt D php/php-src/trunk/Zend/tests/hint/param_type_hint_003.phpt D php/php-src/trunk/Zend/tests/hint/param_type_hint_004.phpt D php/php-src/trunk/Zend/tests/hint/param_type_hint_005.phpt D php/php-src/trunk/Zend/tests/hint/param_type_hint_011.phpt D php/php-src/trunk/Zend/tests/hint/param_type_hint_012.phpt D php/php-src/trunk/Zend/tests/hint/param_type_hint_013.phpt D php/php-src/trunk/Zend/tests/hint/param_type_hint_014.phpt D php/php-src/trunk/Zend/tests/hint/param_type_hint_015.phpt D php/php-src/trunk/Zend/tests/hint/param_type_hint_019.phpt D php/php-src/trunk/Zend/tests/hint/param_type_hint_021.phpt U php/php-src/trunk/Zend/zend_execute.c U php/php-src/trunk/Zend/zend_execute.h Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2010-10-19 10:16:58 UTC (rev 304508) +++ php/php-src/trunk/NEWS 2010-10-19 10:42:38 UTC (rev 304509) @@ -56,7 +56,7 @@ FR #51815. (Pierrick) - Added iterator support in MySQLi. mysqli_result implements Traversable. (Andrey, Johannes) -- Added scalar typehinting. (Ilia, Derick) +- Added scalar typehints to the parser and the reflection API. (Ilia, Derick) - Added support for JSON_NUMERIC_CHECK option in json_encode() that converts numeric strings to integers. (Ilia) - Added support for object references in recursive serialize() calls. FR #36424. Deleted: php/php-src/trunk/Zend/tests/hint/param_type_hint_001.phpt === --- php/php-src/trunk/Zend/tests/hint/param_type_hint_001.phpt 2010-10-19 10:16:58 UTC (rev 304508) +++ php/php-src/trunk/Zend/tests/hint/param_type_hint_001.phpt 2010-10-19 10:42:38 UTC (rev 304509) @@ -1,38 +0,0 @@ ---TEST-- -Parameter type hint - Testing integer hint ---FILE-- -?php - -function test_int($x, int $a = 1) { -} - -test_int(1); -print Ok\n; - -test_int('1211'); -print Ok\n; - -test_int(null); -print Ok\n; - -test_int(1, 1); -print Ok\n; - -test_int(null, '1211'); -print Ok\n; - -? ---EXPECTF-- -Ok -Ok -Ok -Ok - -Catchable fatal error: Argument 2 passed to test_int() must be of the type integer, string given, called in %s on line %d and defined in %s on line %d ---UEXPECTF-- -Ok -Ok -Ok -Ok - -Catchable fatal error: Argument 2 passed to test_int() must be of the type integer, Unicode string given, called in %s on line %d and defined in %s on line %d Deleted: php/php-src/trunk/Zend/tests/hint/param_type_hint_003.phpt === --- php/php-src/trunk/Zend/tests/hint/param_type_hint_003.phpt 2010-10-19 10:16:58 UTC (rev 304508) +++ php/php-src/trunk/Zend/tests/hint/param_type_hint_003.phpt 2010-10-19 10:42:38 UTC (rev 304509) @@ -1,16 +0,0 @@ ---TEST-- -Parameter type hint - Wrong parameter for integer ---FILE-- -?php - -function test_int(int $a) { - echo $a, \n; -} - -test_int('+1'); - -? ---EXPECTF-- -Catchable fatal error: Argument 1 passed to test_int() must be of the type integer, string given, called in %s on line %d and defined in %s on line %d ---UEXPECTF-- -Catchable fatal error: Argument 1 passed to test_int() must be of the type integer, Unicode string given, called in %s on line %d and defined in %s on line %d Deleted: php/php-src/trunk/Zend/tests/hint/param_type_hint_004.phpt === --- php/php-src/trunk/Zend/tests/hint/param_type_hint_004.phpt 2010-10-19 10:16:58 UTC (rev 304508) +++ php/php-src/trunk/Zend/tests/hint/param_type_hint_004.phpt 2010-10-19 10:42:38 UTC (rev 304509) @@ -1,16 +0,0 @@ ---TEST-- -Parameter type hint - Wrong parameter for double ---FILE-- -?php - -function test_double(real $a) { - echo $a, \n; -} - -test_double('+1.1'); - -? ---EXPECTF-- -Catchable fatal error: Argument 1 passed to test_double() must be of the type double, string given, called in %s on line %d and defined in %s on line %d ---UEXPECTF-- -Catchable fatal error: Argument 1 passed to test_double() must be of the type double, Unicode string given, called in %s on line %d and defined in %s on line %d Deleted: php/php-src/trunk/Zend/tests/hint/param_type_hint_005.phpt === --- php/php-src/trunk/Zend/tests/hint/param_type_hint_005.phpt 2010-10-19 10:16:58 UTC (rev 304508) +++ php/php-src/trunk/Zend/tests/hint/param_type_hint_005.phpt 2010-10-19 10:42:38 UTC (rev 304509) @@ -1,23 +0,0 @@ ---TEST-- -Parameter type hint - Wrong parameter for string ---FILE-- -?php - -function
Re: [PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING ext/standard/basic_functions.c
On 1 October 2010 10:18, Kalle Sommer Nielsen ka...@php.net 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)
[PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING ext/standard/basic_functions.c
kalleMon, 04 Oct 2010 20:26:50 + Revision: http://svn.php.net/viewvc?view=revisionrevision=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
[PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING ext/standard/basic_functions.c
kalleFri, 01 Oct 2010 09:18:44 + Revision: http://svn.php.net/viewvc?view=revisionrevision=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
Re: [PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING ext/standard/basic_functions.c
On Fri, Oct 1, 2010 at 11:18 AM, Kalle Sommer Nielsen ka...@php.net wrote: kalle Fri, 01 Oct 2010 09:18:44 + Revision: http://svn.php.net/viewvc?view=revisionrevision=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
Re: [PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING ext/standard/basic_functions.c
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
On Fri, Oct 1, 2010 at 12:08 PM, Kalle Sommer Nielsen ka...@php.net 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
[PHP-CVS] svn: /php/php-src/trunk/ NEWS
andrey Wed, 22 Sep 2010 15:15:11 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303680 Log: here comes the news Changed paths: U php/php-src/trunk/NEWS Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2010-09-22 15:14:04 UTC (rev 303679) +++ php/php-src/trunk/NEWS 2010-09-22 15:15:11 UTC (rev 303680) @@ -34,6 +34,7 @@ - Added an optimization which saves memory and emalloc/efree calls for empty HashTables (Stas, Dmitry) +- Added named pipes support in mysqlnd (Request#48082). (Andrey) - Added support for Traits. (Stefan) - Added array dereferencing support. (Felipe) - Added DTrace support. (David Soria Parra) -- 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 ext/standard/php_var.h ext/standard/var_unserializer.c ext/standard/var_unserializer.re
kalleSat, 18 Sep 2010 16:09:28 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303503 Log: Improved performance of unserialize(), original patch by galaxy dot mipt at gmail dot com Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/ext/standard/php_var.h U php/php-src/trunk/ext/standard/var_unserializer.c U php/php-src/trunk/ext/standard/var_unserializer.re Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2010-09-18 16:05:00 UTC (rev 303502) +++ php/php-src/trunk/NEWS 2010-09-18 16:09:28 UTC (rev 303503) @@ -97,6 +97,8 @@ . Don't terminate shell on fatal errors. - Improved ext/zlib: re-implemented non-file related functionality. (Mike) - Improved output layer. See README.NEW-OUTPUT-API for internals. (Mike) +- Improved the performance of unserialize(). (galaxy dot mipt at gmail dot com, + Kalle) - Removed legacy features: . allow_call_time_pass_reference. (Pierrick) Modified: php/php-src/trunk/ext/standard/php_var.h === --- php/php-src/trunk/ext/standard/php_var.h 2010-09-18 16:05:00 UTC (rev 303502) +++ php/php-src/trunk/ext/standard/php_var.h 2010-09-18 16:09:28 UTC (rev 303503) @@ -42,7 +42,9 @@ struct php_unserialize_data { void *first; + void *last; void *first_dtor; + void *last_dtor; }; typedef struct php_unserialize_data* php_unserialize_data_t; Modified: php/php-src/trunk/ext/standard/var_unserializer.c === --- php/php-src/trunk/ext/standard/var_unserializer.c 2010-09-18 16:05:00 UTC (rev 303502) +++ php/php-src/trunk/ext/standard/var_unserializer.c 2010-09-18 16:09:28 UTC (rev 303503) @@ -1,4 +1,4 @@ -/* Generated by re2c 0.13.5 on Fri Aug 6 19:20:07 2010 */ +/* Generated by re2c 0.13.5 on Sat Sep 18 17:59:40 2010 */ #line 1 ext/standard/var_unserializer.re /* +--+ @@ -35,25 +35,23 @@ static inline void var_push(php_unserialize_data_t *var_hashx, zval **rval) { - var_entries *var_hash = (*var_hashx)-first, *prev = NULL; + var_entries *var_hash = (*var_hashx)-last; #if 0 fprintf(stderr, var_push(%ld): %d\n, var_hash?var_hash-used_slots:-1L, Z_TYPE_PP(rval)); #endif - - while (var_hash var_hash-used_slots == VAR_ENTRIES_MAX) { - prev = var_hash; - var_hash = var_hash-next; - } - if (!var_hash) { + if (!var_hash || var_hash-used_slots == VAR_ENTRIES_MAX) { var_hash = emalloc(sizeof(var_entries)); var_hash-used_slots = 0; var_hash-next = 0; - if (!(*var_hashx)-first) + if (!(*var_hashx)-first) { (*var_hashx)-first = var_hash; - else - prev-next = var_hash; + } else { + ((var_entries *) (*var_hashx)-last)-next = var_hash; + } + + (*var_hashx)-last = var_hash; } var_hash-data[var_hash-used_slots++] = *rval; @@ -61,25 +59,23 @@ PHPAPI void var_push_dtor(php_unserialize_data_t *var_hashx, zval **rval) { - var_entries *var_hash = (*var_hashx)-first_dtor, *prev = NULL; + var_entries *var_hash = (*var_hashx)-last_dtor; #if 0 fprintf(stderr, var_push_dtor(%ld): %d\n, var_hash?var_hash-used_slots:-1L, Z_TYPE_PP(rval)); #endif - - while (var_hash var_hash-used_slots == VAR_ENTRIES_MAX) { - prev = var_hash; - var_hash = var_hash-next; - } - if (!var_hash) { + if (!var_hash || var_hash-used_slots == VAR_ENTRIES_MAX) { var_hash = emalloc(sizeof(var_entries)); var_hash-used_slots = 0; var_hash-next = 0; - if (!(*var_hashx)-first_dtor) + if (!(*var_hashx)-first_dtor) { (*var_hashx)-first_dtor = var_hash; - else - prev-next = var_hash; + } else { + ((var_entries *) (*var_hashx)-last_dtor)-next = var_hash; + } + + (*var_hashx)-last_dtor = var_hash; } Z_ADDREF_PP(rval); @@ -205,7 +201,7 @@ #define YYMARKER marker -#line 213 ext/standard/var_unserializer.re +#line 209 ext/standard/var_unserializer.re @@ -411,43 +407,9 @@ -#line 415 ext/standard/var_unserializer.c +#line 411 ext/standard/var_unserializer.c { YYCTYPE yych; - static const unsigned char yybm[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,
[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
aharvey Thu, 16 Sep 2010 13:53:27 + Revision: http://svn.php.net/viewvc?view=revisionrevision=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 (13) #define PHP_JSON_FORCE_OBJECT (14) #define PHP_JSON_NUMERIC_CHECK (15) +#define PHP_JSON_UNESCAPED_SLASHES (16) /* 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-- +?php if (!extension_loaded(json)) print skip; ? +--FILE-- +?php +var_dump(json_encode('a/b')); +var_dump(json_encode('a/b', JSON_UNESCAPED_SLASHES)); +? +--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/json/json.c ext/json/php_json.h ext/json/tests/json_encode_pretty_print.phpt
aharvey Thu, 16 Sep 2010 16:21:15 + Revision: http://svn.php.net/viewvc?view=revisionrevision=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); } else {
[PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING
felipe Thu, 16 Sep 2010 21:49:48 + Revision: http://svn.php.net/viewvc?view=revisionrevision=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/standard/array.c ext/standard/tests/array/array_combine_error2.phpt ext/standard/tests/array/array_combine_variation3.phpt ext/standard/tests/arra
aharvey Fri, 27 Aug 2010 03:54:10 + Revision: http://svn.php.net/viewvc?view=revisionrevision=302838 Log: Implemented request #34857 (Change array_combine behaviour when called with empty arrays). Patch by Joel Perras joel.per...@gmail.com. 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-CVS] svn: /php/php-src/trunk/ NEWS Zend/tests/bug52614.phpt Zend/zend_compile.c Zend/zend_language_parser.y Zend/zend_vm_def.h Zend/zend_vm_execute.h Zend/zend_vm_opcodes.h
dmitry Wed, 25 Aug 2010 09:14:36 + Revision: http://svn.php.net/viewvc?view=revisionrevision=302764 Log: Fixed bug #52614 (Memory leak when writing on uninitialized variable returned from method call) Bug: http://bugs.php.net/52614 (Assigned) Memory leak when writing on uninitialized variable returned from method call Changed paths: U php/php-src/trunk/NEWS A php/php-src/trunk/Zend/tests/bug52614.phpt U php/php-src/trunk/Zend/zend_compile.c U php/php-src/trunk/Zend/zend_language_parser.y U php/php-src/trunk/Zend/zend_vm_def.h U php/php-src/trunk/Zend/zend_vm_execute.h U php/php-src/trunk/Zend/zend_vm_opcodes.h Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2010-08-25 08:26:12 UTC (rev 302763) +++ php/php-src/trunk/NEWS 2010-08-25 09:14:36 UTC (rev 302764) @@ -117,6 +117,8 @@ - Fixed a NULL pointer dereference when processing invalid XML-RPC requests (Fixes CVE-2010-0397, bug #51288). (Raphael Geissert) +- Fixed bug #52614 (Memory leak when writing on uninitialized variable returned + from method call). (Dmitry) - Fixed bug #51338 (URL-Rewriter is still enabled if use_only_cookies is on). (Ilia, j dot jeising at gmail dot com) - Fixed bug #51269 (zlib.output_compression Overwrites Vary Header). (Adam) Added: php/php-src/trunk/Zend/tests/bug52614.phpt === --- php/php-src/trunk/Zend/tests/bug52614.phpt (rev 0) +++ php/php-src/trunk/Zend/tests/bug52614.phpt 2010-08-25 09:14:36 UTC (rev 302764) @@ -0,0 +1,83 @@ +--TEST-- +Bug #52614 (Memory leak when writing on uninitialized variable returned from method call) +--FILE-- +?php +class foo { + public $a1; + public $a2 = array(); + public $a3; + public $o1; + public $o2; + + public function f1() { + return $this-a1; + } + + public function f2() { + return $this-a2; + } + + public function f3() { + $this-a3 = array(); + return $this-a3; + } + + public function f4() { + return $this-o1; + } + + public function f5() { + $this-o2 = new stdClass; + return $this-o2; + } + + public function f6() { + return $this-a1; + } + + public function f7($x) { + $x = 2; + } + +} + +$foo = new foo; + +$foo-f1()[0] = 1; +var_dump($foo-a1); + +$foo-f2()[0] = 1; +var_dump($foo-a2); + +$foo-f3()[0] = 1; +var_dump($foo-a3); + +$foo-f4()-a = 1; +var_dump($foo-o1); + +$foo-f5()-a = 1; +var_dump($foo-o2); + +$foo-a1[0] = 1; +$foo-f7($foo-f6()[0]); +var_dump($foo-a1[0]); +$foo-f1()[0]++; +var_dump($foo-a1[0]); +$foo-f6()[0]++; +var_dump($foo-a1[0]); +--EXPECTF-- +NULL +array(0) { +} +array(0) { +} + +Strict Standards: Creating default object from empty value in %sbug52614.php on line 52 +NULL +object(stdClass)#%d (1) { + [a]= + int(1) +} +int(2) +int(2) +int(3) Modified: php/php-src/trunk/Zend/zend_compile.c === --- php/php-src/trunk/Zend/zend_compile.c 2010-08-25 08:26:12 UTC (rev 302763) +++ php/php-src/trunk/Zend/zend_compile.c 2010-08-25 09:14:36 UTC (rev 302764) @@ -550,6 +550,14 @@ op.constant = zend_add_literal(CG(active_op_array), _c); \ } while (0) +static inline zend_bool zend_is_function_or_method_call(const znode *variable) /* {{{ */ +{ + zend_uint type = variable-EA; + + return ((type ZEND_PARSED_METHOD_CALL) || (type == ZEND_PARSED_FUNCTION_CALL)); +} +/* }}} */ + void zend_do_binary_op(zend_uchar op, znode *result, const znode *op1, const znode *op2 TSRMLS_DC) /* {{{ */ { zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); @@ -781,6 +789,18 @@ zend_op opline; zend_llist *fetch_list_ptr; + zend_stack_top(CG(bp_stack), (void **) fetch_list_ptr); + + if (zend_is_function_or_method_call(parent)) { + init_op(opline TSRMLS_CC); + opline.opcode = ZEND_SEPARATE; + SET_NODE(opline.op1, parent); + SET_UNUSED(opline.op2); + opline.result_type = IS_VAR; + opline.result.var = opline.op1.var; + zend_llist_add_element(fetch_list_ptr, opline); + } + init_op(opline TSRMLS_CC); opline.opcode = ZEND_FETCH_DIM_W; /* the backpatching routine assumes W */ opline.result_type = IS_VAR; @@ -802,7 +822,6 @@ GET_NODE(result, opline.result); - zend_stack_top(CG(bp_stack), (void **) fetch_list_ptr); zend_llist_add_element(fetch_list_ptr, opline); } /* }}} */ @@ -985,14 +1004,6 @@ } /* }}} */ -static inline zend_bool zend_is_function_or_method_call(const znode *variable) /* {{{ */ -{ - zend_uint type = variable-EA; - - return ((type ZEND_PARSED_METHOD_CALL) || (type == ZEND_PARSED_FUNCTION_CALL)); -} -/* }}} */ - void zend_do_assign_ref(znode *result, const znode *lvar, const znode *rvar TSRMLS_DC) /* {{{ */ { zend_op *opline; @@ -1307,6 +1318,14 @@ while (le) { opline_ptr = (zend_op *)le-data; + if (opline_ptr-opcode == ZEND_SEPARATE) { +if (type != BP_VAR_R type != BP_VAR_IS) { + opline
[PHP-CVS] svn: /php/php-src/trunk/ NEWS sapi/cgi/cgi_main.c sapi/cgi/fastcgi.c sapi/cgi/fastcgi.h
dmitry Wed, 18 Aug 2010 08:22:41 + Revision: http://svn.php.net/viewvc?view=revisionrevision=302424 Log: improved performance of FastCGI request parsing Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/sapi/cgi/cgi_main.c U php/php-src/trunk/sapi/cgi/fastcgi.c U php/php-src/trunk/sapi/cgi/fastcgi.h Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2010-08-18 03:50:38 UTC (rev 302423) +++ php/php-src/trunk/NEWS 2010-08-18 08:22:41 UTC (rev 302424) @@ -25,6 +25,7 @@ . ZEND_FETCH_*_R operations simplified and can't be used with EXT_TYPE_UNUSED flag any more. Thit is very rare and useless case. ZEND_FREE might be required after them instead. + . improved performance of FastCGI request parsing - Added concept of interned strings. All strings constants known at compile time are allocated in a single copy and never changed. (Dmitry) - Added an optimization which saves memory and emalloc/efree calls for empty Modified: php/php-src/trunk/sapi/cgi/cgi_main.c === --- php/php-src/trunk/sapi/cgi/cgi_main.c 2010-08-18 03:50:38 UTC (rev 302423) +++ php/php-src/trunk/sapi/cgi/cgi_main.c 2010-08-18 08:22:41 UTC (rev 302424) @@ -587,6 +587,17 @@ return sapi_cgibin_getenv((char *) HTTP_COOKIE, sizeof(HTTP_COOKIE)-1 TSRMLS_CC); } +static void cgi_php_load_env_var(char *var, unsigned int var_len, char *val, unsigned int val_len, void *arg) +{ + zval *array_ptr = (zval*)arg; + int filter_arg = (array_ptr == PG(http_globals)[TRACK_VARS_ENV])?PARSE_ENV:PARSE_SERVER; + unsigned int new_val_len; + + if (sapi_module.input_filter(filter_arg, var, val, strlen(val), new_val_len TSRMLS_CC)) { + php_register_variable_safe(var, val, new_val_len, array_ptr TSRMLS_CC); + } +} + void cgi_php_import_environment_variables(zval *array_ptr TSRMLS_DC) { if (PG(http_globals)[TRACK_VARS_ENV] @@ -616,26 +627,11 @@ if (fcgi_is_fastcgi()) { fcgi_request *request = (fcgi_request*) SG(server_context); - HashPosition pos; int magic_quotes_gpc = PG(magic_quotes_gpc); - char *var, **val; - uint var_len; - ulong idx; - int filter_arg = (array_ptr == PG(http_globals)[TRACK_VARS_ENV])?PARSE_ENV:PARSE_SERVER; /* turn off magic_quotes while importing environment variables */ PG(magic_quotes_gpc) = 0; - for (zend_hash_internal_pointer_reset_ex(request-env, pos); - zend_hash_get_current_key_ex(request-env, var, var_len, idx, 0, pos) == HASH_KEY_IS_STRING - zend_hash_get_current_data_ex(request-env, (void **) val, pos) == SUCCESS; - zend_hash_move_forward_ex(request-env, pos) - ) { - unsigned int new_val_len; - - if (sapi_module.input_filter(filter_arg, var, val, strlen(*val), new_val_len TSRMLS_CC)) { -php_register_variable_safe(var, *val, new_val_len, array_ptr TSRMLS_CC); - } - } + fcgi_loadenv(request, cgi_php_load_env_var, array_ptr); PG(magic_quotes_gpc) = magic_quotes_gpc; } } @@ -1100,8 +1096,10 @@ char *env_path_info = sapi_cgibin_getenv(PATH_INFO, sizeof(PATH_INFO)-1 TSRMLS_CC); char *env_script_name = sapi_cgibin_getenv(SCRIPT_NAME, sizeof(SCRIPT_NAME)-1 TSRMLS_CC); +#ifdef PHP_WIN32 /* Hack for buggy IIS that sets incorrect PATH_INFO */ char *env_server_software = sapi_cgibin_getenv(SERVER_SOFTWARE, sizeof(SERVER_SOFTWARE)-1 TSRMLS_CC); + if (env_server_software env_script_name env_path_info @@ -1115,6 +1113,7 @@ } env_path_info = _sapi_cgibin_putenv(PATH_INFO, env_path_info TSRMLS_CC); } +#endif if (CGIG(fix_pathinfo)) { struct stat st; @@ -1488,7 +1487,7 @@ int fastcgi = fcgi_is_fastcgi(); char *bindpath = NULL; int fcgi_fd = 0; - fcgi_request request; + fcgi_request *request = NULL; int repeats = 1; int benchmark = 0; #if HAVE_GETTIMEOFDAY @@ -1689,7 +1688,7 @@ php_import_environment_variables = cgi_php_import_environment_variables; /* library is already initialized, now init our request */ - fcgi_init_request(request, fcgi_fd); + request = fcgi_init_request(fcgi_fd); #ifndef PHP_WIN32 /* Pre-fork, if required */ @@ -1810,6 +1809,9 @@ break; case 'h': case '?': + if (request) { + fcgi_destroy_request(request); + } fcgi_shutdown(); no_headers = 1; SG(headers_sent) = 1; @@ -1831,8 +1833,8 @@ fcgi_impersonate(); } #endif - while (!fastcgi || fcgi_accept_request(request) = 0) { - SG(server_context) = (void *) request; + while (!fastcgi || fcgi_accept_request(request) = 0) { + SG(server_context) = fastcgi ? (void *) request : (void *) 1; init_request_info(TSRMLS_C); CG(interactive) = 0; @@ -2026,7 +2028,7 @@ * get path_translated */ if (php_request_startup(TSRMLS_C) == FAILURE) { if (fastcgi) { - fcgi_finish_request(request, 1); + fcgi_finish_request(request, 1); } SG(server_context) = NULL;
[PHP-CVS] svn: /php/php-src/trunk/ NEWS Zend/zend_globals.h Zend/zend_ini.c Zend/zend_ini.h Zend/zend_vm_def.h Zend/zend_vm_execute.h
dmitry Wed, 18 Aug 2010 13:58:13 + Revision: http://svn.php.net/viewvc?view=revisionrevision=302442 Log: improved performance of @ (silence) operator Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/Zend/zend_globals.h U php/php-src/trunk/Zend/zend_ini.c U php/php-src/trunk/Zend/zend_ini.h U php/php-src/trunk/Zend/zend_vm_def.h U php/php-src/trunk/Zend/zend_vm_execute.h Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2010-08-18 13:34:40 UTC (rev 302441) +++ php/php-src/trunk/NEWS 2010-08-18 13:58:13 UTC (rev 302442) @@ -26,6 +26,7 @@ flag any more. Thit is very rare and useless case. ZEND_FREE might be required after them instead. . improved performance of FastCGI request parsing + . improved performance of @ (silence) operator - Added concept of interned strings. All strings constants known at compile time are allocated in a single copy and never changed. (Dmitry) - Added an optimization which saves memory and emalloc/efree calls for empty Modified: php/php-src/trunk/Zend/zend_globals.h === --- php/php-src/trunk/Zend/zend_globals.h 2010-08-18 13:34:40 UTC (rev 302441) +++ php/php-src/trunk/Zend/zend_globals.h 2010-08-18 13:58:13 UTC (rev 302442) @@ -69,7 +69,9 @@ } zend_declarables; typedef struct _zend_vm_stack *zend_vm_stack; +typedef struct _zend_ini_entry zend_ini_entry; + struct _zend_compiler_globals { zend_stack bp_stack; zend_stack switch_cond_stack; @@ -248,6 +250,7 @@ HashTable *ini_directives; HashTable *modified_ini_directives; + zend_ini_entry *error_reporting_ini_entry; zend_objects_store objects_store; zval *exception, *prev_exception; Modified: php/php-src/trunk/Zend/zend_ini.c === --- php/php-src/trunk/Zend/zend_ini.c 2010-08-18 13:34:40 UTC (rev 302441) +++ php/php-src/trunk/Zend/zend_ini.c 2010-08-18 13:58:13 UTC (rev 302442) @@ -92,6 +92,7 @@ EG(ini_directives) = registered_zend_ini_directives; EG(modified_ini_directives) = NULL; + EG(error_reporting_ini_entry) = NULL; if (zend_hash_init_ex(registered_zend_ini_directives, 100, NULL, NULL, 1, 0) == FAILURE) { return FAILURE; } @@ -133,6 +134,7 @@ zend_ini_entry ini_entry; EG(modified_ini_directives) = NULL; + EG(error_reporting_ini_entry) = NULL; EG(ini_directives) = (HashTable *) malloc(sizeof(HashTable)); if (zend_hash_init_ex(EG(ini_directives), registered_zend_ini_directives-nNumOfElements, NULL, NULL, 1, 0) == FAILURE) { return FAILURE; Modified: php/php-src/trunk/Zend/zend_ini.h === --- php/php-src/trunk/Zend/zend_ini.h 2010-08-18 13:34:40 UTC (rev 302441) +++ php/php-src/trunk/Zend/zend_ini.h 2010-08-18 13:58:13 UTC (rev 302442) @@ -57,8 +57,6 @@ #endif -typedef struct _zend_ini_entry zend_ini_entry; - #define ZEND_INI_MH(name) int name(zend_ini_entry *entry, char *new_value, uint new_value_length, void *mh_arg1, void *mh_arg2, void *mh_arg3, int stage TSRMLS_DC) #define ZEND_INI_DISP(name) void name(zend_ini_entry *ini_entry, int type) Modified: php/php-src/trunk/Zend/zend_vm_def.h === --- php/php-src/trunk/Zend/zend_vm_def.h 2010-08-18 13:34:40 UTC (rev 302441) +++ php/php-src/trunk/Zend/zend_vm_def.h 2010-08-18 13:58:13 UTC (rev 302442) @@ -4520,7 +4520,30 @@ } if (EG(error_reporting)) { - zend_alter_ini_entry_ex(error_reporting, sizeof(error_reporting), 0, 1, ZEND_INI_USER, ZEND_INI_STAGE_RUNTIME, 1 TSRMLS_CC); + do { + EG(error_reporting) = 0; + if (!EG(error_reporting_ini_entry)) { +if (UNEXPECTED(zend_hash_find(EG(ini_directives), error_reporting, sizeof(error_reporting), (void **) EG(error_reporting_ini_entry)) == FAILURE)) { + break; +} + } + if (!EG(error_reporting_ini_entry)-modified) { +if (!EG(modified_ini_directives)) { + ALLOC_HASHTABLE(EG(modified_ini_directives)); + zend_hash_init(EG(modified_ini_directives), 8, NULL, NULL, 0); +} +if (EXPECTED(zend_hash_add(EG(modified_ini_directives), error_reporting, sizeof(error_reporting), EG(error_reporting_ini_entry), sizeof(zend_ini_entry*), NULL) == SUCCESS)) { + EG(error_reporting_ini_entry)-orig_value = EG(error_reporting_ini_entry)-value; + EG(error_reporting_ini_entry)-orig_value_length = EG(error_reporting_ini_entry)-value_length; + EG(error_reporting_ini_entry)-orig_modifiable = EG(error_reporting_ini_entry)-modifiable; + EG(error_reporting_ini_entry)-modified = 1; +} + } else if (EG(error_reporting_ini_entry)-value != EG(error_reporting_ini_entry)-orig_value) { +efree(EG(error_reporting_ini_entry)-value); + } + EG(error_reporting_ini_entry)-value = estrndup(0, sizeof(0)-1); +
[PHP-CVS] svn: /php/php-src/trunk/ NEWS
andrey Tue, 17 Aug 2010 15:39:26 + Revision: http://svn.php.net/viewvc?view=revisionrevision=302393 Log: here comes the news Changed paths: U php/php-src/trunk/NEWS Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2010-08-17 15:37:44 UTC (rev 302392) +++ php/php-src/trunk/NEWS 2010-08-17 15:39:26 UTC (rev 302393) @@ -89,6 +89,8 @@ - Removed support for linking against MySQL client libraries older 4.1 from PDO_mysql. (Johannes) +- Deprecated mysql_list_dbs() (Request #50667). (Andrey) + - Implemented FR #52555 (Ability to get HTTP response code). (Paul Dragoonis) - Implemented FR #51295 (SQLite3::busyTimeout not existing). (Mark) - Implemented FR #48632 (OpenSSL AES support). (yonas dot 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 ext/pdo_mysql/config.m4 ext/pdo_mysql/mysql_driver.c ext/pdo_mysql/mysql_statement.c ext/pdo_mysql/php_pdo_mysql_int.h
johannes Thu, 05 Aug 2010 13:29:44 + Revision: http://svn.php.net/viewvc?view=revisionrevision=301877 Log: - Drop (broken) support for libmysql 3.23 and 4.0 from pdo_mysql, see bug #51259 Bug: http://bugs.php.net/51259 (Assigned) PHP 5.3.2 + PDO MySQL not compatible with MySQL 4.0 Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/ext/pdo_mysql/config.m4 U php/php-src/trunk/ext/pdo_mysql/mysql_driver.c U php/php-src/trunk/ext/pdo_mysql/mysql_statement.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 2010-08-05 13:10:15 UTC (rev 301876) +++ php/php-src/trunk/NEWS 2010-08-05 13:29:44 UTC (rev 301877) @@ -86,6 +86,9 @@ functions. (Kalle) . y2k_compliance ini option. (Kalle) +- Removed support for linking against MySQL client libraries older 4.1 from + PDO_mysql. (Johannes) + - Implemented FR #51295 (SQLite3::busyTimeout not existing). (Mark) - Implemented FR #48632 (OpenSSL AES support). (yonas dot y at gmail dot com, Pierre) Modified: php/php-src/trunk/ext/pdo_mysql/config.m4 === --- php/php-src/trunk/ext/pdo_mysql/config.m4 2010-08-05 13:10:15 UTC (rev 301876) +++ php/php-src/trunk/ext/pdo_mysql/config.m4 2010-08-05 13:29:44 UTC (rev 301877) @@ -100,15 +100,15 @@ AC_MSG_ERROR([Unable to find your mysql installation]) fi -PHP_CHECK_LIBRARY($PDO_MYSQL_LIBNAME, mysql_query, +PHP_CHECK_LIBRARY($PDO_MYSQL_LIBNAME, mysql_commit, [ PHP_EVAL_INCLINE($PDO_MYSQL_INCLUDE) PHP_EVAL_LIBLINE($PDO_MYSQL_LIBS, PDO_MYSQL_SHARED_LIBADD) ],[ if test $PHP_ZLIB_DIR != no; then PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_DIR, PDO_MYSQL_SHARED_LIBADD) -PHP_CHECK_LIBRARY($PDO_MYSQL_LIBNAME, mysql_query, [], [ - AC_MSG_ERROR([PDO_MYSQL configure failed. Please check config.log for more information.]) +PHP_CHECK_LIBRARY($PDO_MYSQL_LIBNAME, mysql_commit, [], [ + AC_MSG_ERROR([PDO_MYSQL configure failed, MySQL 4.1 needed. Please check config.log for more information.]) ], [ -L$PHP_ZLIB_DIR/$PHP_LIBDIR -L$PDO_MYSQL_LIB_DIR ]) @@ -128,11 +128,6 @@ ],[ $PDO_MYSQL_LIBS ]) - -_SAVE_LIBS=$LIBS -LIBS=$LIBS $PDO_MYSQL_LIBS -AC_CHECK_FUNCS([mysql_commit mysql_stmt_prepare mysql_next_result mysql_sqlstate]) -LIBS=$_SAVE_LIBS fi ifdef([PHP_CHECK_PDO_INCLUDES], Modified: php/php-src/trunk/ext/pdo_mysql/mysql_driver.c === --- php/php-src/trunk/ext/pdo_mysql/mysql_driver.c 2010-08-05 13:10:15 UTC (rev 301876) +++ php/php-src/trunk/ext/pdo_mysql/mysql_driver.c 2010-08-05 13:29:44 UTC (rev 301877) @@ -42,17 +42,6 @@ # define pdo_mysql_init(persistent) mysql_init(NULL) #endif -#if !HAVE_MYSQL_SQLSTATE !PDO_USE_MYSQLND -static const char *pdo_mysql_get_sqlstate(unsigned int my_errno) { /* {{{ */ - switch (my_errno) { - /* import auto-generated case: code */ -#include php_pdo_mysql_sqlstate.h - default: return HY000; - } -} -/* }}} */ -#endif - /* {{{ _pdo_mysql_error */ int _pdo_mysql_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *file, int line TSRMLS_DC) /* {{{ */ { @@ -72,13 +61,9 @@ einfo = H-einfo; } -#if HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSQLND if (S S-stmt) { einfo-errcode = mysql_stmt_errno(S-stmt); - } - else -#endif - { + } else { einfo-errcode = mysql_errno(H-server); } @@ -112,18 +97,11 @@ PDO_DBG_RETURN(0); } -#if HAVE_MYSQL_SQLSTATE || PDO_USE_MYSQLND -# if HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSQLND if (S S-stmt) { strcpy(*pdo_err, mysql_stmt_sqlstate(S-stmt)); - } else -# endif - { + } else { strcpy(*pdo_err, mysql_sqlstate(H-server)); } -#else - strcpy(*pdo_err, pdo_mysql_get_sqlstate(einfo-errcode)); -#endif if (!dbh-methods) { PDO_DBG_INF(Throwing exception); @@ -187,12 +165,10 @@ { pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh-driver_data; pdo_mysql_stmt *S = ecalloc(1, sizeof(pdo_mysql_stmt)); -#if HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSQLND char *nsql = NULL; int nsql_len = 0; int ret; int server_version; -#endif PDO_DBG_ENTER(mysql_handle_preparer); PDO_DBG_INF_FMT(dbh=%p, dbh); @@ -206,7 +182,6 @@ goto end; } -#if HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSQLND server_version = mysql_get_server_version(H-server); if (server_version 40100) { goto fallback; @@ -270,7 +245,6 @@ PDO_DBG_RETURN(1); fallback: -#endif end: stmt-supports_placeholders = PDO_PLACEHOLDER_NONE; @@ -296,7 +270,6 @@ PDO_DBG_RETURN(H-einfo.errcode ? -1 : 0); } else { -#if HAVE_MYSQL_NEXT_RESULT || PDO_USE_MYSQLND /* MULTI_QUERY support - eat up all unfetched result sets */ MYSQL_RES* result; while (mysql_more_results(H-server))
[PHP-CVS] svn: /php/php-src/trunk/ NEWS
gron Sun, 01 Aug 2010 20:53:32 + Revision: http://svn.php.net/viewvc?view=revisionrevision=301768 Log: Added Traits to the NEWS file. #There doesn't seem to be a consitent ordering, #so I put it in front of the list, since it is a major language addition. Hope thats ok. Changed paths: U php/php-src/trunk/NEWS Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2010-08-01 18:19:09 UTC (rev 301767) +++ php/php-src/trunk/NEWS 2010-08-01 20:53:32 UTC (rev 301768) @@ -30,6 +30,7 @@ - Added an optimization which saves memory and emalloc/efree calls for empty HashTables (Stas, Dmitry) +- Added support for Traits. (Stefan) - Added array dereferencing support. (Felipe) - Added DTrace support. (David Soria Parra) - Added Tokyo Cabinet abstract DB support to ext/dba. (Michael Maclean) -- 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 Zend/zend_ptr_stack.c Zend/zend_ptr_stack.h
dmitry Fri, 09 Jul 2010 07:31:18 + Revision: http://svn.php.net/viewvc?view=revisionrevision=301106 Log: zend_ptr_stack allocation is delayed before the actual usage Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/Zend/zend_ptr_stack.c U php/php-src/trunk/Zend/zend_ptr_stack.h Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2010-07-09 05:33:03 UTC (rev 301105) +++ php/php-src/trunk/NEWS 2010-07-09 07:31:18 UTC (rev 301106) @@ -18,7 +18,7 @@ A constant class name may be used as a direct operand of ZEND_FETCH_* instruction without previous ZEND_FETCH_CLASS. . eliminated unnecessary iterations during request startup/shutdown - . zend_stack initialization is delayed before the actual usage + . zend_stack and zend_ptr_stack allocation is delayed before the actual usage . $GLOBALS became a JIT autoglobal, so it's initialized only if used (this may affect opcode caches) - Added concept of interned strings. All strings constants known at compile Modified: php/php-src/trunk/Zend/zend_ptr_stack.c === --- php/php-src/trunk/Zend/zend_ptr_stack.c 2010-07-09 05:33:03 UTC (rev 301105) +++ php/php-src/trunk/Zend/zend_ptr_stack.c 2010-07-09 07:31:18 UTC (rev 301106) @@ -27,9 +27,8 @@ ZEND_API void zend_ptr_stack_init_ex(zend_ptr_stack *stack, zend_bool persistent) { - stack-top_element = stack-elements = (void **) pemalloc(sizeof(void *)*PTR_STACK_BLOCK_SIZE, persistent); - stack-max = PTR_STACK_BLOCK_SIZE; - stack-top = 0; + stack-top_element = stack-elements = NULL; + stack-top = stack-max = 0; stack-persistent = persistent; } Modified: php/php-src/trunk/Zend/zend_ptr_stack.h === --- php/php-src/trunk/Zend/zend_ptr_stack.h 2010-07-09 05:33:03 UTC (rev 301105) +++ php/php-src/trunk/Zend/zend_ptr_stack.h 2010-07-09 07:31:18 UTC (rev 301106) @@ -46,8 +46,9 @@ #define ZEND_PTR_STACK_RESIZE_IF_NEEDED(stack, count) \ if (stack-top+count stack-max) { \ /* we need to allocate more memory */ \ - stack-max *= 2; \ - stack-max += count; \ + do { \ + stack-max += PTR_STACK_BLOCK_SIZE; \ + } while (stack-top+count stack-max); \ stack-elements = (void **) perealloc(stack-elements, (sizeof(void *) * (stack-max)), stack-persistent); \ stack-top_element = stack-elements+stack-top;\ } -- 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 Zend/micro_bench.php Zend/zend.c Zend/zend_compile.c Zend/zend_compile.h Zend/zend_execute_API.c ext/session/session.c main/php_variables.c
dmitry Thu, 08 Jul 2010 14:05:11 + Revision: http://svn.php.net/viewvc?view=revisionrevision=301081 Log: - use interned strings for auto globals - $GLOBALS became a JIT autoglobal, so it's initialized only if used (this may affect opcode caches) Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/Zend/micro_bench.php U php/php-src/trunk/Zend/zend.c U php/php-src/trunk/Zend/zend_compile.c U php/php-src/trunk/Zend/zend_compile.h U php/php-src/trunk/Zend/zend_execute_API.c U php/php-src/trunk/ext/session/session.c U php/php-src/trunk/main/php_variables.c Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2010-07-08 13:59:53 UTC (rev 301080) +++ php/php-src/trunk/NEWS 2010-07-08 14:05:11 UTC (rev 301081) @@ -19,6 +19,8 @@ instruction without previous ZEND_FETCH_CLASS. . eliminated unnecessary iterations during request startup/shutdown . zend_stack initialization is delayed before the actual usage + . $GLOBALS became a JIT autoglobal, so it's initialized only if used +(this may affect opcode caches) - Added concept of interned strings. All strings constants known at compile time are allocated in a single copy and never changed. (Dmitry) - Added an optimization which saves memory and emalloc/efree calls for empty Modified: php/php-src/trunk/Zend/micro_bench.php === --- php/php-src/trunk/Zend/micro_bench.php 2010-07-08 13:59:53 UTC (rev 301080) +++ php/php-src/trunk/Zend/micro_bench.php 2010-07-08 14:05:11 UTC (rev 301081) @@ -174,6 +174,20 @@ } } +function read_auto_global($n) { + for ($i = 0; $i $n; ++$i) { + $x = $_GET; + } +} + +$g_var = 0; + +function read_global_var($n) { + for ($i = 0; $i $n; ++$i) { + $x = $GLOBALS['g_var']; + } +} + /*/ function empty_loop($n) { @@ -282,4 +296,8 @@ $t = end_test($t, 'new Foo()', $overhead); read_const(N); $t = end_test($t, '$x = TEST', $overhead); +read_auto_global(N); +$t = end_test($t, '$x = $_GET', $overhead); +read_global_var(N); +$t = end_test($t, '$x = $GLOBALS[\'v\']', $overhead); total($t0, Total); Modified: php/php-src/trunk/Zend/zend.c === --- php/php-src/trunk/Zend/zend.c 2010-07-08 13:59:53 UTC (rev 301080) +++ php/php-src/trunk/Zend/zend.c 2010-07-08 14:05:11 UTC (rev 301081) @@ -593,6 +593,20 @@ void zend_init_opcodes_handlers(void); +static zend_bool php_auto_globals_create_globals(char *name, uint name_len TSRMLS_DC) /* {{{ */ +{ + zval *globals; + + ALLOC_ZVAL(globals); + Z_SET_REFCOUNT_P(globals, 1); + Z_SET_ISREF_P(globals); + Z_TYPE_P(globals) = IS_ARRAY; + Z_ARRVAL_P(globals) = EG(symbol_table); + zend_hash_update(EG(symbol_table), name, name_len + 1, globals, sizeof(zval *), NULL); + return 0; +} +/* }}} */ + int zend_startup(zend_utility_functions *utility_functions, char **extensions TSRMLS_DC) /* {{{ */ { #ifdef ZTS @@ -660,7 +674,7 @@ zend_hash_init_ex(GLOBAL_FUNCTION_TABLE, 100, NULL, ZEND_FUNCTION_DTOR, 1, 0); zend_hash_init_ex(GLOBAL_CLASS_TABLE, 10, NULL, ZEND_CLASS_DTOR, 1, 0); - zend_hash_init_ex(GLOBAL_AUTO_GLOBALS_TABLE, 8, NULL, (dtor_func_t) zend_auto_global_dtor, 1, 0); + zend_hash_init_ex(GLOBAL_AUTO_GLOBALS_TABLE, 8, NULL, NULL, 1, 0); zend_hash_init_ex(GLOBAL_CONSTANTS_TABLE, 20, NULL, ZEND_CONSTANT_DTOR, 1, 0); zend_hash_init_ex(module_registry, 50, NULL, ZEND_MODULE_DTOR, 1, 0); @@ -701,7 +715,7 @@ zend_interned_strings_init(TSRMLS_C); zend_startup_builtin_functions(TSRMLS_C); zend_register_standard_constants(TSRMLS_C); - zend_register_auto_global(GLOBALS, sizeof(GLOBALS) - 1, NULL TSRMLS_CC); + zend_register_auto_global(GLOBALS, sizeof(GLOBALS) - 1, 1, php_auto_globals_create_globals TSRMLS_CC); #ifndef ZTS zend_init_rsrc_plist(TSRMLS_C); Modified: php/php-src/trunk/Zend/zend_compile.c === --- php/php-src/trunk/Zend/zend_compile.c 2010-07-08 13:59:53 UTC (rev 301080) +++ php/php-src/trunk/Zend/zend_compile.c 2010-07-08 14:05:11 UTC (rev 301081) @@ -163,27 +163,6 @@ /* }}} */ -int zend_auto_global_arm(zend_auto_global *auto_global TSRMLS_DC) /* {{{ */ -{ - auto_global-armed = (auto_global-auto_global_callback ? 1 : 0); - return 0; -} -/* }}} */ - - -ZEND_API int zend_auto_global_disable_jit(const char *varname, zend_uint varname_length TSRMLS_DC) /* {{{ */ -{ - zend_auto_global *auto_global; - - if (zend_hash_find(CG(auto_globals), varname, varname_length+1, (void **) auto_global)==FAILURE) { - return FAILURE; - } - auto_global-armed = 0; - return SUCCESS; -} -/* }}} */ - - static void init_compiler_declarables(TSRMLS_D) /* {{{ */ { Z_TYPE(CG(declarables).ticks) = IS_LONG; @@ -211,7 +190,6 @@ CG(has_bracketed_namespaces) = 0; CG(current_import) = NULL;
[PHP-CVS] svn: /php/php-src/trunk/ NEWS
sebastianThu, 08 Jul 2010 15:05:22 + Revision: http://svn.php.net/viewvc?view=revisionrevision=301084 Log: Fugbix typo. Changed paths: U php/php-src/trunk/NEWS Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2010-07-08 14:25:38 UTC (rev 301083) +++ php/php-src/trunk/NEWS 2010-07-08 15:05:22 UTC (rev 301084) @@ -13,7 +13,7 @@ . ZEND_RETURN is splitted into two new instructions ZEND_RETURN and ZEND_RETURN_BY_REF . optimized access to global constants using values with pre-calculated -hash_values from litersls table +hash_values from literals table . optimized access to static properties using executor specialization. A constant class name may be used as a direct operand of ZEND_FETCH_* instruction without previous ZEND_FETCH_CLASS. -- 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 Zend/zend.c Zend/zend_API.c Zend/zend_API.h Zend/zend_compile.c Zend/zend_compile.h Zend/zend_execute_API.c Zend/zend_opcode.c
dmitry Tue, 06 Jul 2010 11:40:17 + Revision: http://svn.php.net/viewvc?view=revisionrevision=301021 Log: eliminated unnecessary iterations during request startup/shutdown Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/Zend/zend.c U php/php-src/trunk/Zend/zend_API.c U php/php-src/trunk/Zend/zend_API.h U php/php-src/trunk/Zend/zend_compile.c U php/php-src/trunk/Zend/zend_compile.h U php/php-src/trunk/Zend/zend_execute_API.c U php/php-src/trunk/Zend/zend_opcode.c Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2010-07-06 11:37:19 UTC (rev 301020) +++ php/php-src/trunk/NEWS 2010-07-06 11:40:17 UTC (rev 301021) @@ -17,6 +17,7 @@ . optimized access to static properties using executor specialization. A constant class name may be used as a direct operand of ZEND_FETCH_* instruction without previous ZEND_FETCH_CLASS. + . eliminated unnecessary iterations during request startup/shutdown - Added concept of interned strings. All strings constants known at compile time are allocated in a single copy and never changed. (Dmitry) - Added an optimization which saves memory and emalloc/efree calls for empty Modified: php/php-src/trunk/Zend/zend.c === --- php/php-src/trunk/Zend/zend.c 2010-07-06 11:37:19 UTC (rev 301020) +++ php/php-src/trunk/Zend/zend.c 2010-07-06 11:40:17 UTC (rev 301021) @@ -761,7 +761,7 @@ zend_shutdown_timeout_thread(); #endif zend_destroy_rsrc_list(EG(persistent_list) TSRMLS_CC); - zend_hash_graceful_reverse_destroy(module_registry); + zend_destroy_modules(); zend_hash_destroy(GLOBAL_FUNCTION_TABLE); zend_hash_destroy(GLOBAL_CLASS_TABLE); @@ -859,22 +859,6 @@ } /* }}} */ -void zend_activate_modules(TSRMLS_D) /* {{{ */ -{ - zend_hash_apply(module_registry, (apply_func_t) module_registry_request_startup TSRMLS_CC); -} -/* }}} */ - -void zend_deactivate_modules(TSRMLS_D) /* {{{ */ -{ - EG(opline_ptr) = NULL; /* we're no longer executing anything */ - - zend_try { - zend_hash_reverse_apply(module_registry, (apply_func_t) module_registry_cleanup TSRMLS_CC); - } zend_end_try(); -} -/* }}} */ - void zend_call_destructors(TSRMLS_D) /* {{{ */ { zend_try { @@ -928,22 +912,6 @@ } /* }}} */ -static int exec_done_cb(zend_module_entry *module TSRMLS_DC) /* {{{ */ -{ - if (module-post_deactivate_func) { - module-post_deactivate_func(); - } - return 0; -} -/* }}} */ - -void zend_post_deactivate_modules(TSRMLS_D) /* {{{ */ -{ - zend_hash_apply(module_registry, (apply_func_t) exec_done_cb TSRMLS_CC); - zend_hash_reverse_apply(module_registry, (apply_func_t) module_registry_unload_temp TSRMLS_CC); -} -/* }}} */ - BEGIN_EXTERN_C() ZEND_API void zend_message_dispatcher(long message, void *data TSRMLS_DC) /* {{{ */ { Modified: php/php-src/trunk/Zend/zend_API.c === --- php/php-src/trunk/Zend/zend_API.c 2010-07-06 11:37:19 UTC (rev 301020) +++ php/php-src/trunk/Zend/zend_API.c 2010-07-06 11:40:17 UTC (rev 301021) @@ -36,6 +36,12 @@ static int module_count=0; ZEND_API HashTable module_registry; +static zend_module_entry **module_request_startup_handlers; +static zend_module_entry **module_request_shutdown_handlers; +static zend_module_entry **module_post_deactivate_handlers; + +static zend_class_entry **class_cleanup_handlers; + /* this function doesn't check for too many parameters */ ZEND_API int zend_get_parameters(int ht, int param_count, ...) /* {{{ */ { @@ -1679,14 +1685,101 @@ } /* }}} */ +static void zend_collect_module_handlers(void) /* {{{ */ +{ + HashPosition pos; + zend_module_entry *module; + int startup_count = 0; + int shutdown_count = 0; + int post_deactivate_count = 0; + zend_class_entry **pce; + int class_count = 0; + + /* Collect extensions with request startup/shutdown handlers */ + for (zend_hash_internal_pointer_reset_ex(module_registry, pos); + zend_hash_get_current_data_ex(module_registry, (void *) module, pos) == SUCCESS; + zend_hash_move_forward_ex(module_registry, pos)) { + if (module-request_startup_func) { + startup_count++; + } + if (module-request_shutdown_func) { + shutdown_count++; + } + if (module-post_deactivate_func) { + post_deactivate_count++; + } + } + module_request_startup_handlers = (zend_module_entry**)malloc( + sizeof(zend_module_entry*) * + (startup_count + 1 + + shutdown_count + 1 + + post_deactivate_count + 1)); + module_request_startup_handlers[startup_count] = NULL; + module_request_shutdown_handlers = module_request_startup_handlers + startup_count + 1; + module_request_shutdown_handlers[shutdown_count] = NULL; + module_post_deactivate_handlers = module_request_shutdown_handlers + shutdown_count + 1; + module_post_deactivate_handlers[post_deactivate_count] = NULL; + startup_count = 0; +
[PHP-CVS] svn: /php/php-src/trunk/ NEWS Zend/zend_stack.c
dmitry Tue, 06 Jul 2010 16:09:43 + Revision: http://svn.php.net/viewvc?view=revisionrevision=301027 Log: zend_stack initialization is delayed before the actual usage Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/Zend/zend_stack.c Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2010-07-06 15:52:39 UTC (rev 301026) +++ php/php-src/trunk/NEWS 2010-07-06 16:09:43 UTC (rev 301027) @@ -18,6 +18,7 @@ A constant class name may be used as a direct operand of ZEND_FETCH_* instruction without previous ZEND_FETCH_CLASS. . eliminated unnecessary iterations during request startup/shutdown + . zend_stack initialization is delayed before the actual usage - Added concept of interned strings. All strings constants known at compile time are allocated in a single copy and never changed. (Dmitry) - Added an optimization which saves memory and emalloc/efree calls for empty Modified: php/php-src/trunk/Zend/zend_stack.c === --- php/php-src/trunk/Zend/zend_stack.c 2010-07-06 15:52:39 UTC (rev 301026) +++ php/php-src/trunk/Zend/zend_stack.c 2010-07-06 16:09:43 UTC (rev 301027) @@ -25,13 +25,9 @@ ZEND_API int zend_stack_init(zend_stack *stack) { stack-top = 0; - stack-elements = (void **) emalloc(sizeof(void **) * STACK_BLOCK_SIZE); - if (!stack-elements) { - return FAILURE; - } else { - stack-max = STACK_BLOCK_SIZE; - return SUCCESS; - } + stack-max = 0; + stack-elements = NULL; + return SUCCESS; } ZEND_API int zend_stack_push(zend_stack *stack, const void *element, int size) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php