[PHP-CVS] com php-src: Enabled O+ build by default (it may be disabled before 5.0.0 release): ext/opcache/config.m4

2013-03-16 Thread Dmitry Stogov
Commit:930b272d700a7f854357628e446505fab29906a8
Author:Dmitry Stogov  Sun, 17 Mar 2013 10:58:30 
+0400
Parents:   07b1eaa6097903084be2abf0273dd1ed8e91b0d4
Branches:  PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=930b272d700a7f854357628e446505fab29906a8

Log:
Enabled O+ build by default (it may be disabled before 5.0.0 release)

Changed paths:
  M  ext/opcache/config.m4


Diff:
diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4
index 4e41c8b..a217234 100644
--- a/ext/opcache/config.m4
+++ b/ext/opcache/config.m4
@@ -3,7 +3,7 @@ dnl $Id$
 dnl
 
 PHP_ARG_ENABLE(opcache, whether to enable Zend Optimizer+ support,
-[  --enable-opcache Enable Zend Optimizer+ support])
+[  --enable-opcache Enable Zend Optimizer+ support], yes)
 
 if test "$PHP_OPCACHE" != "no"; then


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



[PHP-CVS] com php-src: Removed files that are neccessary only for standalone pecl branch: ext/opcache/.gitignore ext/opcache/.travis.yml ext/opcache/LICENSE ext/opcache/package.xml

2013-03-16 Thread Dmitry Stogov
Commit:07b1eaa6097903084be2abf0273dd1ed8e91b0d4
Author:Dmitry Stogov  Sun, 17 Mar 2013 10:40:59 
+0400
Parents:   fa3fc711d3fb54bf1746138ffcf7f46426921204
Branches:  PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=07b1eaa6097903084be2abf0273dd1ed8e91b0d4

Log:
Removed files that are neccessary only for standalone pecl branch

Changed paths:
  D  ext/opcache/.gitignore
  D  ext/opcache/.travis.yml
  D  ext/opcache/LICENSE
  D  ext/opcache/package.xml

diff --git a/ext/opcache/.gitignore b/ext/opcache/.gitignore
deleted file mode 100644
index 8f2bec9..000
--- a/ext/opcache/.gitignore
+++ /dev/null
@@ -1,87 +0,0 @@
-# General Ignores
-*~
-.#*
-*.
-*.slo
-*.mk
-*.mem
-*.gcda
-*.gcno
-*.la
-*.lo
-*.o
-*.a
-*.ncb
-*.opt
-*.plg
-*swp
-*.patch
-*.tgz
-*.tar.gz
-*.tar.bz2
-.FBCIndex
-.FBCLockFolder
-.deps
-.libs
-phpt.*
-core
-dynlib.m4
-Debug
-Debug_TS
-Makefile
-Makefile.fragments
-Makefile.objects
-Makefile.global
-Release
-Release_TS
-Release_TSDbg
-Release_TS_inline
-Release_inline
-ZendEngine1
-_libs
-acconfig.h
-aclocal.m4
-acinclude.m4
-autom4te.cache
-bsd_converted
-buildconf.stamp
-buildmk.stamp
-confdefs.h
-config.h
-config.guess
-config.cache
-config.h.in
-config.log
-config.nice
-config.nice.bat
-config.status
-config.sub
-config_vars.mk
-configuration-parser.c
-configuration-parser.h
-configuration-parser.output
-configuration-scanner.c
-configure
-configure.in
-configure.bat
-configure.js
-conftest
-conftest.c
-debug.log
-diff
-generated_lists
-include
-install-sh
-internal_functions.c
-lcov_data
-lcov_html
-libs
-libtool
-ltmain.sh
-meta_cc
-meta_ccld
-missing
-mkinstalldirs
-modules
-build
-run-tests.php
diff --git a/ext/opcache/.travis.yml b/ext/opcache/.travis.yml
deleted file mode 100644
index b876f57..000
--- a/ext/opcache/.travis.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-language: php
-php:
-  - 5.2
-  - 5.3
-  - 5.4
-  - 5.5
-
-before_script:
-  - phpize
-  - ./configure --enable-optimizer-plus
-  - make
-
-script:
-  - php -d zend_extension=`pwd`/modules/ZendOptimizerPlus.so -m | grep "Zend 
Optimizer+"
\ No newline at end of file
diff --git a/ext/opcache/LICENSE b/ext/opcache/LICENSE
deleted file mode 100644
index 42536af..000
--- a/ext/opcache/LICENSE
+++ /dev/null
@@ -1,68 +0,0 @@
- 
-  The PHP License, version 3.01
-Copyright (c) 1999 - 2012 The PHP Group. All rights reserved.
- 
-
-Redistribution and use in source and binary forms, with or without
-modification, is permitted provided that the following conditions
-are met:
-
-  1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- 
-  2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
- 
-  3. The name "PHP" must not be used to endorse or promote products
- derived from this software without prior written permission. For
- written permission, please contact gr...@php.net.
-  
-  4. Products derived from this software may not be called "PHP", nor
- may "PHP" appear in their name, without prior written permission
- from gr...@php.net.  You may indicate that your software works in
- conjunction with PHP by saying "Foo for PHP" instead of calling
- it "PHP Foo" or "phpfoo"
- 
-  5. The PHP Group may publish revised and/or new versions of the
- license from time to time. Each version will be given a
- distinguishing version number.
- Once covered code has been published under a particular version
- of the license, you may always continue to use it under the terms
- of that version. You may also choose to use such covered code
- under the terms of any subsequent version of the license
- published by the PHP Group. No one other than the PHP Group has
- the right to modify the terms applicable to covered code created
- under this License.
-
-  6. Redistributions of any form whatsoever must retain the following
- acknowledgment:
- "This product includes PHP software, freely available from
- ".
-
-THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND 
-ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 
-PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE PHP
-DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT

Re: [PHP-CVS] com php-src: Fixed compatibility with ext/phar: ext/opcache/ZendAccelerator.c ext/opcache/zend_accelerator_module.c

2013-03-16 Thread Dmitry Stogov
Hi Stas,

On Sat, Mar 16, 2013 at 9:50 PM, Stas Malyshev wrote:

> Hi!
>
> > Commit:92430bcf5dd76bf9b12363693efcc471b3527618
> > Author:Dmitry Stogov  Sat, 16 Mar 2013
> 16:08:11 +0400
> > Parents:   ac05e68f5523a2cd1b4972f43188e65c29ef4ae4
> > Branches:  PHP-5.5 master
> >
> > Link:
> http://git.php.net/?p=php-src.git;a=commitdiff;h=92430bcf5dd76bf9b12363693efcc471b3527618
> >
> > Log:
> > Fixed compatibility with ext/phar
> >
> > Changed paths:
> >   M  ext/opcache/ZendAccelerator.c
> >   M  ext/opcache/zend_accelerator_module.c
> >
> >
> > Diff:
> > diff --git a/ext/opcache/ZendAccelerator.c
> b/ext/opcache/ZendAccelerator.c
> > index 17eac09..daf80ce 100644
> > --- a/ext/opcache/ZendAccelerator.c
> > +++ b/ext/opcache/ZendAccelerator.c
> > @@ -1221,7 +1221,9 @@ static zend_persistent_script
> *compile_and_cache_file(zend_file_handle *file_han
> >   }
> >
> >  #if ZEND_EXTENSION_API_NO >= PHP_5_3_X_API_NO
> > - if (file_handle->type == ZEND_HANDLE_STREAM) {
> > + if (file_handle->type == ZEND_HANDLE_STREAM &&
> > + (!strstr(file_handle->filename, ".phar") ||
> > +  strstr(file_handle->filename, "://"))) {
> >   char *buf;
> >   size_t size;
>
> I think we here are taking too broad approach. This disables O+ for any
> file that is loaded via a stream, if I understand it correctly - but
>

First of all these checks are not going to disable file caching. They are
used to disable file preloading using zend_stream_fixup().
It's necessary to preload STREAMS because their reading at compile-time may
cause some user callback invocation that may be executed in wrong context.


> many streams are just fine, e.g. file://, and many user streams that
> don't do weird things but do normal work like reading files, etc. can
> probably be compatible. In fact, it's be very good idea to make phar
> play nice with O+ - otherwise any phar distro automatically gets
> performance penalty. What's the reason phar is excluded?
>

The test ext/phar/tests/phar_mount.phpt was failed before the fix.

Also, the check itself is wrong - it checks for filename which contains
> .phar anywhere, so something like /htdocs/moses.vs.pharaoh/index.php
> would be wrongly considered a phar file.
>

This is the inverted check taken from ext/phar/phar.c:3337
phar_compile_file().
I agree it's not accurate.

Thanks. Dmitry.


> --
> Stanislav Malyshev, Software Architect
> SugarCRM: http://www.sugarcrm.com/
> (408)454-6900 ext. 227
>


Re: [PHP-CVS] com php-src: Made test compatible with O+: Zend/tests/bug55156.phpt Zend/tests/ns_026.phpt ext/phar/tests/create_new_and_modify.phpt ext/phar/tests/delete_in_phar.phpt ext/phar/tests/del

2013-03-16 Thread Dmitry Stogov
Hi Stas,

That sleep()s are used only if you run tests with O+ enabled.
Rhey used only in ~10 phar relate tests that update on the fly and include
the same files.
With cache enabled these files has to have different modification times.

Actually, we may just disable O+, but my goal was to check O+ with the
whole php test suite.
Moving the code in separate file may make sense.

Thanks. Dmitry.

On Sat, Mar 16, 2013 at 9:42 PM, Stas Malyshev wrote:

> Hi!
>
> > Commit:e9641141aaad136757af06fddd6d870147ac2000
> > Author:Dmitry Stogov  Sat, 16 Mar 2013
> 16:11:00 +0400
> > Parents:   92430bcf5dd76bf9b12363693efcc471b3527618
> > Branches:  PHP-5.5 master
> >
> > Link:
> http://git.php.net/?p=php-src.git;a=commitdiff;h=e9641141aaad136757af06fddd6d870147ac2000
> >
> > Log:
> > Made test compatible with O+
>
> +if (function_exists("opcache_get_status")) {
> +   $status = opcache_get_status();
> +   if ($status["opcache_enabled"]) {
> +   ini_set("opcache.revalidate_freq", "0");
> +   sleep(2);
> +   }
> +}
>
> Why we need sleep here? Our tests are not too fast anyway, but adding so
> many sleeps will add another 20-30 secs to the run, can't we do without
> it? Also, doesn't it make sense to put this code into some file and not
> copy it into every test separately?
>
> --
> Stanislav Malyshev, Software Architect
> SugarCRM: http://www.sugarcrm.com/
> (408)454-6900 ext. 227
>


Re: [PHP-CVS] com php-src: Fixed compatibility with ext/phar: ext/opcache/ZendAccelerator.c ext/opcache/zend_accelerator_module.c

2013-03-16 Thread Stas Malyshev
Hi!

> Commit:92430bcf5dd76bf9b12363693efcc471b3527618
> Author:Dmitry Stogov  Sat, 16 Mar 2013 16:08:11 
> +0400
> Parents:   ac05e68f5523a2cd1b4972f43188e65c29ef4ae4
> Branches:  PHP-5.5 master
> 
> Link:   
> http://git.php.net/?p=php-src.git;a=commitdiff;h=92430bcf5dd76bf9b12363693efcc471b3527618
> 
> Log:
> Fixed compatibility with ext/phar
> 
> Changed paths:
>   M  ext/opcache/ZendAccelerator.c
>   M  ext/opcache/zend_accelerator_module.c
> 
> 
> Diff:
> diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c
> index 17eac09..daf80ce 100644
> --- a/ext/opcache/ZendAccelerator.c
> +++ b/ext/opcache/ZendAccelerator.c
> @@ -1221,7 +1221,9 @@ static zend_persistent_script 
> *compile_and_cache_file(zend_file_handle *file_han
>   }
>  
>  #if ZEND_EXTENSION_API_NO >= PHP_5_3_X_API_NO
> - if (file_handle->type == ZEND_HANDLE_STREAM) {
> + if (file_handle->type == ZEND_HANDLE_STREAM &&
> + (!strstr(file_handle->filename, ".phar") ||
> +  strstr(file_handle->filename, "://"))) {
>   char *buf;
>   size_t size;

I think we here are taking too broad approach. This disables O+ for any
file that is loaded via a stream, if I understand it correctly - but
many streams are just fine, e.g. file://, and many user streams that
don't do weird things but do normal work like reading files, etc. can
probably be compatible. In fact, it's be very good idea to make phar
play nice with O+ - otherwise any phar distro automatically gets
performance penalty. What's the reason phar is excluded?

Also, the check itself is wrong - it checks for filename which contains
.phar anywhere, so something like /htdocs/moses.vs.pharaoh/index.php
would be wrongly considered a phar file.
-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

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



Re: [PHP-CVS] com php-src: Made test compatible with O+: Zend/tests/bug55156.phpt Zend/tests/ns_026.phpt ext/phar/tests/create_new_and_modify.phpt ext/phar/tests/delete_in_phar.phpt ext/phar/tests/del

2013-03-16 Thread Stas Malyshev
Hi!

> Commit:e9641141aaad136757af06fddd6d870147ac2000
> Author:Dmitry Stogov  Sat, 16 Mar 2013 16:11:00 
> +0400
> Parents:   92430bcf5dd76bf9b12363693efcc471b3527618
> Branches:  PHP-5.5 master
> 
> Link:   
> http://git.php.net/?p=php-src.git;a=commitdiff;h=e9641141aaad136757af06fddd6d870147ac2000
> 
> Log:
> Made test compatible with O+

+if (function_exists("opcache_get_status")) {
+   $status = opcache_get_status();
+   if ($status["opcache_enabled"]) {
+   ini_set("opcache.revalidate_freq", "0");
+   sleep(2);
+   }
+}

Why we need sleep here? Our tests are not too fast anyway, but adding so
many sleeps will add another 20-30 secs to the run, can't we do without
it? Also, doesn't it make sense to put this code into some file and not
copy it into every test separately?

-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

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



[PHP-CVS] com php-src: setting plausible default value for struct members: ext/date/php_date.c ext/date/tests/bug52113.phpt

2013-03-16 Thread Anatol Belski
Commit:fa3fc711d3fb54bf1746138ffcf7f46426921204
Author:Anatol Belski  Sat, 16 Mar 2013 18:07:21 +0100
Parents:   b46897941ac094e4e2fc09a5f1d4eeb7f8efca59
Branches:  PHP-5.5

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=fa3fc711d3fb54bf1746138ffcf7f46426921204

Log:
setting plausible default value for struct members

especially for unsigned members so they don't casted to max unsigned

Changed paths:
  M  ext/date/php_date.c
  M  ext/date/tests/bug52113.phpt


Diff:
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index b454dd0..a073aa6 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -4006,14 +4006,14 @@ static int php_date_interval_initialize_from_hash(zval 
**return_value, php_inter
 {
(*intobj)->diff = timelib_rel_time_ctor();
 
-#define PHP_DATE_INTERVAL_READ_PROPERTY(element, member, itype) \
+#define PHP_DATE_INTERVAL_READ_PROPERTY(element, member, itype, def) \
do { \
zval **z_arg = NULL; \
if (zend_hash_find(myht, element, strlen(element) + 1, (void**) 
&z_arg) == SUCCESS) { \
convert_to_long(*z_arg); \
(*intobj)->diff->member = (itype)Z_LVAL_PP(z_arg); \
} else { \
-   (*intobj)->diff->member = (itype)-1; \
+   (*intobj)->diff->member = (itype)def; \
} \
} while (0);
 
@@ -4028,21 +4028,21 @@ static int php_date_interval_initialize_from_hash(zval 
**return_value, php_inter
} \
} while (0);
 
-   PHP_DATE_INTERVAL_READ_PROPERTY("y", y, timelib_sll)
-   PHP_DATE_INTERVAL_READ_PROPERTY("m", m, timelib_sll)
-   PHP_DATE_INTERVAL_READ_PROPERTY("d", d, timelib_sll)
-   PHP_DATE_INTERVAL_READ_PROPERTY("h", h, timelib_sll)
-   PHP_DATE_INTERVAL_READ_PROPERTY("i", i, timelib_sll)
-   PHP_DATE_INTERVAL_READ_PROPERTY("s", s, timelib_sll)
-   PHP_DATE_INTERVAL_READ_PROPERTY("weekday", weekday, int)
-   PHP_DATE_INTERVAL_READ_PROPERTY("weekday_behavior", weekday_behavior, 
int)
-   PHP_DATE_INTERVAL_READ_PROPERTY("first_last_day_of", first_last_day_of, 
int)
-   PHP_DATE_INTERVAL_READ_PROPERTY("invert", invert, int);
+   PHP_DATE_INTERVAL_READ_PROPERTY("y", y, timelib_sll, -1)
+   PHP_DATE_INTERVAL_READ_PROPERTY("m", m, timelib_sll, -1)
+   PHP_DATE_INTERVAL_READ_PROPERTY("d", d, timelib_sll, -1)
+   PHP_DATE_INTERVAL_READ_PROPERTY("h", h, timelib_sll, -1)
+   PHP_DATE_INTERVAL_READ_PROPERTY("i", i, timelib_sll, -1)
+   PHP_DATE_INTERVAL_READ_PROPERTY("s", s, timelib_sll, -1)
+   PHP_DATE_INTERVAL_READ_PROPERTY("weekday", weekday, int, -1)
+   PHP_DATE_INTERVAL_READ_PROPERTY("weekday_behavior", weekday_behavior, 
int, -1)
+   PHP_DATE_INTERVAL_READ_PROPERTY("first_last_day_of", first_last_day_of, 
int, -1)
+   PHP_DATE_INTERVAL_READ_PROPERTY("invert", invert, int, 0);
PHP_DATE_INTERVAL_READ_PROPERTY_I64("days", days);
-   PHP_DATE_INTERVAL_READ_PROPERTY("special_type", special.type, unsigned 
int);
+   PHP_DATE_INTERVAL_READ_PROPERTY("special_type", special.type, unsigned 
int, 0);
PHP_DATE_INTERVAL_READ_PROPERTY_I64("special_amount", special.amount);
-   PHP_DATE_INTERVAL_READ_PROPERTY("have_weekday_relative", 
have_weekday_relative, unsigned int);
-   PHP_DATE_INTERVAL_READ_PROPERTY("have_special_relative", 
have_special_relative, unsigned int);
+   PHP_DATE_INTERVAL_READ_PROPERTY("have_weekday_relative", 
have_weekday_relative, unsigned int, 0);
+   PHP_DATE_INTERVAL_READ_PROPERTY("have_special_relative", 
have_special_relative, unsigned int, 0);
(*intobj)->initialized = 1;
 
return 0;
diff --git a/ext/date/tests/bug52113.phpt b/ext/date/tests/bug52113.phpt
index 226dae5..862e92e 100644
--- a/ext/date/tests/bug52113.phpt
+++ b/ext/date/tests/bug52113.phpt
@@ -189,13 +189,13 @@ object(DateInterval)#8 (15) {
   ["days"]=>
   string(4) "2400"
   ["special_type"]=>
-  int(-1)
+  int(0)
   ["special_amount"]=>
   string(2) "-1"
   ["have_weekday_relative"]=>
-  int(-1)
+  int(0)
   ["have_special_relative"]=>
-  int(-1)
+  int(0)
 }
 object(DatePeriod)#9 (6) {
   ["start"]=>


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



[PHP-CVS] com php-src: setting plausible default value for struct members: ext/date/php_date.c ext/date/tests/bug52113.phpt

2013-03-16 Thread Anatol Belski
Commit:add5420d89624550b1e6e72f960413ff7d0a69a2
Author:Anatol Belski  Sat, 16 Mar 2013 18:07:21 +0100
Parents:   c1cf7538f07d8f905afbff5e82f4c727f6cb9fee
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=add5420d89624550b1e6e72f960413ff7d0a69a2

Log:
setting plausible default value for struct members

especially for unsigned members so they don't casted to max unsigned

Changed paths:
  M  ext/date/php_date.c
  M  ext/date/tests/bug52113.phpt


Diff:
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index b454dd0..a073aa6 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -4006,14 +4006,14 @@ static int php_date_interval_initialize_from_hash(zval 
**return_value, php_inter
 {
(*intobj)->diff = timelib_rel_time_ctor();
 
-#define PHP_DATE_INTERVAL_READ_PROPERTY(element, member, itype) \
+#define PHP_DATE_INTERVAL_READ_PROPERTY(element, member, itype, def) \
do { \
zval **z_arg = NULL; \
if (zend_hash_find(myht, element, strlen(element) + 1, (void**) 
&z_arg) == SUCCESS) { \
convert_to_long(*z_arg); \
(*intobj)->diff->member = (itype)Z_LVAL_PP(z_arg); \
} else { \
-   (*intobj)->diff->member = (itype)-1; \
+   (*intobj)->diff->member = (itype)def; \
} \
} while (0);
 
@@ -4028,21 +4028,21 @@ static int php_date_interval_initialize_from_hash(zval 
**return_value, php_inter
} \
} while (0);
 
-   PHP_DATE_INTERVAL_READ_PROPERTY("y", y, timelib_sll)
-   PHP_DATE_INTERVAL_READ_PROPERTY("m", m, timelib_sll)
-   PHP_DATE_INTERVAL_READ_PROPERTY("d", d, timelib_sll)
-   PHP_DATE_INTERVAL_READ_PROPERTY("h", h, timelib_sll)
-   PHP_DATE_INTERVAL_READ_PROPERTY("i", i, timelib_sll)
-   PHP_DATE_INTERVAL_READ_PROPERTY("s", s, timelib_sll)
-   PHP_DATE_INTERVAL_READ_PROPERTY("weekday", weekday, int)
-   PHP_DATE_INTERVAL_READ_PROPERTY("weekday_behavior", weekday_behavior, 
int)
-   PHP_DATE_INTERVAL_READ_PROPERTY("first_last_day_of", first_last_day_of, 
int)
-   PHP_DATE_INTERVAL_READ_PROPERTY("invert", invert, int);
+   PHP_DATE_INTERVAL_READ_PROPERTY("y", y, timelib_sll, -1)
+   PHP_DATE_INTERVAL_READ_PROPERTY("m", m, timelib_sll, -1)
+   PHP_DATE_INTERVAL_READ_PROPERTY("d", d, timelib_sll, -1)
+   PHP_DATE_INTERVAL_READ_PROPERTY("h", h, timelib_sll, -1)
+   PHP_DATE_INTERVAL_READ_PROPERTY("i", i, timelib_sll, -1)
+   PHP_DATE_INTERVAL_READ_PROPERTY("s", s, timelib_sll, -1)
+   PHP_DATE_INTERVAL_READ_PROPERTY("weekday", weekday, int, -1)
+   PHP_DATE_INTERVAL_READ_PROPERTY("weekday_behavior", weekday_behavior, 
int, -1)
+   PHP_DATE_INTERVAL_READ_PROPERTY("first_last_day_of", first_last_day_of, 
int, -1)
+   PHP_DATE_INTERVAL_READ_PROPERTY("invert", invert, int, 0);
PHP_DATE_INTERVAL_READ_PROPERTY_I64("days", days);
-   PHP_DATE_INTERVAL_READ_PROPERTY("special_type", special.type, unsigned 
int);
+   PHP_DATE_INTERVAL_READ_PROPERTY("special_type", special.type, unsigned 
int, 0);
PHP_DATE_INTERVAL_READ_PROPERTY_I64("special_amount", special.amount);
-   PHP_DATE_INTERVAL_READ_PROPERTY("have_weekday_relative", 
have_weekday_relative, unsigned int);
-   PHP_DATE_INTERVAL_READ_PROPERTY("have_special_relative", 
have_special_relative, unsigned int);
+   PHP_DATE_INTERVAL_READ_PROPERTY("have_weekday_relative", 
have_weekday_relative, unsigned int, 0);
+   PHP_DATE_INTERVAL_READ_PROPERTY("have_special_relative", 
have_special_relative, unsigned int, 0);
(*intobj)->initialized = 1;
 
return 0;
diff --git a/ext/date/tests/bug52113.phpt b/ext/date/tests/bug52113.phpt
index 226dae5..862e92e 100644
--- a/ext/date/tests/bug52113.phpt
+++ b/ext/date/tests/bug52113.phpt
@@ -189,13 +189,13 @@ object(DateInterval)#8 (15) {
   ["days"]=>
   string(4) "2400"
   ["special_type"]=>
-  int(-1)
+  int(0)
   ["special_amount"]=>
   string(2) "-1"
   ["have_weekday_relative"]=>
-  int(-1)
+  int(0)
   ["have_special_relative"]=>
-  int(-1)
+  int(0)
 }
 object(DatePeriod)#9 (6) {
   ["start"]=>


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



[PHP-CVS] com php-src: Merge branch 'PHP-5.4' into PHP-5.5: ext/spl/spl_dllist.c

2013-03-16 Thread Etienne Kneuss
Commit:b46897941ac094e4e2fc09a5f1d4eeb7f8efca59
Author:Etienne Kneuss  Sat, 16 Mar 2013 18:20:16 
+0100
Parents:   c1cf7538f07d8f905afbff5e82f4c727f6cb9fee 
5de1b08482cdf2385e263f68ce9ea4001f724ffd
Branches:  PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=b46897941ac094e4e2fc09a5f1d4eeb7f8efca59

Log:
Merge branch 'PHP-5.4' into PHP-5.5

* PHP-5.4:
  Remove spurious int cast in between two longs

Changed paths:
  MM  ext/spl/spl_dllist.c


Diff:



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



[PHP-CVS] com php-src: Merge branch 'PHP-5.3' into PHP-5.4: ext/spl/spl_dllist.c

2013-03-16 Thread Etienne Kneuss
Commit:5de1b08482cdf2385e263f68ce9ea4001f724ffd
Author:Etienne Kneuss  Sat, 16 Mar 2013 18:20:06 
+0100
Parents:   73c38eca5a7f3c68e1122aee001409dbd615c5a8 
62364e6e01092911fa11e6d28f9acc3ed9af07e8
Branches:  PHP-5.4 PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=5de1b08482cdf2385e263f68ce9ea4001f724ffd

Log:
Merge branch 'PHP-5.3' into PHP-5.4

* PHP-5.3:
  Remove spurious int cast in between two longs

Changed paths:
  MM  ext/spl/spl_dllist.c


Diff:



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



[PHP-CVS] com php-src: Remove spurious int cast in between two longs: ext/spl/spl_dllist.c

2013-03-16 Thread Etienne Kneuss
Commit:62364e6e01092911fa11e6d28f9acc3ed9af07e8
Author:Etienne Kneuss  Sat, 16 Mar 2013 18:19:14 
+0100
Parents:   b903d2d6cdf9a9efac181a21e95ea93dc8a864dd
Branches:  PHP-5.3 PHP-5.4 PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=62364e6e01092911fa11e6d28f9acc3ed9af07e8

Log:
Remove spurious int cast in between two longs

Changed paths:
  M  ext/spl/spl_dllist.c


Diff:
diff --git a/ext/spl/spl_dllist.c b/ext/spl/spl_dllist.c
index 964ad99..38e6aac 100644
--- a/ext/spl/spl_dllist.c
+++ b/ext/spl/spl_dllist.c
@@ -875,7 +875,7 @@ SPL_METHOD(SplDoublyLinkedList, offsetUnset)
}
 
intern = (spl_dllist_object*)zend_object_store_get_object(getThis() 
TSRMLS_CC);
-   index  = (int)spl_offset_convert_to_long(zindex TSRMLS_CC);
+   index  = spl_offset_convert_to_long(zindex TSRMLS_CC);
 llist  = intern->llist;
 
 if (index < 0 || index >= intern->llist->count) {


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



[PHP-CVS] com php-src: Fixed test after nick previous fix: ext/spl/tests/iterator_to_array_nonscalar_keys.phpt

2013-03-16 Thread Xinchen Hui
Commit:c1cf7538f07d8f905afbff5e82f4c727f6cb9fee
Author:Xinchen Hui  Sat, 16 Mar 2013 22:58:47 
+0800
Parents:   acd160530a3ef41403853fd983bef3082726b690
Branches:  PHP-5.5

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=c1cf7538f07d8f905afbff5e82f4c727f6cb9fee

Log:
Fixed test after nick previous fix

Changed paths:
  M  ext/spl/tests/iterator_to_array_nonscalar_keys.phpt


Diff:
diff --git a/ext/spl/tests/iterator_to_array_nonscalar_keys.phpt 
b/ext/spl/tests/iterator_to_array_nonscalar_keys.phpt
index a4cbcc3..4ca9485 100644
--- a/ext/spl/tests/iterator_to_array_nonscalar_keys.phpt
+++ b/ext/spl/tests/iterator_to_array_nonscalar_keys.phpt
@@ -24,7 +24,7 @@ array(4) {
   int(0)
   [1]=>
   int(1)
-  [0]=>
+  [2]=>
   int(2)
   [""]=>
   int(3)


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



[PHP-CVS] com php-src: Fixed test after nick previous fix: ext/spl/tests/iterator_to_array_nonscalar_keys.phpt

2013-03-16 Thread Xinchen Hui
Commit:67618a8f8869b79d0a569d7c765de83d92ea2885
Author:Xinchen Hui  Sat, 16 Mar 2013 22:58:47 
+0800
Parents:   c4c61e395b3be29607ea0ffb9912a7e73698bf2a
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=67618a8f8869b79d0a569d7c765de83d92ea2885

Log:
Fixed test after nick previous fix

Changed paths:
  M  ext/spl/tests/iterator_to_array_nonscalar_keys.phpt


Diff:
diff --git a/ext/spl/tests/iterator_to_array_nonscalar_keys.phpt 
b/ext/spl/tests/iterator_to_array_nonscalar_keys.phpt
index a4cbcc3..4ca9485 100644
--- a/ext/spl/tests/iterator_to_array_nonscalar_keys.phpt
+++ b/ext/spl/tests/iterator_to_array_nonscalar_keys.phpt
@@ -24,7 +24,7 @@ array(4) {
   int(0)
   [1]=>
   int(1)
-  [0]=>
+  [2]=>
   int(2)
   [""]=>
   int(3)


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



[PHP-CVS] com php-src: Fix test after f8b91d9acff10ede7bd3f2bc631794a3abef8ff7: ext/date/tests/bug55397.phpt

2013-03-16 Thread Xinchen Hui
Commit:acd160530a3ef41403853fd983bef3082726b690
Author:Xinchen Hui  Sat, 16 Mar 2013 23:14:06 
+0800
Parents:   e00b04a54fd94c1ecffcf6931d2d7518126f1ea6
Branches:  PHP-5.5

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=acd160530a3ef41403853fd983bef3082726b690

Log:
Fix test after f8b91d9acff10ede7bd3f2bc631794a3abef8ff7

Changed paths:
  M  ext/date/tests/bug55397.phpt


Diff:
diff --git a/ext/date/tests/bug55397.phpt b/ext/date/tests/bug55397.phpt
index efc09b5..13778a0 100644
--- a/ext/date/tests/bug55397.phpt
+++ b/ext/date/tests/bug55397.phpt
@@ -7,5 +7,4 @@ date_default_timezone_set('Europe/Prague');
 var_dump(unserialize('O:8:"DateTime":0:{}') == new DateTime);
 ?>
 --EXPECTF--
-Warning: %s: Trying to compare an incomplete DateTime object in %s on line %d
-bool(false)
+Fatal error: Invalid serialization data for DateTime object in %sbug55397.php 
on line %d


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



[PHP-CVS] com php-src: Fixed memory leaks: ext/opcache/Optimizer/block_pass.c

2013-03-16 Thread Dmitry Stogov
Commit:e00b04a54fd94c1ecffcf6931d2d7518126f1ea6
Author:Dmitry Stogov  Sat, 16 Mar 2013 17:24:54 
+0400
Parents:   e9641141aaad136757af06fddd6d870147ac2000
Branches:  PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=e00b04a54fd94c1ecffcf6931d2d7518126f1ea6

Log:
Fixed memory leaks

Changed paths:
  M  ext/opcache/Optimizer/block_pass.c


Diff:
diff --git a/ext/opcache/Optimizer/block_pass.c 
b/ext/opcache/Optimizer/block_pass.c
index 3d4bb0c..d4299c8 100644
--- a/ext/opcache/Optimizer/block_pass.c
+++ b/ext/opcache/Optimizer/block_pass.c
@@ -1304,9 +1304,11 @@ static void zend_jmp_optimization(zend_code_block 
*block, zend_op_array *op_arra
/* JMP L, L: JMP L1 -> JMP L1 */
/* JMP L, L: JMPZNZ L1,L2 -> JMPZNZ 
L1,L2 */
*last_op = *target;
+#if ZEND_EXTENSION_API_NO < PHP_5_4_X_API_NO
if (ZEND_OP1_TYPE(last_op) == IS_CONST) 
{

zval_copy_ctor(&ZEND_OP1_LITERAL(last_op));
}
+#endif
del_source(block, block->op1_to);
if (block->op1_to->op2_to) {
block->op2_to = 
block->op1_to->op2_to;
@@ -1332,9 +1334,11 @@ static void zend_jmp_optimization(zend_code_block 
*block, zend_op_array *op_arra
  target->opcode == ZEND_EXIT) {
/* JMP L, L: RETURN to immediate RETURN 
*/
*last_op = *target;
+#if ZEND_EXTENSION_API_NO < PHP_5_4_X_API_NO
if (ZEND_OP1_TYPE(last_op) == IS_CONST) 
{

zval_copy_ctor(&ZEND_OP1_LITERAL(last_op));
}
+#endif
del_source(block, block->op1_to);
block->op1_to = NULL;
 #if 0


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



[PHP-CVS] com php-src: Fixed compatibility with ext/phar: ext/opcache/ZendAccelerator.c ext/opcache/zend_accelerator_module.c

2013-03-16 Thread Dmitry Stogov
Commit:92430bcf5dd76bf9b12363693efcc471b3527618
Author:Dmitry Stogov  Sat, 16 Mar 2013 16:08:11 
+0400
Parents:   ac05e68f5523a2cd1b4972f43188e65c29ef4ae4
Branches:  PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=92430bcf5dd76bf9b12363693efcc471b3527618

Log:
Fixed compatibility with ext/phar

Changed paths:
  M  ext/opcache/ZendAccelerator.c
  M  ext/opcache/zend_accelerator_module.c


Diff:
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c
index 17eac09..daf80ce 100644
--- a/ext/opcache/ZendAccelerator.c
+++ b/ext/opcache/ZendAccelerator.c
@@ -1221,7 +1221,9 @@ static zend_persistent_script 
*compile_and_cache_file(zend_file_handle *file_han
}
 
 #if ZEND_EXTENSION_API_NO >= PHP_5_3_X_API_NO
-   if (file_handle->type == ZEND_HANDLE_STREAM) {
+   if (file_handle->type == ZEND_HANDLE_STREAM &&
+   (!strstr(file_handle->filename, ".phar") ||
+strstr(file_handle->filename, "://"))) {
char *buf;
size_t size;
 
diff --git a/ext/opcache/zend_accelerator_module.c 
b/ext/opcache/zend_accelerator_module.c
index e55884a..11dd7d3 100644
--- a/ext/opcache/zend_accelerator_module.c
+++ b/ext/opcache/zend_accelerator_module.c
@@ -37,6 +37,10 @@
 #define MAX_ACCEL_FILES 10
 #define TOKENTOSTR(X) #X
 
+static void (*orig_file_exists)(INTERNAL_FUNCTION_PARAMETERS) = NULL;
+static void (*orig_is_file)(INTERNAL_FUNCTION_PARAMETERS) = NULL;
+static void (*orig_is_readable)(INTERNAL_FUNCTION_PARAMETERS) = NULL;
+
 /* User functions */
 static ZEND_FUNCTION(opcache_reset);
 
@@ -280,50 +284,44 @@ static int filename_is_in_cache(char *filename, int 
filename_len TSRMLS_DC)
return 0;
 }
 
-static void accel_file_in_cache(int type, INTERNAL_FUNCTION_PARAMETERS)
+static int accel_file_in_cache(INTERNAL_FUNCTION_PARAMETERS)
 {
-   char *filename;
-   int filename_len;
-#if ZEND_EXTENSION_API_NO < PHP_5_3_X_API_NO
zval **zfilename;
 
-   if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &zfilename) == 
FAILURE) {
-   WRONG_PARAM_COUNT;
-   }
-   convert_to_string_ex(zfilename);
-   filename = Z_STRVAL_PP(zfilename);
-   filename_len = Z_STRLEN_PP(zfilename);
-#elif ZEND_EXTENSION_API_NO == PHP_5_3_X_API_NO
-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &filename, 
&filename_len) == FAILURE) {
-   return;
-   }
-#else
-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p", &filename, 
&filename_len) == FAILURE) {
-   return;
-   }
-#endif
-   if (filename_len > 0) {
-   if (filename_is_in_cache(filename, filename_len TSRMLS_CC)) {
-   RETURN_TRUE;
-   }
+   if (ZEND_NUM_ARGS() != 1 ||
+   zend_get_parameters_array_ex(1, &zfilename) == FAILURE ||
+   Z_TYPE_PP(zfilename) != IS_STRING ||
+   Z_STRLEN_PP(zfilename) == 0) {
+   return 0;
}
-
-   php_stat(filename, filename_len, type, return_value TSRMLS_CC);
+   return filename_is_in_cache(Z_STRVAL_PP(zfilename), 
Z_STRLEN_PP(zfilename) TSRMLS_CC);
 }
 
 static void accel_file_exists(INTERNAL_FUNCTION_PARAMETERS)
 {
-   accel_file_in_cache(FS_EXISTS, INTERNAL_FUNCTION_PARAM_PASSTHRU);
+   if (accel_file_in_cache(INTERNAL_FUNCTION_PARAM_PASSTHRU)) {
+   RETURN_TRUE;
+   } else {
+   orig_file_exists(INTERNAL_FUNCTION_PARAM_PASSTHRU);
+   }
 }
 
 static void accel_is_file(INTERNAL_FUNCTION_PARAMETERS)
 {
-   accel_file_in_cache(FS_IS_FILE, INTERNAL_FUNCTION_PARAM_PASSTHRU);
+   if (accel_file_in_cache(INTERNAL_FUNCTION_PARAM_PASSTHRU)) {
+   RETURN_TRUE;
+   } else {
+   orig_is_file(INTERNAL_FUNCTION_PARAM_PASSTHRU);
+   }
 }
 
 static void accel_is_readable(INTERNAL_FUNCTION_PARAMETERS)
 {
-   accel_file_in_cache(FS_IS_R, INTERNAL_FUNCTION_PARAM_PASSTHRU);
+   if (accel_file_in_cache(INTERNAL_FUNCTION_PARAM_PASSTHRU)) {
+   RETURN_TRUE;
+   } else {
+   orig_is_readable(INTERNAL_FUNCTION_PARAM_PASSTHRU);
+   }
 }
 
 static ZEND_MINIT_FUNCTION(zend_accelerator)
@@ -346,12 +344,15 @@ void zend_accel_override_file_functions(TSRMLS_D)
if (ZCG(enabled) && accel_startup_ok && 
ZCG(accel_directives).file_override_enabled) {
/* override file_exists */
if (zend_hash_find(CG(function_table), "file_exists", 
sizeof("file_exists"), (void **)&old_function) == SUCCESS) {
+   orig_file_exists = 
old_function->internal_function.handler;
old_function->internal_function.handler = 
accel_file_exists;
}
if (zend_hash_find(CG(function_table), "is_file", 
sizeof("is_file"), (void **)&old_function) == SUCCESS) {
+   orig_is_file = old_function->internal_function.handler;
ol

[PHP-CVS] com php-src: Made test compatible with O+: Zend/tests/bug55156.phpt Zend/tests/ns_026.phpt ext/phar/tests/create_new_and_modify.phpt ext/phar/tests/delete_in_phar.phpt ext/phar/tests/delete_

2013-03-16 Thread Dmitry Stogov
Commit:e9641141aaad136757af06fddd6d870147ac2000
Author:Dmitry Stogov  Sat, 16 Mar 2013 16:11:00 
+0400
Parents:   92430bcf5dd76bf9b12363693efcc471b3527618
Branches:  PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=e9641141aaad136757af06fddd6d870147ac2000

Log:
Made test compatible with O+

Changed paths:
  M  Zend/tests/bug55156.phpt
  M  Zend/tests/ns_026.phpt
  M  ext/phar/tests/create_new_and_modify.phpt
  M  ext/phar/tests/delete_in_phar.phpt
  M  ext/phar/tests/delete_in_phar_confirm.phpt
  M  ext/phar/tests/tar/create_new_and_modify.phpt
  M  ext/phar/tests/tar/delete_in_phar.phpt
  M  ext/phar/tests/tar/delete_in_phar_confirm.phpt
  M  ext/phar/tests/zip/create_new_and_modify.phpt
  M  ext/phar/tests/zip/delete_in_phar.phpt
  M  ext/phar/tests/zip/delete_in_phar_confirm.phpt
  M  ext/reflection/tests/005.phpt
  M  ext/reflection/tests/009.phpt
  M  ext/reflection/tests/025.phpt
  M  ext/reflection/tests/ReflectionClass_getDocComment_001.phpt
  M  ext/reflection/tests/ReflectionFunction_getDocComment.001.phpt
  M  ext/reflection/tests/ReflectionMethod_getDocComment_basic.phpt
  M  ext/reflection/tests/ReflectionProperty_basic2.phpt
  M  ext/reflection/tests/ReflectionProperty_getDocComment_basic.phpt
  M  ext/reflection/tests/bug36308.phpt
  M  run-tests.php
  M  tests/output/ob_017.phpt
  M  tests/output/ob_start_basic_004.phpt

diff --git a/Zend/tests/bug55156.phpt b/Zend/tests/bug55156.phpt
index 6c0ff76..7d75ce3 100644
--- a/Zend/tests/bug55156.phpt
+++ b/Zend/tests/bug55156.phpt
@@ -1,5 +1,8 @@
 --TEST--
 Bug #55156 (ReflectionClass::getDocComment() returns comment even though the 
class has none)
+--INI--
+opcache.save_comments=1
+opcache.load_comments=1
 --FILE--
 getSignature();
 
 include $pname . '/a.php';
 
+if (function_exists("opcache_get_status")) {
+   $status = opcache_get_status();
+   if ($status["opcache_enabled"]) {
+   ini_set("opcache.revalidate_freq", "0");
+   sleep(2);
+   }
+}
+
 file_put_contents($pname .'/a.php', "modified!\n");
 file_put_contents($pname .'/b.php', "another!\n");
 
diff --git a/ext/phar/tests/delete_in_phar.phpt 
b/ext/phar/tests/delete_in_phar.phpt
index 4842d27..d28f136 100644
--- a/ext/phar/tests/delete_in_phar.phpt
+++ b/ext/phar/tests/delete_in_phar.phpt
@@ -15,6 +15,15 @@ $files = array();
 $files['a.php'] = '';
 $files['b.php'] = '';
 $files['b/c.php'] = '';
+
+if (function_exists("opcache_get_status")) {
+   $status = opcache_get_status();
+   if ($status["opcache_enabled"]) {
+   ini_set("opcache.revalidate_freq", "0");
+   sleep(2);
+   }
+}
+
 include 'files/phar_test.inc';
 
 include $pname . '/a.php';
diff --git a/ext/phar/tests/delete_in_phar_confirm.phpt 
b/ext/phar/tests/delete_in_phar_confirm.phpt
index 13a8d0d..0d4eb1e 100644
--- a/ext/phar/tests/delete_in_phar_confirm.phpt
+++ b/ext/phar/tests/delete_in_phar_confirm.phpt
@@ -15,6 +15,15 @@ $files = array();
 $files['a.php'] = '';
 $files['b.php'] = '';
 $files['b/c.php'] = '';
+
+if (function_exists("opcache_get_status")) {
+   $status = opcache_get_status();
+   if ($status["opcache_enabled"]) {
+   ini_set("opcache.revalidate_freq", "0");
+   sleep(2);
+   }
+}
+
 include 'files/phar_test.inc';
 
 include $pname . '/a.php';
diff --git a/ext/phar/tests/tar/create_new_and_modify.phpt 
b/ext/phar/tests/tar/create_new_and_modify.phpt
index 8062fda..905bfab 100644
--- a/ext/phar/tests/tar/create_new_and_modify.phpt
+++ b/ext/phar/tests/tar/create_new_and_modify.phpt
@@ -15,6 +15,14 @@ $pname = 'phar://' . $fname;
 
 file_put_contents($pname . '/a.php', "brand new!\n");
 
+if (function_exists("opcache_get_status")) {
+   $status = opcache_get_status();
+   if ($status["opcache_enabled"]) {
+   ini_set("opcache.revalidate_freq", "0");
+   sleep(2);
+   }
+}
+
 $phar = new Phar($fname);
 var_dump($phar->isFileFormat(Phar::TAR));
 $sig1 = md5_file($fname);
diff --git a/ext/phar/tests/tar/delete_in_phar.phpt 
b/ext/phar/tests/tar/delete_in_phar.phpt
index 91ef4a2..1982b6b 100644
--- a/ext/phar/tests/tar/delete_in_phar.phpt
+++ b/ext/phar/tests/tar/delete_in_phar.phpt
@@ -18,6 +18,14 @@ $phar['b/c.php'] = '';
 $phar->setStub('');
 $phar->stopBuffering();
 
+if (function_exists("opcache_get_status")) {
+   $status = opcache_get_status();
+   if ($status["opcache_enabled"]) {
+   ini_set("opcache.revalidate_freq", "0");
+   sleep(2);
+   }
+}
+
 include $alias . '/a.php';
 include $alias . '/b.php';
 include $alias . '/b/c.php';
diff --git a/ext/phar/tests/tar/delete_in_phar_confirm.phpt 
b/ext/phar/tests/tar/delete_in_phar_confirm.phpt
index 707bcbd..7593ebc 100644
--- a/ext/phar/tests/tar/delete_in_phar_confirm.phpt
+++ b/ext/phar/tests/tar/delete_in_phar_confirm.phpt
@@ -18,6 +18,14 @@ $phar['b/c.php'] = '';
 $phar->setStub('');
 $phar->stopBuffering();
 
+if (function_exis

[PHP-CVS] com php-src: Fixed O+ testes: ext/opcache/tests/001_cli.phpt ext/opcache/tests/bug64353.phpt ext/opcache/tests/issue0057.phpt

2013-03-16 Thread Dmitry Stogov
Commit:ac05e68f5523a2cd1b4972f43188e65c29ef4ae4
Author:Dmitry Stogov  Sat, 16 Mar 2013 12:07:09 
+0400
Parents:   9ef01ce698658db74a89326fcaa2fe1406230713
Branches:  PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=ac05e68f5523a2cd1b4972f43188e65c29ef4ae4

Log:
Fixed O+ testes

Changed paths:
  M  ext/opcache/tests/001_cli.phpt
  M  ext/opcache/tests/bug64353.phpt
  M  ext/opcache/tests/issue0057.phpt


Diff:
diff --git a/ext/opcache/tests/001_cli.phpt b/ext/opcache/tests/001_cli.phpt
index 6c42049..c51db23 100644
--- a/ext/opcache/tests/001_cli.phpt
+++ b/ext/opcache/tests/001_cli.phpt
@@ -1,17 +1,17 @@
 --TEST--
 001: O+ works in CLI
 --INI--
-zend_optimizerplus.enable=1
-zend_optimizerplus.enable_cli=1
+opcache.enable=1
+opcache.enable_cli=1
 --SKIPIF--
 
 --FILE--
 
 --EXPECT--
 bool(true)
diff --git a/ext/opcache/tests/bug64353.phpt b/ext/opcache/tests/bug64353.phpt
index a4e1dab..463b6ee 100644
--- a/ext/opcache/tests/bug64353.phpt
+++ b/ext/opcache/tests/bug64353.phpt
@@ -2,8 +2,8 @@
 Bug #64353 (Built-in classes can be unavailable with dynamic includes and 
Optimizer+)
 --INI--
 allow_url_include=1
-zend_optimizerplus.enable=1
-zend_optimizerplus.enable_cli=1
+opcache.enable=1
+opcache.enable_cli=1
 --SKIPIF--
 
 --FILE--
diff --git a/ext/opcache/tests/issue0057.phpt b/ext/opcache/tests/issue0057.phpt
index 1ef3cbb..49e9156 100644
--- a/ext/opcache/tests/issue0057.phpt
+++ b/ext/opcache/tests/issue0057.phpt
@@ -1,9 +1,9 @@
 --TEST--
 ISSUE #57 (segfaults in drupal7)
 --INI--
-zend_optimizerplus.enable=1
-zend_optimizerplus.enable_cli=1
-zend_optimizerplus.optimization_level=-1
+opcache.enable=1
+opcache.enable_cli=1
+opcache.optimization_level=-1
 --SKIPIF--
 
 --FILE--


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