Compare commits

..
2970 changed files with 70067 additions and 300828 deletions

No files matched your search

+10 -44
View File
@@ -8,7 +8,7 @@ define ____executor_globals
end
document ____executor_globals
portable way of accessing executor_globals, set $eg
portable way of accessing executor_globals
ZTS detection is automatically based on ext/standard module struct
end
@@ -39,18 +39,14 @@ define printzv
end
document printzv
prints zval contents
prints content of zval
end
define ____printzv_contents
set $zvalue = $arg0
set $type = $zvalue->type
printf "(refcount=%d", $zvalue->refcount
if $zvalue->is_ref
printf ",is_ref"
end
printf ") "
printf "(refcount=%d) ", $zvalue->refcount
if $type == 0
printf "NULL"
end
@@ -73,7 +69,7 @@ define ____printzv_contents
if ! $arg1
printf "{\n"
set $ind = $ind + 1
____print_ht $zvalue->value.ht 1
____print_ht $zvalue->value.ht
set $ind = $ind - 1
set $i = $ind
while $i > 0
@@ -107,7 +103,7 @@ define ____printzv_contents
printf "(%d): ", $ht->nNumOfElements
printf "{\n"
set $ind = $ind + 1
____print_ht $ht 1
____print_ht $ht
set $ind = $ind - 1
set $i = $ind
while $i > 0
@@ -192,10 +188,12 @@ define print_const_table
end
define ____print_ht
set $ht = (HashTable*)$arg0
set $ht = $arg0
set $p = $ht->pListHead
while $p != 0
set $zval = *(zval **)$p->pData
set $i = $ind
while $i > 0
printf " "
@@ -208,18 +206,8 @@ define ____print_ht
else
printf "%d => ", $p->h
end
if $arg1 == 0
printf "%p\n", (void*)$p->pData
end
if $arg1 == 1
set $zval = *(zval **)$p->pData
____printzv $zval 1
end
if $arg1 == 2
printf "%s\n", (char*)$p->pData
end
____printzv $zval 1
set $p = $p->pListNext
end
end
@@ -227,7 +215,7 @@ end
define print_ht
set $ind = 1
printf "[0x%08x] {\n", $arg0
____print_ht $arg0 1
____print_ht $arg0
printf "}\n"
end
@@ -235,28 +223,6 @@ document print_ht
dumps elements of HashTable made of zval
end
define print_htptr
set $ind = 1
printf "[0x%08x] {\n", $arg0
____print_ht $arg0 0
printf "}\n"
end
document print_htptr
dumps elements of HashTable made of pointers
end
define print_htstr
set $ind = 1
printf "[0x%08x] {\n", $arg0
____print_ht $arg0 2
printf "}\n"
end
document print_htstr
dumps elements of HashTable made of strings
end
define ____print_ft
set $ht = $arg0
set $p = $ht->pListHead
+1 -1
View File
@@ -256,7 +256,7 @@ that the first implementation include a file labeled 'EXPERIMENTAL'
in the function directory, and that the functions follow the
standard prefixing conventions during their initial implementation.
The file labeled 'EXPERIMENTAL' should include the following
The file labelled 'EXPERIMENTAL' should include the following
information:
Any authoring information (known bugs, future directions of the module).
Ongoing status notes which may not be appropriate for CVS comments.
+104 -91
View File
@@ -127,14 +127,32 @@ EXTENSION: dbase
MAINTENANCE: Orphaned
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: dbx
PRIMARY MAINTAINER: Marc Boeren <M.Boeren@guidance.nl>
MAINTENANCE: Maintained
STATUS: Working
SINCE: 4.0.6
COMMENT: DB abstraction for odbc, mysql, pgsql, mssql, fbsql and more, see documentation
-------------------------------------------------------------------------------
EXTENSION: fbsql
PRIMARY MAINTAINER: Frank M. Kromann <fmk@swwwing.com>
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: informix
PRIMARY MAINTAINER: Danny Heijl <Danny.Heijl@cevi.be>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: ingres_ii
PRIMARY MAINTAINER: David Hénot <henot@php.net>
MAINTENANCE: Maintained
STATUS: Experimental
SINCE: 4.0.2
-------------------------------------------------------------------------------
EXTENSION: interbase
PRIMARY MAINTAINER: Ard Biesheuvel <ard@ard.nu>, Jouni Ahto <jouni.ahto@exdec.fi>
MAINTENANCE: Odd fixes
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: msql
@@ -169,53 +187,14 @@ MAINTENANCE: Maintained
STATUS: Working
COMMENT: Working
-------------------------------------------------------------------------------
EXTENSION: pdo
PRIMARY MAINTAINER: Unknown
MAINTENANCE: Odd fixes
EXTENSION: oracle
MAINTENANCE: Orphaned
STATUS: Working
SINCE: 5.1
COMMENT: Using the new OCI8 driver is encouraged where possible.
-------------------------------------------------------------------------------
EXTENSION: pdo_dblib
PRIMARY MAINTAINER: Unknown
MAINTENANCE: Odd fixes
STATUS: Working
SINCE: 5.1
-------------------------------------------------------------------------------
EXTENSION: pdo_firebird
PRIMARY MAINTAINER: Unknown
MAINTENANCE: Odd fixes
STATUS: Working
SINCE: 5.1
-------------------------------------------------------------------------------
EXTENSION: pdo_mysql
PRIMARY MAINTAINER: Unknown
MAINTENANCE: Odd fixes
STATUS: Working
SINCE: 5.1
-------------------------------------------------------------------------------
EXTENSION: pdo_odbc
PRIMARY MAINTAINER: Unknown
MAINTENANCE: Odd fixes
STATUS: Working
SINCE: 5.1
-------------------------------------------------------------------------------
EXTENSION: pdo_oci
PRIMARY MAINTAINER: Unknown
MAINTENANCE: Odd fixes
STATUS: Working
SINCE: 5.1
-------------------------------------------------------------------------------
EXTENSION: pdo_pgsql
PRIMARY MAINTAINER: Unknown
MAINTENANCE: Odd fixes
STATUS: Working
SINCE: 5.1
-------------------------------------------------------------------------------
EXTENSION: pdo_sqlite
PRIMARY MAINTAINER: Unknown
MAINTENANCE: Odd fixes
STATUS: Working
SINCE: 5.1
EXTENSION: ovrimos
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: pgsql
PRIMARY MAINTAINER: Marcus Boerger <helly@php.net>, Yasuo Ohgaki <yohgaki@php.net>
@@ -258,11 +237,11 @@ SINCE: 5.0
EXTENSION: soap
PRIMARY MAINTAINER: Dmitry Stogov <dmitry@zend.com>
MAINTENANCE: Maintained
STATUS: Working
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: wddx
PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net>
MAINTENANCE: Orphaned
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: xml
@@ -270,21 +249,11 @@ PRIMARY MAINTAINER: Thies C. Arntzen <thies@thieso.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: xmlreader
PRIMARY MAINTAINER: Rob Richards <rrichards@php.net>, Christian Stocker <chregu@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: xmlrpc
PRIMARY MAINTAINER: Dan Libby
MAINTENANCE: Orphaned
MAINTENANCE: UNKNOWN
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: xmlwriter
PRIMARY MAINTAINER: Rob Richards <rrichards@php.net>, Pierre-Alain Joye <pajoye@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: xsl
PRIMARY MAINTAINER: Christian Stocker <chregu@php.net>, Rob Richards <rrichards@php.net>
MAINTENANCE: Maintained
@@ -298,7 +267,7 @@ SINCE: 5.0
-------------------------------------------------------------------------------
EXTENSION: bcmath
MAINTENANCE: Unknown
STATUS: Working
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: bz2
PRIMARY MAINTAINER: Hartmut Holzgraefe <hholzgra@php.net>
@@ -317,6 +286,11 @@ MAINTENANCE: Maintained
STATUS: Windows
SINCE: 5.0
-------------------------------------------------------------------------------
EXTENSION: cpdf
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: ctype
PRIMARY MAINTAINER: Hartmut Holzgraefe <hholzgra@php.net>
MAINTENANCE: Maintained
@@ -339,19 +313,27 @@ MAINTENANCE: Maintained
STATUS: Working
SINCE: 4.2
-------------------------------------------------------------------------------
EXTENSION: filter
PRIMARY MAINTAINER: Derick Rethans <derick@php.net>, Pierre-Alain Joye <pajoye@php.net>, Ilia Alshanetsky <iliaa@php.net>
EXTENSION: fam
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: fdf
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
MAINTENANCE: Maintained
STATUS: Working
SINCE: 5.2
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: filepro
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: ftp
PRIMARY MAINTAINER: Stefan Esser <sesser@php.net>
MAINTENANCE: Odd fixes
PRIMARY MAINTAINER: Stefan Esser (sesser@php.net)
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: gd
PRIMARY MAINTAINER: Pierre-Alain Joye <pajoye@php.net>
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
@@ -360,11 +342,15 @@ MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: gmp
PRIMARY MAINTAINER: Stanislav Malyshev <stas@php.net>, Antony Dovgal <tony2001@php.net>
MAINTENANCE: Maintained
STATUS: Working
MAINTENANCE: Unknown
STATUS: Unknown
SINCE: 4.0.4
-------------------------------------------------------------------------------
EXTENSION: hwapi
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: iconv
PRIMARY MAINTAINER: Moriyoshi Koizumi <moriyoshi@php.net>
MAINTENANCE: Maintained
@@ -375,14 +361,13 @@ PRIMARY MAINTAINER: Chuck Hagenbuch <chuck@horde.org>, Ilia Alshanetsky <iliaa@
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: json
PRIMARY MAINTAINER: Unknown
MAINTENANCE: Odd fixes
STATUS: Working
SINCE: 5.2
EXTENSION: ircg
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: ldap
PRIMARY MAINTAINER: Stig Venaas <venaas@php.net>, Douglas Goldstein <cardoe@php.net>
PRIMARY MAINTAINER: Stig Venaas <venaas@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
@@ -396,9 +381,14 @@ PRIMARY MAINTAINER: Derick Rethans <derick@derickrethans.nl>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: mcve
PRIMARY MAINTAINER: Unknown
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: mhash
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
MAINTENANCE: Unknown
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: mime_magic
@@ -412,26 +402,48 @@ PRIMARY MAINTAINER: Frank M. Kromann
MAINTENANCE: Unknown
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: mnogosearch
PRIMARY MAINTAINER: Sergey Kartashoff <gluke@mail.ru>
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: mono
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: msession
PRIMARY MAINTAINER Mark L. Woodward <mlwmohawk@mohawksoft.com>
MAINTENANCE: Maintained
STATUS: Working/Experimental
COMMENT: Tested on Linux, should work on other UNIX platforms. Backend server code can compile under Windows.
-------------------------------------------------------------------------------
EXTENSION: ncurses
PRIMARY MAINTAINER Ilia Alshanetsky <iliaa@php.net>, Wez Furlong <wez@php.net>, Hartmut Holzgraefe <hholzgra@php.net>, Georg Richter <georg@php.net>
MAINTENANCE: Unknown
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: openssl
PRIMARY MAINTAINER: Wez Furlong <wez@php.net>, Pierre-Alain Joye <pajoye@php.net>
PRIMARY MAINTAINER: Wez Furlong <wez@php.net>
MAINTENANCE: Maintained
STATUS: Working
STATUS: Experimental
SINCE: 4.0.4
-------------------------------------------------------------------------------
EXTENSION: pcntl
MAINTENANCE: Unknown
STATUS: Working
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: pcre
PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net>, Nuno Lopes <nlopess@php.net>
PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: pfpro
PRIMARY MAINTAINER: David Croft <david@infotrek.co.uk>
MAINTENANCE: Maintained
STATUS: Working
SINCE: 4.0.2
-------------------------------------------------------------------------------
EXTENSION: posix
PRIMARY MAINTAINER: Kristian Köhntopp <kris@koehntopp.de>
MAINTENANCE: Maintained
@@ -465,7 +477,7 @@ STATUS: Working
EXTENSION: shmop
PRIMARY MAINTAINER: Ilia Alshanetsky <iliaa@php.net>
MAINTENANCE: Maintained
STATUS: Working
STATUS: Experimental
SINCE: 4.0.3
-------------------------------------------------------------------------------
EXTENSION: snmp
@@ -476,7 +488,7 @@ STATUS: Working
EXTENSION: sockets
PRIMARY MAINTAINER: Chris Vandomelen <chrisv@b0rked.dhs.org>
MAINTENANCE: Maintained
STATUS: Working
STATUS: Experimental
SINCE: 4.0.2
-------------------------------------------------------------------------------
EXTENSION: spl
@@ -487,30 +499,31 @@ SINCE: 5.0.0
-------------------------------------------------------------------------------
EXTENSION: sysvmsg
MAINTENANCE: Unknown
STATUS: Working
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: sysvsem
MAINTENANCE: Unknown
STATUS: Working
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: sysvshm
MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: tidy
PRIMARY MAINTAINER: John Coggeshall <john@php.net>, Ilia Alshanetsky <iliaa@php.net>, Nuno Lopes <nlopess@php.net>
PRIMARY MAINTAINER: John Coggeshall <john@php.net>, Ilia Alshanetsky <iliaa@php.net>
MAINTENANCE: Maintained
STATUS: Working
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: tokenizer
PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net>
MAINTENANCE: Unknown
STATUS: Working
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: zip
PRIMARY MAINTAINER: Pierre-Alain Joye <pajoye@php.net>
EXTENSION: yaz
PRIMARY MAINTAINER: Adam Dickmeiss <adam@indexdata.dk>
MAINTENANCE: Maintained
STATUS: Working
STATUS: Unknown
SINCE: 4.0.1
-------------------------------------------------------------------------------
EXTENSION: zlib
PRIMARY MAINTAINER: Stefan Roehrich <sr@linux.de>
+392 -445
View File
File diff suppressed because it is too large. Load diff
+9 -9
View File
@@ -3,21 +3,21 @@
# Zend
#
$(builddir)/zend_language_scanner.lo: $(srcdir)/zend_language_parser.h
$(builddir)/zend_ini_scanner.lo: $(srcdir)/zend_ini_parser.h
$(builddir)/zend_language_scanner.lo: $(builddir)/zend_language_parser.h
$(builddir)/zend_ini_scanner.lo: $(builddir)/zend_ini_parser.h
$(srcdir)/zend_language_scanner.c: $(srcdir)/zend_language_scanner.l
$(builddir)/zend_language_scanner.c: $(srcdir)/zend_language_scanner.l
@$(LEX) -Pzend -S$(srcdir)/flex.skl -o$@ -i $(srcdir)/zend_language_scanner.l
$(srcdir)/zend_language_parser.h: $(srcdir)/zend_language_parser.c
$(srcdir)/zend_language_parser.c: $(srcdir)/zend_language_parser.y
$(builddir)/zend_language_parser.h: $(builddir)/zend_language_parser.c
$(builddir)/zend_language_parser.c: $(srcdir)/zend_language_parser.y
@$(YACC) -p zend -v -d $(srcdir)/zend_language_parser.y -o $@
$(srcdir)/zend_ini_parser.h: $(srcdir)/zend_ini_parser.c
$(srcdir)/zend_ini_parser.c: $(srcdir)/zend_ini_parser.y
$(builddir)/zend_ini_parser.h: $(builddir)/zend_ini_parser.c
$(builddir)/zend_ini_parser.c: $(srcdir)/zend_ini_parser.y
@$(YACC) -p ini_ -v -d $(srcdir)/zend_ini_parser.y -o $@
$(srcdir)/zend_ini_scanner.c: $(srcdir)/zend_ini_scanner.l
$(builddir)/zend_ini_scanner.c: $(srcdir)/zend_ini_scanner.l
@$(LEX) -Pini_ -S$(srcdir)/flex.skl -o$@ -i $(srcdir)/zend_ini_scanner.l
$(builddir)/zend_indent.lo $(builddir)/zend_highlight.lo $(builddir)/zend_compile.lo: $(srcdir)/zend_language_parser.h
$(builddir)/zend_indent.lo $(builddir)/zend_highlight.lo $(builddir)/zend_compile.lo: $(builddir)/zend_language_parser.h
+1 -1
View File
@@ -67,7 +67,7 @@ php_lcov.info: lcov-test
lcov-html: php_lcov.info
@echo "Generating lcov HTML"
@$(LTP_GENHTML) --legend --output-directory lcov_html/ --title "PHP Code Coverage" php_lcov.info
@$(LTP_GENHTML) --legend --output-directory lcov_html/ --title "PHP Code Coverage" --show-details php_lcov.info
lcov-clean:
rm -f php_lcov.info
+15 -60
View File
@@ -8,27 +8,27 @@ COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(PHP_FRAMEWORK
all: $(all_targets)
@echo
@echo "Build complete."
@echo "Don't forget to run 'make test'."
@echo "(It is safe to ignore warnings about tempnam and tmpnam)."
@echo
build-modules: $(PHP_MODULES)
libphp$(PHP_MAJOR_VERSION).la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
libphp5.la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
$(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
-@$(LIBTOOL) --silent --mode=install cp $@ $(phptempdir)/$@ >/dev/null 2>&1
-@$(LIBTOOL) --silent --mode=install cp libphp5.la $(phptempdir)/libphp5.la >/dev/null 2>&1
libs/libphp$(PHP_MAJOR_VERSION).bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
$(CC) $(MH_BUNDLE_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ && cp $@ libs/libphp$(PHP_MAJOR_VERSION).so
libs/libphp5.bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
$(CC) $(MH_BUNDLE_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ && cp $@ libs/libphp5.so
install: $(all_targets) $(install_targets)
install-sapi: $(OVERALL_TARGET)
@echo "Installing PHP SAPI module: $(PHP_SAPI)"
-@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
-@if test ! -r $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME); then \
-@if test ! -r $(phptempdir)/libphp5.$(SHLIB_DL_SUFFIX_NAME); then \
for i in 0.0.0 0.0 0; do \
if test -r $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME).$$i; then \
$(LN_S) $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME).$$i $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME); \
if test -r $(phptempdir)/libphp5.$(SHLIB_DL_SUFFIX_NAME).$$i; then \
$(LN_S) $(phptempdir)/libphp5.$(SHLIB_DL_SUFFIX_NAME).$$i $(phptempdir)/libphp5.$(SHLIB_DL_SUFFIX_NAME); \
break; \
fi; \
done; \
@@ -66,78 +66,33 @@ install-headers:
fi \
done; \
fi
install-su: install-pear
PHP_TEST_SETTINGS = -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1'
PHP_TEST_SHARED_EXTENSIONS = ` \
if test "x$(PHP_MODULES)" != "x"; then \
for i in $(PHP_MODULES)""; do \
. $$i; $(top_srcdir)/build/shtool echo -n -- " -d extension=$$dlname"; \
done; \
fi`
test: all
test: all
-@if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \
TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \
TEST_PHP_SRCDIR=$(top_srcdir) \
CC="$(CC)" \
$(PHP_EXECUTABLE) $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -U -d extension_dir=modules/ $(PHP_TEST_SHARED_EXTENSIONS) tests/; \
$(PHP_EXECUTABLE) -d 'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' -d 'memory_limit=-1' $(top_srcdir)/run-tests.php -d 'extension_dir=modules/' -d `( . $(PHP_MODULES) ; echo extension=$$dlname)` tests/; \
elif test ! -z "$(SAPI_CLI_PATH)" && test -x "$(SAPI_CLI_PATH)"; then \
INI_FILE=`$(top_builddir)/$(SAPI_CLI_PATH) -r 'echo php_ini_loaded_file();'`; \
if test "$$INI_FILE"; then \
$(EGREP) -v '^extension[\t\ ]*=' "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \
else \
echo > $(top_builddir)/tmp-php.ini; \
fi; \
TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
TEST_PHP_SRCDIR=$(top_srcdir) \
CC="$(CC)" \
$(top_builddir)/$(SAPI_CLI_PATH) $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -c $(top_builddir)/tmp-php.ini -U -d extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \
else \
echo "ERROR: Cannot run tests without CLI sapi."; \
fi
utest: all
-@if test ! -z "$(SAPI_CLI_PATH)" && test -x "$(SAPI_CLI_PATH)"; then \
INI_FILE=`$(top_builddir)/$(SAPI_CLI_PATH) -r 'echo php_ini_loaded_file();'`; \
if test "$$INI_FILE"; then \
$(EGREP) -v '^extension[\t\ ]*=' "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \
else \
echo > $(top_builddir)/tmp-php.ini; \
fi; \
TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
TEST_PHP_SRCDIR=$(top_srcdir) \
CC="$(CC)" \
$(top_builddir)/$(SAPI_CLI_PATH) $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -c $(top_builddir)/tmp-php.ini -u -d extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \
else \
echo "ERROR: Cannot run tests without CLI sapi."; \
fi
ntest: all
-@if test ! -z "$(SAPI_CLI_PATH)" && test -x "$(SAPI_CLI_PATH)"; then \
INI_FILE=`$(top_builddir)/$(SAPI_CLI_PATH) -r 'echo php_ini_loaded_file();'`; \
if test "$$INI_FILE"; then \
$(EGREP) -v '^extension[\t\ ]*=' "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \
else \
echo > $(top_builddir)/tmp-php.ini; \
fi; \
TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
TEST_PHP_SRCDIR=$(top_srcdir) \
CC="$(CC)" \
$(top_builddir)/$(SAPI_CLI_PATH) $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -c $(top_builddir)/tmp-php.ini -N -d extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \
$(top_builddir)/$(SAPI_CLI_PATH) -d 'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' -d 'memory_limit=-1' $(top_srcdir)/run-tests.php $(TESTS); \
else \
echo "ERROR: Cannot run tests without CLI sapi."; \
fi
clean:
find . -name \*.gcno -o -name \*.gcda | xargs rm -f
find . -name \*.lo -o -name \*.o | xargs rm -f
find . -name \*.la -o -name \*.a | xargs rm -f
find . -name \*.so | xargs rm -f
find . -name .libs -a -type d|xargs rm -rf
rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(OVERALL_TARGET) modules/* libs/*
rm -f libphp5.la $(SAPI_CLI_PATH) $(OVERALL_TARGET) modules/* libs/*
distclean: clean
rm -f config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h stamp-h php5.spec sapi/apache/libphp$(PHP_MAJOR_VERSION).module buildmk.stamp
rm -f config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h stamp-h php5.spec sapi/apache/libphp5.module buildmk.stamp
$(EGREP) define'.*include/php' $(top_srcdir)/configure | $(SED) 's/.*>//'|xargs rm -f
find . -name Makefile | xargs rm -f
+317 -1267
View File
File diff suppressed because it is too large. Load diff
+4 -6
View File
@@ -39,7 +39,9 @@ HEAD Will become PHP 6.0. This CVS branch is for active development.
PHP_5_2 Is used to release the PHP 5.2.x series. Only minor feature
enhancements may go in here, but please keep that as infrequent as
possible.
PHP_5_1 This branch is closed.
PHP_5_1 Is used to release the PHP 5.1.x series. Only bugfixes are permitted
on this branch (Consult the releasemaster prior to commit).
PHP_5_0 This branch is closed.
PHP_4_4 Is used to release the PHP 4.4.x series. Only bugfixes are permitted
on this branch (Consult the releasemaster prior to commit).
PHP_4_3 This branch is closed.
@@ -98,13 +100,9 @@ For string.c:
The # lines will be omitted from the ChangeLog automagically.
Use the [DOC] tag in your log message whenever you feel that your changes
imply a documentation modification. The php-doc team will automatically
get notified about your commit through the php-doc mailing list.
If you fix some bugs, you should note the bug ID numbers in your
commit message. Bug ID should be prefixed by "#" for easier access to
bug report when developers are browsing CVS via LXR or Bonsai.
bug report when developers are browsing CVS via. LXR or Bonsai.
Example:
+2 -2
View File
@@ -51,8 +51,8 @@ Type specifiers
passed to it.
/ - use SEPARATE_ZVAL_IF_NOT_REF() on the parameter it follows
! - the parameter it follows can be of specified type or NULL (only applies
to 's', 'a', 'o', 'O', 'r', 'h', 'C', 'z', and 'Z'). If NULL is passed,
the results pointer is set to NULL as well.
to 'a', 'o', 'O', 'r', and 'z'). If NULL is passed, the results
pointer is set to NULL as well.
Examples
--------
+23 -875
View File
@@ -23,8 +23,7 @@ and constants available to the new classes by running
php --rc DateTime
php --rc DateTimeZone
under PHP CLI - or see the PHP Manual under Date/Time functions, or the 'NEW
FEATURES' section below. All methods map to existing procedural date functions.
under PHP CLI. All methods map to existing procedural date functions.
==================================
Items from the NEWS file explained
@@ -41,7 +40,7 @@ Items from the NEWS file explained
- Changed E_ALL error reporting mode to include E_RECOVERABLE_ERROR. (Marcus)
This change means that the value of the E_ALL error_reporting constant is now
6143, where the previous value was 2047. If you are setting the error_reporting
6143, where its previous value was 2047. If you are setting the error_reporting
mode from either the Apache config file or the .htaccess files, you will need
to adjust the value accordingly. The same applies if you use the numeric value
rather than the constant in your PHP scripts.
@@ -82,7 +81,7 @@ Items from the NEWS file explained
The introduction of the 'data' URL scheme has the potential to lead to a
change of behaviour under Windows. If you are working with an NTFS
file system and making use of meta streams in your application, and if you
filesystem and making use of meta streams in your application, and if you
just happen to be using a file with the name 'data:' that is accessed without
any path information - it won't work any more. The fix is to use the 'file:'
protocol when accessing it.
@@ -110,7 +109,7 @@ Items from the NEWS file explained
The filepro and hwapi extensions have been moved to PECL and are no longer
part of the PHP distribution. The PECL package version of these extensions
will be created according to user demand.
will be created on the basis of user demand.
- Added extensions (Rasmus, Derick, Pierre)
@@ -125,8 +124,7 @@ Items from the NEWS file explained
The Zip extension enables you to transparently read or write ZIP
compressed archives and the files inside them.
Please refer to the NEW FEATURES section below or to the PHP Manual
for details.
Please refer to the PHP Manual for details.
- Improved memory manager and increased default memory limit (Dmitry)
@@ -150,873 +148,23 @@ Items from the NEWS file explained
in the Windows registry.
- Added notice when accessing return value from __get() in write mode (Marcus)
The reason for this is that __get() only returns variables in read mode, and
it is therefore not possible to write to the returned variable. In previous
releases there was no effective way to detect incorrect usage. Starting from
PHP 5.2, an E_NOTICE will be emitted in this situation.
WARNING: foreach() and functions that modify the internal array pointer will
now also trigger the same E_NOTICE, since modification requires that the
variable be accessed in write mode. To work around this, you should either
cast the returned value from __get() to an array, or use SPL's ArrayObject
instead of an array.
- CLI SAPI no longer checks cwd for php.ini or the php-cli.ini file (Edin)
In PHP 5.1 an undocumented feature was added that made the CLI binary check
the current working directory for a PHP configuration file, potentially
leading to unpredictable behavior if an unexpected configuration file were
read. This functionality was removed in 5.2, and PHP will no longer search
CWD for the presence of php.ini or php-cli.ini files.
- Added a notice when performing modulus 0 operation (Tony)
In earlier versions of PHP, performing integer % 0 did not emit any
warning messages, instead returning an unexpected return value of FALSE.
As of PHP 5.2 this operation will emit an E_WARNING, as is the case in all
other instances where division by zero is performed.
- As a side-effect of a change made to prevent duplicate error messages
when error_tracking is On [Ilia], it is now necessary to return FALSE
from your error handler in order to populate $php_errormsg. This allows
you to fine-grain the levels of the messages stored.
==============================
Backwards incompatible changes
==============================
In the PHP core
===============
getrusage() will return NULL when passed incompatible arguments
As of 5.2.1 #See http://cvs.php.net/viewvc.cgi/php-src/ext/standard/microtime.c?r1=1.57&r2=1.58 && ?r1=1.53.2.2&r2=1.53.2.2.2.1
In ext/zip
==========
ZipArchive::setCommentName() now returns TRUE on success
ZipArchive::setCommentIndex() now return TRUE on success
As of 5.2.1 #See http://cvs.php.net/viewvc.cgi/php-src/ext/zip/php_zip.c?r1=1.1.2.15&r2=1.1.2.16
In ext/spl
==========
SplFileObject::getFilename() now returns the filename, not relative/path/to/file
As of 5.2.1 #See http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/spl_directory.c?r1=1.45.2.27.2.10&r2=1.45.2.27.2.11
==================
NEW ERROR MESSAGES
==================
In the PHP core
===============
<?php
print 10%0;
/* Warning: Division by zero in filename on line n */
echo " ";
session_regenerate_id();
/* Warning: session_regenerate_id(): Cannot regenerate session id - headers already sent in filename on line n */
str_word_count("string", 4);
/* Warning: str_word_count(): Invalid format value 4 in filename on line n */
strripos("foo", "f", 4);
/* Notice: strripos(): Offset is greater than the length of haystack string in filename on line n */
strrpos("foo", "f", 4);
/* Notice: strrpos(): Offset is greater than the length of haystack string in filename on line n */
/* when allow_url_include is OFF (default) */
include "data:;base64,PD9waHAgcGhwaW5mbygpOz8+";
/* Warning: include(): URL file-access is disabled in the server configuration in filename on line n */
/* when allow_url_include is OFF (default) */
include "php://input";
/* Warning: include(): URL file-access is disabled in the server configuration in filename on line n */
As of 5.2.1 #See http://cvs.php.net/viewvc.cgi/php-src/ext/standard/php_fopen_wrapper.c?r1=1.45.2.4.2.3&r2=1.45.2.4.2.4
?>
OO related in the PHP core
==========================
<?php
interface foo {
}
class bar implements foo, foo {
}
/* Fatal error: Class bar cannot implement previously implemented interface foo in filename on line n */
class foo {
public $bar;
function __get($var)
{
return $this->bar;
}
}
$foo = new foo;
$bar =& $foo->prop;
/* Notice: Indirect modification of overloaded property foo::$prop has no effect in filename on line n */
class foo implements iterator {
public function current() {
}
public function next() {
}
public function key() {
}
public function valid() {
}
public function rewind() {
}
}
$foo = new foo();
foreach($foo as &$ref) {}
/* Fatal error: An iterator cannot be used with foreach by reference in filename on line n */
class foo {
private function __construct() {
}
}
class bar extends foo {
public function __construct() {
parent::__construct();
/* Fatal error: Cannot call private foo::__construct() in filename on line n */
}
}
new bar;
abstract class foo {
abstract static function bar();
/* Strict Standards: Static function foo::bar() should not be abstract in filename on line n */
}
stream_filter_register("", "class");
/* Warning: stream_filter_register(): Filter name cannot be empty in filename on line n */
stream_filter_register("filter", "");
/* Warning: stream_filter_register(): Class name cannot be empty in filename on line n */
class foo {
public function __toString() {
throw new Exception;
}
}
try {
print new foo;
/* Fatal error: Method foo::__toString() must not throw an exception in filename on line n */
} catch(Exception $e) {}
class foo {}
$foo = new foo;
print $foo;
/* Catchable fatal error: Object of class foo could not be converted to string in filename on line n */
?>
In the bzip2 extension
======================
<?php
bzopen("", "w");
/* Warning: bzopen(): filename cannot be empty in filename on line n */
bzopen("foo", "a");
/* Warning: bzopen(): 'a' is not a valid mode for bzopen(). Only 'w' and 'r' are supported in filename on line n */
$fp = fopen("foo", "w");
bzopen($fp, "r");
/* Warning: bzopen(): cannot read from a stream opened in write only mode in filename on line n */
?>
In the date extension
=====================
<?php
strtotime("today", "now");'
/* Warning: strtotime() expects parameter 2 to be long, string given in filename on line n */
new DateTime(new stdclass);
/* Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() expects parameter 1 to be string, object given' in filename:n */
As of 5.2.1 #See http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.33&r2=1.43.2.45.2.34
?>
In the dBase extension
======================
<?php
dbase_open("foo", -1);
/* Warning: Invalid access mode -1 in filename on line n */
dbase_open("foo", null);
/* Warning: The filename cannot be empty in filename on line n */
As of 5.2.1 #See http://cvs.php.net/viewvc.cgi/php-src/ext/dbase/dbase.c?r1=1.74.2.2.2.5&r2=1.74.2.2.2.6&diff_format=u
?>
In the mcrypt extension
=======================
<?php
$key = "this is a secret key";
$td = mcrypt_module_open('tripledes', '', 'ecb', '');
$iv = mcrypt_create_iv (mcrypt_enc_get_iv_size($td), MCRYPT_RAND);
mcrypt_generic_init($td, $key, $iv);
$encrypted_data = mcrypt_generic($td, "");
/* Warning: mcrypt_generic(): An empty string was passed in filename on line n */
?>
In the oci8 extension
=====================
<?php
oci_connect("user", "pass", "db", "bogus_charset");
/* Warning: Invalid character set name: bogus_charset in filename on line n */
$oci = oci_connect("user", "pass", "db");
oci_password_change($oci, "", "old", "new");
/* Warning: username cannot be empty in filename on line n */
oci_password_change($oci, "user", "", "new");
/* Warning: old password cannot be empty in filename on line n */
oci_password_change($oci, "user", "old", "");
/* Warning: new password cannot be empty in filename on line n */
?>
In the SPL extension
====================
<?php
$obj = new SplFileObject(__FILE__);
$obj->fgetcsv("foo");
/* Warning: SplFileObject::fgetcsv(): delimiter must be a character in filename on line n */
$obj->fgetcsv(",", "foo");
/* Warning: SplFileObject::fgetcsv(): enclosure must be a character in filename on line n */
?>
In the sysvmsg extension
========================
<?php
/* Warning: maximum size of the message has to be greater then zero in filename on line n */
?>
In the Zip extension
====================
<?php
$obj = new ZipArchive();
$obj->open("archive.zip");
$obj->setCommentName("", "comment");'
/* Notice: ZipArchive::setCommentName(): Empty string as entry name in filename on line n */
$obj->getCommentName("");
/* Notice: ZipArchive::getCommentName(): Empty string as entry name in filename on line n */
As of 5.2.1 #See http://cvs.php.net/viewvc.cgi/php-src/ext/zip/php_zip.c?r1=1.1.2.15&r2=1.1.2.16
?>
============
NEW FEATURES
============
New extensions
==============
Filter
Methods:
mixed filter_has_var(constant type, string variable_name)
- Returns true if the variable with the name 'name' exists in source
int filter_id(string filtername)
- Returns the filter ID belonging to a named filter
mixed filter_input(constant type, string variable_name [, long filter [, mixed options]])
- Returns the filtered variable 'name'* from source `type`
mixed filter_input_array(constant type, [, mixed options]])
- Returns an array with all arguments defined in 'definition'
array filter_list()
- Returns a list of all supported filters
mixed filter_var(mixed variable [, long filter [, mixed options]])
- Returns the filtered version of the variable.
mixed filter_var_array(array data, [, mixed options]])
- Returns an array with all arguments defined in 'definition'
JSON
Methods:
mixed json_decode(string json[, boolean assoc=0])
- Decodes a JSON string into a PHP object/associative array
string json_encode(mixed parameter)
- Takes a object or an array and returns a JSON encoded string
Zip
Class constants:
ZipArchive::CHECKCONS
ZipArchive::CM_DEFAULT
ZipArchive::CM_DEFLATE
ZipArchive::CM_DEFLATE64
ZipArchive::CM_IMPLODE
ZipArchive::CM_PKWARE_IMPLODE
ZipArchive::CM_REDUCE_1
ZipArchive::CM_REDUCE_2
ZipArchive::CM_REDUCE_3
ZipArchive::CM_REDUCE_4
ZipArchive::CM_SHRINK
ZipArchive::CM_STORE
ZipArchive::CREATE
ZipArchive::ER_CHANGED
ZipArchive::ER_CLOSE
ZipArchive::ER_COMPNOTSUPP
ZipArchive::ER_CRC
ZipArchive::ER_DELETED
ZipArchive::ER_EOF
ZipArchive::ER_EXISTS
ZipArchive::ER_INCONS
ZipArchive::ER_INTERNAL
ZipArchive::ER_INVAL
ZipArchive::ER_MEMORY
ZipArchive::ER_MULTIDISK
ZipArchive::ER_NOENT
ZipArchive::ER_NOZIP
ZipArchive::ER_OK
ZipArchive::ER_OPEN
ZipArchive::ER_READ
ZipArchive::ER_REMOVE
ZipArchive::ER_RENAME
ZipArchive::ER_SEEK
ZipArchive::ER_TMPOPEN
ZipArchive::ER_WRITE
ZipArchive::ER_ZIPCLOSED
ZipArchive::ER_ZLIB
ZipArchive::EXCL
ZipArchive::FL_COMPRESSED
ZipArchive::FL_NOCASE
ZipArchive::FL_NODIR
ZipArchive::FL_UNCHANGED
ZipArchive::OVERWRITE
Functions:
void zip_close(resource zip)
- Close a Zip archive
void zip_entry_close(resource zip_ent)
- Close a zip entry
int zip_entry_compressedsize(resource zip_entry)
- Return the compressed size of a Zip entry
string zip_entry_compressionmethod(resource zip_entry)
- Return a string containing the compression method used on a particular entry
int zip_entry_filesize(resource zip_entry)
- Return the actual filesize of a Zip entry
string zip_entry_name(resource zip_entry)
- Return the name given a Zip entry
bool zip_entry_open(resource zip_dp, resource zip_entry [, string mode])
- Open a Zip File, pointed by the resource entry
mixed zip_entry_read(resource zip_entry [, int len])
- Read from an open directory entry
resource zip_open(string filename)
- Create new zip using source URI for output
resource zip_read(resource zip)
- Returns the next file in the archive
Methods:
bool ZipArchive::addFile(string filepath[, string entryname[, int start [, int length]]])
- Add a file in a Zip archive using its path and the name to use
bool ZipArchive::addFromString(string name, string content)
- Add a file using content and the entry name
void ZipArchive::close()
- close the zip archive
bool ZipArchive::deleteIndex(int index)
- Delete a file using its index
bool ZipArchive::deleteName(string name)
- Delete a file using its index
bool ZipArchive::extractTo(string pathto[, mixed files])
- Extract one or more file from a zip archive to a specified destination
string ZipArchive::getArchiveComment()
- Returns the Zip archive comment
string ZipArchive::getCommentIndex(int index)
- Returns the comment of an entry using its index
string ZipArchive::getCommentName(string name)
- Returns the comment of an entry using its name
string ZipArchive::getFromName(string entryname[, int len [, int flags]])
- get the contents of an entry using its name
string ZipArchive::getFromIndex(string entryname[, int len [, int flags]])
- get the contents of an entry using its index
string ZipArchive::getNameIndex(int index [, int flags])
- Returns the name of the file at position index
resource ZipArchive::getStream(string entryname)
- Get a stream for an entry using its name
int ZipArchive::locateName(string filename[, int flags])
- Returns the index of the entry named filename in the archive
mixed ZipArchive::open(string source [, int flags])
- Create new zip using source URI for output, return TRUE on success or the error code
bool ZipArchive::renameIndex(int index, string new_name)
- Rename an entry selected by its index to new_name
bool ZipArchive::renameName(string name, string new_name)
- Rename an entry selected by its name to new_name
bool ZipArchive::setArchiveComment(string name, string comment)
- Set or remove (NULL/'') the comment of the archive
bool ZipArchive::setCommentIndex(int index, string comment)
- Set or remove (NULL/'') the comment of an entry using its index
bool ZipArchive::setCommentName(string name, string comment)
- Set or remove (NULL/'') the comment of an entry using its Name
array ZipArchive::statIndex(int index[, int flags])
- Returns the zip entry information using its index
array ZipArchive::statName(string filename[, int flags])
- Returns the information about a the zip entry filename
bool ZipArchive::unchangeAll()
- All changes made to the archive are reverted
bool ZipArchive::unchangeArchive()
- Revert all global changes to the archive. For now, this only reverts archive comment changes
bool ZipArchive::unchangeIndex(int index)
- Changes to the file at position index are reverted
bool ZipArchive::unchangeName(string name)
- Changes to the file named 'name' are reverted
New classes
===========
DateTime:
Constants:
DateTime::ATOM
DateTime::COOKIE
DateTime::ISO8601
DateTime::RFC822
DateTime::RFC850
DateTime::RFC1036
DateTime::RFC1123
DateTime::RFC2822
DateTime::RFC3339
DateTime::RSS
DateTime::W3C
Methods:
DateTime::__construct([string time[, DateTimeZone object]])
- Returns new DateTime object
string DateTime::format(string format)
- Returns date formatted according to given format
long DateTime::getOffset()
- Returns the DST offset
DateTimeZone DateTime::getTimezone()
- Return new DateTimeZone object relative to give DateTime
void DateTime::modify(string modify)
- Alters the timestamp
array DateTime::parse(string date)
- Returns associative array with detailed info about given date
void DateTime::setDate(long year, long month, long day)
- Sets the date
void DateTime::setISODate(long year, long week[, long day])
- Sets the ISO date
void DateTime::setTime(long hour, long minute[, long second])
- Sets the time
void DateTime::setTimezone(DateTimeZone object)
- Sets the timezone for the DateTime object
DateTimeZone:
Methods:
DateTimeZone DateTimeZone::__construct(string timezone)
- Returns new DateTimeZone object
string DateTimeZone::getName()
- Returns the name of the timezone
long DateTimeZone::getOffset(DateTime object)
- Returns the timezone offset
array DateTimeZone::getTransitions()
- Returns numerically indexed array containing associative array for all transitions for the timezone
RecursiveRegexIterator:
extends RegexIterator
implements OuterIterator, Traversable, Iterator, RecursiveIterator
Methods:
RecursiveRegexIterator::__construct(RecursiveIterator it, string regex [, int mode [, int flags [, int preg_flags]]])
Create an RecursiveRegexIterator from another recursive iterator and a regular expression
RecursiveRegexIterator RecursiveRegexIterator::getChildren()
Return the inner iterator's children contained in a RecursiveRegexIterator
bool RecursiveRegexIterator::hasChildren()
Check whether the inner iterator's current element has children
RegexIterator:
extends FilterIterator
implements Iterator, Traversable, OuterIterator
Constants:
RecursiveRegexIterator::ALL_MATCHES
RecursiveRegexIterator::GET_MATCH
RecursiveRegexIterator::MATCH
RecursiveRegexIterator::REPLACE
RecursiveRegexIterator::SPLIT
RecursiveRegexIterator::USE_KEY
Properties:
public $replacement
Methods:
RegexIterator::__construct(Iterator it, string regex [, int mode [, int flags [, int preg_flags]]])
- Create an RegexIterator from another iterator and a regular expression
bool RegexIterator::accept()
- Match (string)current() against regular expression
bool RegexIterator::getFlags()
- Returns current operation flags
bool RegexIterator::getMode()
- Returns current operation mode
bool RegexIterator::getPregFlags()
- Returns current PREG flags (if in use or NULL)
bool RegexIterator::setFlags(int new_flags)
- Set operation flags
bool RegexIterator::setMode(int new_mode)
- Set new operation mode
bool RegexIterator::setPregFlags(int new_flags)
- Set PREG flags
New methods
===========
In ext/dom
==========
DOMDocument:
DOMDocument::registerNodeClass(string baseclass, string extendedclass)
- Register extended class used to create base node type
DOMElement:
DOMElement::setIDAttribute(string name, boolean isId)
- Declares the attribute specified by name to be of type ID
DOMElement::setIDAttributeNode(DOMAttr idAttr, boolean isId)
- Declares the attribute specified by node to be of type ID
DOMElement::setIDAttributeNS(string namespaceURI, string localName, boolean isId)
- Declares the attribute specified by local name and namespace URI to be of type ID
DOMNode:
DOMNode::C14N([bool exclusive [, bool with_comments [, array xpath [, array ns_prefixes]]]])
- Canonicalize nodes to a string
DOMNode::C14NFile(string uri [, bool exclusive [, bool with_comments [, array xpath [, array ns_prefixes]]]])
- Canonicalize nodes to a file
DOMNode::getNodePath()
- Gets an xpath for a node
In ext/soap
===========
SoapServer:
SoapServer::setObject(object obj)
- Sets object which will handle SOAP requests
In ext/spl
==========
ArrayObject:
int ArrayObject::asort(void)
- Sort the entries by values
int ArrayObject::ksort(void)
- Sort the entries by key
int ArrayObject::natcasesort(void)
- Sort the entries by key using case insensitive "natural order" algorithm.
int ArrayObject::natsort(void)
- Sort the entries by values using "natural order" algorithm.
int ArrayObject::uasort(callback cmp_function)
- Sort the entries by values user defined function
int ArrayObject::uksort(callback cmp_function)
- Sort the entries by key using user defined function.
AppendIterator:
ArrayIterator AppendIterator::getArrayIterator()
Get access to inner ArrayIterator
int AppendIterator::getIteratorIndex()
Get index of iterator
CachingIterator:
bool CachingIterator::getCache()
Return the cache
int CachingIterator::getFlags()
Return the internal flags
bool CachingIterator::offsetExists(mixed index)
Return whether the requested index exists
string CachingIterator::offsetGet(mixed index)
- Return the internal cache if used
void CachingIterator::offsetSet(mixed index, mixed newval)
- Set given index in cache
void CachingIterator::offsetUnset(mixed index)
- Unset given index in cache
void CachingIterator::setFlags()
Set the internal flags
SplFileObject:
array("delimiter" =>, "enclosure" =>) SplFileObject::getCsvControl(void)
- Get the delimiter and enclosure character used in fgetcsv
void SplFileObject::setCsvControl([string delimiter = ',' [, string enclosure = '"']])
- Set the delimiter and enclosure character used in fgetcsv
XMLReader:
boolean XMLReader::setSchema(string filename)
Use W3C XSD schema to validate the document as it is processed. Activation is only possible before the first Read()
In ext/zip
==========
ZipArchive:
bool addEmptyDir(string dirname)
Creates an empty directory in the archive
As of 5.2.1 #See http://cvs.php.net/viewvc.cgi/php-src/ext/zip/php_zip.c?r1=1.1.2.15&r2=1.1.2.16
New class constants
===================
In ext/pdo
==========
PDO::ATTR_DEFAULT_FETCH_MODE
PDO::FETCH_PROPS_LATE
In ext/spl
==========
CachingIterator::FULL_CACHE
CachingIterator::TOSTRING_USE_INNER
SplFileObject::READ_AHEAD
SplFileObject::READ_CSV
SplFileObject::SKIP_EMPTY
New functions
=============
In the PHP core
===============
array array_fill_keys(array keys, mixed val)
- Create an array using the elements of the first parameter as keys, each initialized to val
array error_get_last()
- Get the last occurred error as associative array. Returns NULL if there hasn't been an error yet
string image_type_to_extension(int imagetype [, bool include_dot])
- Get file extension for image-type returned by getimagesize, exif_read_data, exif_thumbnail, exif_imagetype
int memory_get_peak_usage([real_usage])
- Returns the peak allocated by PHP memory
array timezone_abbreviations_list()
- Returns associative array containing DST, offset and the timezone name
array timezone_identifiers_list()
- Returns numerically indexed array with all timezone identifiers
string timezone_name_from_abbr(string abbr[, long gmtOffset[, long isdst]])
- Returns the timezone name from abbreviation
As of 5.2.1: #See http://cvs.php.net/viewvc.cgi/php-src/ext/standard/streamsfuncs.c?r1=1.58.2.6.2.9&r2=1.58.2.6.2.10&diff_format=u
int stream_socket_shutdown(resource stream, int how)
- Causes all or part of a full-duplex connection on the socket associated with stream to be shut down
In ext/mbstring
===============
array mb_list_encodings_alias_names([string encoding])
- Returns an array of all supported entity encodings
mixed mb_list_mime_names([string encoding])
- Returns an array or string of all supported mime names
int mb_stripos(string haystack, string needle [, int offset [, string encoding]])
- Finds position of first occurrence of a string within another, case insensitive
string mb_stristr(string haystack, string needle[, bool part[, string encoding]])
- Finds first occurrence of a string within another, case insensitive
string mb_strrchr(string haystack, string needle[, bool part[, string encoding]])
- Finds the last occurrence of a character in a string within another
string mb_strrichr(string haystack, string needle[, bool part[, string encoding]])
- Finds the last occurrence of a character in a string within another, case insensitive
int mb_strripos(string haystack, string needle [, int offset [, string encoding]])
- Finds position of last occurrence of a string within another, case insensitive
string mb_strstr(string haystack, string needle[, bool part[, string encoding]])
- Finds first occurrence of a string within another
In ext/ming
===========
As of 5.2.1: See http://cvs.php.net/viewvc.cgi/php-src/ext/ming/ming.c?r1=1.79.2.4.2.4&r2=1.79.2.4.2.5&diff_format=u
void ming_setSWFCompression(int num)
- Sets output compression
void swfmovie::namedanchor(string name)
- Creates anchor
void swfmovie::protect([string pasword])
- Protects
In ext/openssl
==============
resource openssl_csr_get_public_key(mixed csr)
- Extracts public key from a CERT and prepares it for use
array openssl_csr_get_subject(mixed csr [, bool use_short_names])
- Returns the subject of a CERT
array openssl_pkey_get_details(resource key)
- returns an array with the key details (bits, pkey, type)
In ext/spl
==========
string spl_object_hash(object obj)
- Return hash id for given object
int iterator_apply(Traversable it, mixed function [, mixed params])
- Calls a function for every element in an iterator
In ext/pcre
===========
int preg_last_error(void)
- Returns the error code of the last regex execution
In ext/pgsql
============
mixed pg_field_table(resource result, int field_number[, bool oid_only])
- Returns the name of the table field belongs to, or table's oid if oid_only is true
In ext/posix
============
bool posix_initgroups(string name, int base_group_id)
- Calculate the group access list for the user specified in name
In ext/gmp
==========
resource gmp_nextprime(resource a)
- Finds next prime of a
In ext/xmlwriter
================
bool xmlwriter_full_end_element(resource xmlwriter)
- End current element - returns FALSE on error
bool xmlwriter_write_raw(resource xmlwriter, string content)
- Write text - returns FALSE on error
As of 5.2.1 #See http://cvs.php.net/viewvc.cgi/php-src/ext/xmlwriter/php_xmlwriter.c?r1=1.20.2.12.2.8&r2=1.20.2.12.2.9
bool xmlwriter_start_dtd_entity(resource xmlwriter, string name, bool isparam)
- Create start DTD Entity - returns FALSE on error
bool xmlwriter_end_dtd_entity(resource xmlwriter)
- End current DTD Entity - returns FALSE on error
bool xmlwriter_write_dtd_entity(resource xmlwriter, string name, string content [, bool pe [, string pubid [, string sysid [, string ndataid]]]])
- Write full DTD Entity tag - returns FALSE on error
New optional parameters
=======================
In the PHP core
===============
- string base64_decode(string str[, bool strict=false]) (strict)
- bool setcookie(string name [, string value [, int expires [, string path [, string domain [, bool secure[, bool httponly=false]]]]]] (httponly)
- bool setrawcookie(string name [, string value [, int expires [, string path [, string domain [, bool secure[, bool httponly=false]]]]]] (httponly)
- void session_set_cookie_params(int lifetime [, string path [, string domain [, bool secure[, bool httponly]]]]) (httponly)
- int memory_get_usage([bool real_usage=false]) (real_usage)
In ext/curl
===========
- array curl_multi_info_read(resource mh [, long msgs_in_queue]) (msgs_in_queue)
In ext/imap
===========
- resource imap_open ( string mailbox, string username, string password [, int options[, int n_retries]]) (n_retries)
- bool imap_reopen(resource stream_id, string mailbox [, int options [, int n_retries]]) (n_retries)
As of 5.2.1 #See http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.c?r1=1.208.2.7.2.7&r2=1.208.2.7.2.8
In ext/mbstring
===============
- int mb_strrpos(string haystack, string needle [, int offset [, string encoding]]) (offset)
In ext/ming
===========
- int swfmovie::streamMP3(mixed file [, float skip]) (skip)
As of 5.2.1 #See http://cvs.php.net/viewvc.cgi/php-src/ext/ming/ming.c?r1=1.79.2.4.2.3&r2=1.79.2.4.2.4
In ext/openssl
==============
- int openssl_verify(string data, string signature, mixed key [, int signature_algo]) (signature_algo)
In ext/pgsql
============
- string pg_escape_bytea([resource connection,] string data) (connection)
- string pg_escape_string([resource connection,] string data) (connection)
In ext/simplexml
================
- SimpleXMLElement::__construct(string data [, int options [, bool data_is_url [, string ns [, bool is_prefix]]]]) (ns, is_prefix)
- SimpleXMLElement SimpleXMLElement::attributes([string ns [, bool is_prefix]]) (is_prefix)
- SimpleXMLElement SimpleXMLElement::children([string ns [, bool is_prefix]]) (is_prefix)
- SimpleXMLElement simplexml_load_file(string filename [, string class_name [, int options [, string ns [, bool is_prefix]]]]) (ns, is_prefix)
- SimpleXMLElement simplexml_load_string(string data [, string class_name [, int options [, string ns [, bool is_prefix]]]]) (ns, is_prefix)
In ext/spl
==========
- array iterator_to_array(Traversable it [, bool use_keys = true]) (use_keys)
As of 5.2.1 #See http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_iterators.c?r1=1.73.2.30.2.20&r2=1.73.2.30.2.21
In ext/xmlreader
================
- boolean XMLReader::open(string URI [, string encoding [, int options]]) (encoding, options)
- boolean XMLReader::XML(string source [, string encoding [, int options]]) (encoding, options)
New INI settings
================
allow_url_include PHP_INI_SYSTEM, default: false
pcre.backtrack_limit PHP_INI_ALL, default: 100000
pcre.recursion_limit PHP_INI_ALL, default: 100000
session.cookie_httponly PHP_INI_ALL, default: false
New global constants
====================
In the PHP core
===============
- M_EULER
- M_LNPI
- M_SQRT3
- M_SQRTPI
- PATHINFO_FILENAME
- PREG_BACKTRACK_LIMIT_ERROR
- PREG_BAD_UTF8_ERROR
- PREG_INTERNAL_ERROR
- PREG_NO_ERROR
- PREG_RECURSION_LIMIT_ERROR
- UPLOAD_ERR_EXTENSION
As of 5.2.1: (See http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.409.2.6.2.13&r2=1.409.2.6.2.14&diff_format=u)
- STREAM_SHUT_RD
- STREAM_SHUT_WR
- STREAM_SHUT_RDWR
In ext/curl
===========
- CURLE_FILESIZE_EXCEEDED
- CURLE_FTP_SSL_FAILED
- CURLE_LDAP_INVALID_URL
- CURLFTPAUTH_DEFAULT
- CURLFTPAUTH_SSL
- CURLFTPAUTH_TLS
- CURLFTPSSL_ALL
- CURLFTPSSL_CONTROL
- CURLFTPSSL_NONE
- CURLFTPSSL_TRY
- CURLOPT_FTP_SSL
- CURLOPT_FTPSSLAUTH
In ext/ming
===========
As of 5.2.1: See http://cvs.php.net/viewvc.cgi/php-src/ext/ming/ming.c?r1=1.79.2.4.2.4&r2=1.79.2.4.2.5&diff_format=u
- SWFTEXTFIELD_USEFONT
- SWFTEXTFIELD_AUTOSIZE
- SWF_SOUND_NOT_COMPRESSED
- SWF_SOUND_ADPCM_COMPRESSED
- SWF_SOUND_MP3_COMPRESSED
- SWF_SOUND_NOT_COMPRESSED_LE
- SWF_SOUND_NELLY_COMPRESSED
- SWF_SOUND_5KHZ
- SWF_SOUND_11KHZ
- SWF_SOUND_22KHZ
- SWF_SOUND_44KHZ
- SWF_SOUND_8BITS
- SWF_SOUND_16BITS
- SWF_SOUND_MONO
- SWF_SOUND_STEREO
In ext/openssl
==============
- OPENSSL_VERSION_NUMBER
- OPENSSL_VERSION_TEXT
In ext/snmp
===========
- SNMP_OID_OUTPUT_FULL
- SNMP_OID_OUTPUT_NUMERIC
In ext/sysvmsg
==============
- MSG_EAGAIN
- MSG_ENOMSG
In PHP 5.1.X an undocumented feature was added that made the CLI binary
check the current directory for PHP configuration file possibly leading to
unpredictable behavior due to an un-expected configuration file being
read. This functionality was removed in 5.2 and PHP will no longer search
CWD for the presence of the php.ini or the php-cli.ini files.
+1 -4
View File
@@ -10,10 +10,7 @@ The Input Filter support in PHP 5 is aimed at providing the framework
through which a company-wide or site-wide security policy can be
enforced. It is implemented as a SAPI hook and is called from the
treat_data and post handler functions. To implement your own security
policy you will need to write a standard PHP extension. There is also
a powerful standard implementation in ext/filter that should suit most
peoples' needs. However, if you want to implement your own security
policy, read on.
policy you will need to write a standard PHP extension.
A simple implementation might look like the following. This stores the
original raw user data and adds a my_get_raw() function while the normal
+8
View File
@@ -96,6 +96,13 @@ ext/pcntl
* Remove all zend_extension code
* Add object callback support to pcntl_signal()
ext/pgsql
---------
For PHP 4.3.0:
* Add pg_metadata() with metadata cache feature.
* Add pg_convert() to check and convert array value for query.
* Add pg_insert/pg_update/pg_delete/pg_select for simple query.
ext/session
-----------
For PHP 4.3.0:
@@ -122,6 +129,7 @@ ext/standard
ext/wddx
--------
* See if we can support the remaining data types:
dateTime
binary
http://www.wddx.org/WDDX_SDK_10a/7__References/WDDX_DTD.htm
+20
View File
@@ -48,6 +48,26 @@ Responsibility: Shane Caraveo & each sapi module owner
Timeframe: ? (but shouldn't be much effort, most modules are probably ok)
Component: Input Filtering
- Implement a SAPI input filter hook that will get called
just before registering a variable in the
treat_data/post_handler hooks. (done)
- Make sure this is also done in mbstring (done)
- Provide access functions, or perhaps a new
$_RAW_GET/POST/Cookie set of superglobals to get at the
unfiltered data
- Provide a .ini directive which allows people to set their
input filter to one of the built-in strip_tags,
htmlspecialchars or whatever other internal function might
be useful here.
- (The main benefit of this is to make it easier for people
to solve the XSS problem once and for all without having
to go through every line of their code and adding input
validation/filtering everywhere)
Responsibility: Rasmus
Timeframe: Yesterday
Component: RPC Abstraction Layer
Porting java, com, dotnet, xmlrpc, corba, soap and python, srm
(are there more ?) to work with the new oo api and preferably
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Thread Safe Resource Manager |
+----------------------------------------------------------------------+
| Copyright (c) 1999-2007, Andi Gutmans, Sascha Schumann, Zeev Suraski |
| Copyright (c) 1999-2006, Andi Gutmans, Sascha Schumann, Zeev Suraski |
| This source file is subject to the TSRM license, that is bundled |
| with this package in the file LICENSE |
+----------------------------------------------------------------------+
+7 -12
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Thread Safe Resource Manager |
+----------------------------------------------------------------------+
| Copyright (c) 1999-2007, Andi Gutmans, Sascha Schumann, Zeev Suraski |
| Copyright (c) 1999-2006, Andi Gutmans, Sascha Schumann, Zeev Suraski |
| This source file is subject to the TSRM license, that is bundled |
| with this package in the file LICENSE |
+----------------------------------------------------------------------+
@@ -13,11 +13,14 @@
#ifndef TSRM_H
#define TSRM_H
#if !defined(__CYGWIN__) && defined(WIN32)
/* #ifndef WIN32 */
#ifndef WIN32
# include <tsrm_config.h>
#endif
#ifdef WIN32
# define TSRM_WIN32
# include "tsrm_config.w32.h"
#else
# include <tsrm_config.h>
#endif
#ifdef TSRM_WIN32
@@ -30,14 +33,6 @@
# define TSRM_API
#endif
#ifdef _WIN64
typedef __int64 tsrm_intptr_t;
typedef unsigned __int64 tsrm_uintptr_t;
#else
typedef long tsrm_intptr_t;
typedef unsigned long tsrm_uintptr_t;
#endif
/* Only compile multi-threading functions if we're in ZTS mode */
#ifdef ZTS
+5 -8
View File
@@ -7,15 +7,11 @@
* on Windows 95/NT.
*/
#define _WIN32_WINNT 0x0400
#include <windows.h>
#include <io.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <direct.h>
/* struct dirent - same as Unix */
@@ -29,10 +25,10 @@ struct dirent {
/* typedef DIR - not the same as Unix */
typedef struct {
HANDLE handle; /* _findfirst/_findnext handle */
long handle; /* _findfirst/_findnext handle */
short offset; /* offset into directory */
short finished; /* 1 if there are not more files */
WIN32_FIND_DATA fileinfo; /* from _findfirst/_findnext */
struct _finddata_t fileinfo; /* from _findfirst/_findnext */
char *dir; /* the dir we are reading */
struct dirent dent; /* the dirent to return */
} DIR;
@@ -42,6 +38,7 @@ DIR *opendir(const char *);
struct dirent *readdir(DIR *);
int readdir_r(DIR *, struct dirent *, struct dirent **);
int closedir(DIR *);
int rewinddir(DIR *);
void rewinddir(DIR *);
#endif /* READDIR_H */
+2 -4
View File
@@ -1,10 +1,8 @@
#ifndef TSRM_CONFIG_COMMON_H
#define TSRM_CONFIG_COMMON_H
#ifndef __CYGWIN__
# if WINNT|WIN32
# define TSRM_WIN32
# endif
#if WINNT|WIN32
# define TSRM_WIN32
#endif
#ifdef TSRM_WIN32
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2007 The PHP Group |
| Copyright (c) 1997-2006 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 |
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2007 The PHP Group |
| Copyright (c) 1997-2006 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 |
+156 -399
View File
File diff suppressed because it is too large. Load diff
+15 -21
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2007 The PHP Group |
| Copyright (c) 1997-2006 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 |
@@ -126,12 +126,6 @@ typedef unsigned short mode_t;
#define CWD_API
#endif
#ifdef TSRM_WIN32
CWD_API int php_sys_stat(const char *path, struct stat *buf);
#else
# define php_sys_stat stat
#endif
typedef struct _cwd_state {
char *cwd;
int cwd_length;
@@ -178,6 +172,10 @@ CWD_API int virtual_access(const char *pathname, int mode TSRMLS_DC);
#endif
#endif
#if defined(__osf__) || defined(_AIX)
char *php_realpath_hack(const char *src, char *dest);
#endif
#if HAVE_UTIME
CWD_API int virtual_utime(const char *filename, struct utimbuf *buf TSRMLS_DC);
#endif
@@ -186,17 +184,8 @@ CWD_API int virtual_chmod(const char *filename, mode_t mode TSRMLS_DC);
CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group, int link TSRMLS_DC);
#endif
/* One of the following constants must be used as the last argument
in virtual_file_ex() call. */
#define CWD_EXPAND 0 /* expand "." and ".." but dont resolve symlinks */
#define CWD_FILEPATH 1 /* resolve symlinks if file is exist otherwise expand */
#define CWD_REALPATH 2 /* call realpath(), resolve symlinks. File must exist */
CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func verify_path, int use_realpath);
CWD_API char *tsrm_realpath(const char *path, char *real_path TSRMLS_DC);
#define REALPATH_CACHE_TTL (2*60) /* 2 minutes */
#define REALPATH_CACHE_SIZE 0 /* disabled while php.ini isn't loaded */
@@ -226,9 +215,6 @@ extern virtual_cwd_globals cwd_globals;
# define CWDG(v) (cwd_globals.v)
#endif
CWD_API void realpath_cache_clean(TSRMLS_D);
CWD_API void realpath_cache_del(const char *path, int path_len TSRMLS_DC);
/* The actual macros to be used in programs using TSRM
* If the program defines VIRTUAL_DIR it will use the
* virtual_* functions
@@ -279,7 +265,7 @@ CWD_API void realpath_cache_del(const char *path, int path_len TSRMLS_DC);
#define VCWD_CHDIR(path) chdir(path)
#define VCWD_CHDIR_FILE(path) virtual_chdir_file(path, chdir)
#define VCWD_GETWD(buf) getwd(buf)
#define VCWD_STAT(path, buff) php_sys_stat(path, buff)
#define VCWD_STAT(path, buff) stat(path, buff)
#define VCWD_LSTAT(path, buff) lstat(path, buff)
#define VCWD_UNLINK(path) unlink(path)
#define VCWD_MKDIR(pathname, mode) mkdir(pathname, mode)
@@ -292,7 +278,15 @@ CWD_API void realpath_cache_del(const char *path, int path_len TSRMLS_DC);
#define VCWD_ACCESS(pathname, mode) access(pathname, mode)
#endif
#define VCWD_REALPATH(path, real_path) tsrm_realpath(path, real_path TSRMLS_CC)
#ifdef HAVE_REALPATH
#if defined(__osf__) || defined(_AIX)
#define VCWD_REALPATH(path, real_path) php_realpath_hack(path, real_path)
#else
#define VCWD_REALPATH(path, real_path) realpath(path, real_path)
#endif
#else
#define VCWD_REALPATH(path, real_path) strcpy(real_path, path)
#endif
#if HAVE_UTIME
#define VCWD_UTIME(path, time) utime(path, time)
+9 -18
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2007 The PHP Group |
| Copyright (c) 1997-2006 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 |
@@ -86,19 +86,11 @@ TSRM_API void tsrm_win32_shutdown(void)
TSRM_API int tsrm_win32_access(const char *pathname, int mode)
{
SHFILEINFO sfi;
if (mode == 1 /*X_OK*/) {
#if 1
/* This code is not supported by Windows 98,
* but we don't support it anymore */
DWORD type;
return GetBinaryType(pathname, &type)?0:-1;
#else
SHFILEINFO sfi;
return access(pathname, 0) == 0 &&
SHGetFileInfo(pathname, 0, &sfi, sizeof(SHFILEINFO), SHGFI_EXETYPE) != 0 ? 0 : -1;
#endif
} else {
return access(pathname, mode);
}
@@ -219,7 +211,7 @@ TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd,
cmd = (char*)malloc(strlen(command)+strlen(TWG(comspec))+sizeof(" /c "));
sprintf(cmd, "%s /c %s", TWG(comspec), command);
if (!CreateProcess(NULL, cmd, &security, &security, security.bInheritHandle, NORMAL_PRIORITY_CLASS|CREATE_NO_WINDOW, env, cwd, &startup, &process)) {
if (!CreateProcess(NULL, cmd, &security, &security, security.bInheritHandle, NORMAL_PRIORITY_CLASS, env, cwd, &startup, &process)) {
return NULL;
}
free(cmd);
@@ -228,10 +220,10 @@ TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd,
proc = process_get(NULL TSRMLS_CC);
if (read) {
fno = _open_osfhandle((tsrm_intptr_t)in, _O_RDONLY | mode);
fno = _open_osfhandle((long)in, _O_RDONLY | mode);
CloseHandle(out);
} else {
fno = _open_osfhandle((tsrm_intptr_t)out, _O_WRONLY | mode);
fno = _open_osfhandle((long)out, _O_WRONLY | mode);
CloseHandle(in);
}
@@ -280,6 +272,9 @@ TSRM_API int shmget(int key, int size, int flags)
info_handle = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, shm_info);
if ((!shm_handle && !info_handle)) {
if (flags & IPC_EXCL) {
return -1;
}
if (flags & IPC_CREAT) {
shm_handle = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, size, shm_segment);
info_handle = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, sizeof(shm->descriptor), shm_info);
@@ -288,10 +283,6 @@ TSRM_API int shmget(int key, int size, int flags)
if ((!shm_handle || !info_handle)) {
return -1;
}
} else {
if (flags & IPC_EXCL) {
return -1;
}
}
shm = shm_get(key, NULL);
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2007 The PHP Group |
| Copyright (c) 1997-2006 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 |
+1 -1
View File
@@ -14,7 +14,7 @@ libZend_la_SOURCES=\
zend_variables.c zend.c zend_API.c zend_extensions.c zend_hash.c \
zend_list.c zend_indent.c zend_builtin_functions.c zend_sprintf.c \
zend_ini.c zend_qsort.c zend_objects.c zend_object_handlers.c \
zend_objects_API.c zend_ts_hash.c zend_stream.c \
zend_objects_API.c zend_ts_hash.c zend_stream.c zend_mm.c \
zend_default_classes.c \
zend_iterators.c zend_interfaces.c zend_exceptions.c \
zend_strtod.c zend_multibyte.c
+7 -28
View File
@@ -1,34 +1,13 @@
Zend Memory Manager
===================
The goal of the new memory manager (PHP 5.2 and later) is reducing memory allocation overhead and speedup memory management.
General:
--------
The new manager's "configure" has no "--disable-zend-memory-manager" option, but it has "--enable-malloc-mm" instead. It is enabled by default in DEBUG build and disabled by default in RELEASE built. It allows select malloc/emalloc at runtime. So you can use internal and external memory debuggers without recompilation.
The goal of the new memory manager (available since PHP 5.2) is to reduce memory
allocation overhead and speedup memory management.
$ sapi/cli/php -r 'leak();'
The new manager's "configure" has no "--disable-zend-memory-manager" option,
but it has "--enable-malloc-mm" instead. It is enabled by default in DEBUG
build and disabled by default in RELEASE build. when enabled it allows selecting
between malloc and emalloc at runtime so you can use internal and external memory
debuggers without recompilation.
$ USE_ZEND_ALLOC=0 valgrind --leak-check=full -r 'leak();'
Debugging:
----------
The patch allows tweaking memory manager with ZEND_MM_MEM_TYPE and ZEND_MM_SEG_SIZE environment variables. Default values are "malloc" and "256K". Dependent on target system you can also use "mmap_anon", "mmap_zero"
and "win32" storage managers.
Normal:
$ ZEND_MM_MEM_TYPE=mmap_anon ZEND_MM_SEG_SIZE=1M sapi/cli/php
$ sapi/cli/php -r 'leak();'
Zend MM disabled:
$ USE_ZEND_ALLOC=0 valgrind --leak-check=full sapi/cli/php -r 'leak();'
Tweaking:
---------
The Zend MM can be tweaked using ZEND_MM_MEM_TYPE and ZEND_MM_SEG_SIZE environment
variables. Default values are "malloc" and "256K". Dependent on target system you
can also use "mmap_anon", "mmap_zero" and "win32" storage managers.
$ ZEND_MM_MEM_TYPE=mmap_anon ZEND_MM_SEG_SIZE=1M sapi/cli/php ..etc.
+8
View File
@@ -195,6 +195,10 @@ SOURCE=.\zend_llist.c
# End Source File
# Begin Source File
SOURCE=.\zend_mm.c
# End Source File
# Begin Source File
SOURCE=.\zend_object_handlers.c
# End Source File
# Begin Source File
@@ -367,6 +371,10 @@ SOURCE=.\zend_llist.h
# End Source File
# Begin Source File
SOURCE=.\zend_mm.h
# End Source File
# Begin Source File
SOURCE=.\zend_modules.h
# End Source File
# Begin Source File
+23 -7
View File
@@ -129,6 +129,13 @@ AC_ARG_WITH(zend-vm,
PHP_ZEND_VM=CALL
])
AC_ARG_ENABLE(malloc-mm,
[ --enable-malloc-mm Use environment variable for run-time malloc/emalloc
selection - FOR DEVELOPERS ONLY!!],
[
ZEND_USE_MALLOC_MM=$enableval
])
AC_ARG_ENABLE(maintainer-zts,
[ --enable-maintainer-zts Enable thread safety - for code maintainers only!!],[
ZEND_MAINTAINER_ZTS=$enableval
@@ -144,6 +151,13 @@ AC_ARG_ENABLE(inline-optimization,
ZEND_INLINE_OPTIMIZATION=yes
])
AC_ARG_ENABLE(memory-limit,
[ --enable-memory-limit Compile with memory limit support], [
ZEND_MEMORY_LIMIT=$enableval
],[
ZEND_MEMORY_LIMIT=no
])
AC_ARG_ENABLE(zend-multibyte,
[ --enable-zend-multibyte Compile with zend multibyte support], [
ZEND_MULTIBYTE=$enableval
@@ -160,6 +174,9 @@ AC_MSG_RESULT($ZEND_MAINTAINER_ZTS)
AC_MSG_CHECKING(whether to enable inline optimization for GCC)
AC_MSG_RESULT($ZEND_INLINE_OPTIMIZATION)
AC_MSG_CHECKING(whether to enable a memory limit)
AC_MSG_RESULT($ZEND_MEMORY_LIMIT)
AC_MSG_CHECKING(whether to enable Zend debugging)
AC_MSG_RESULT($ZEND_DEBUG)
@@ -200,6 +217,12 @@ if test "$ZEND_MAINTAINER_ZTS" = "yes"; then
LIBZEND_CPLUSPLUS_CHECKS
fi
if test "$ZEND_MEMORY_LIMIT" = "yes"; then
AC_DEFINE(MEMORY_LIMIT, 1, [Memory limit])
else
AC_DEFINE(MEMORY_LIMIT, 0, [Memory limit])
fi
if test "$ZEND_MULTIBYTE" = "yes"; then
AC_DEFINE(ZEND_MULTIBYTE, 1, [ ])
fi
@@ -381,10 +404,3 @@ AC_DEFUN([LIBZEND_CPLUSPLUS_CHECKS],[
])
AC_MSG_CHECKING(whether /dev/urandom exists)
if test -r "/dev/urandom" && test -c "/dev/urandom"; then
AC_DEFINE([HAVE_DEV_URANDOM], 1, [Define if the target system has /dev/urandom device])
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
+8
View File
@@ -229,6 +229,10 @@ SOURCE=.\zend_llist.c
# End Source File
# Begin Source File
SOURCE=.\zend_mm.c
# End Source File
# Begin Source File
SOURCE=.\zend_object_handlers.c
# End Source File
# Begin Source File
@@ -405,6 +409,10 @@ SOURCE=.\zend_llist.h
# End Source File
# Begin Source File
SOURCE=.\zend_mm.h
# End Source File
# Begin Source File
SOURCE=.\zend_modules.h
# End Source File
# Begin Source File
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
| Copyright (c) 1998-2006 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
-1
View File
@@ -1,5 +1,4 @@
<?php
date_default_timezone_set("UTC");
function simple() {
$a = 0;
-86
View File
@@ -1,86 +0,0 @@
--TEST--
builtin functions tests
--FILE--
<?php
var_dump(get_resource_type());
var_dump(get_resource_type(""));
$fp = fopen(__FILE__, "r");
var_dump(get_resource_type($fp));
fclose($fp);
var_dump(get_resource_type($fp));
var_dump(gettype(get_loaded_extensions()));
var_dump(count(get_loaded_extensions()));
var_dump(gettype(get_loaded_extensions(true)));
var_dump(count(get_loaded_extensions(true)));
var_dump(get_loaded_extensions(true, true));
define("USER_CONSTANT", "test");
var_dump(get_defined_constants(true, true));
var_dump(gettype(get_defined_constants(true)));
var_dump(gettype(get_defined_constants()));
var_dump(count(get_defined_constants()));
function test () {
}
var_dump(get_defined_functions(true));
var_dump(gettype(get_defined_functions()));
var_dump(count(get_defined_functions()));
var_dump(get_declared_interfaces(true));
var_dump(gettype(get_declared_interfaces()));
var_dump(count(get_declared_interfaces()));
var_dump(get_extension_funcs());
var_dump(get_extension_funcs(true));
var_dump(gettype(get_extension_funcs("standard")));
var_dump(count(get_extension_funcs("standard")));
var_dump(gettype(get_extension_funcs("zend")));
var_dump(count(get_extension_funcs("zend")));
echo "Done\n";
?>
--EXPECTF--
Warning: Wrong parameter count for get_resource_type() in %s on line %d
NULL
Warning: Supplied argument is not a valid resource handle in %s on line %d
bool(false)
string(6) "stream"
string(7) "Unknown"
string(5) "array"
int(%d)
string(5) "array"
int(%d)
Warning: get_loaded_extensions() expects at most 1 parameter, 2 given in %s on line %d
NULL
Warning: Wrong parameter count for get_defined_constants() in %s on line %d
NULL
string(5) "array"
string(5) "array"
int(%d)
Warning: Wrong parameter count for get_defined_functions() in %s on line %d
NULL
string(5) "array"
int(%d)
Warning: Wrong parameter count for get_declared_interfaces() in %s on line %d
NULL
string(5) "array"
int(%d)
Warning: Wrong parameter count for get_extension_funcs() in %s on line %d
NULL
bool(false)
string(5) "array"
int(%d)
string(5) "array"
int(%d)
Done
-36
View File
@@ -1,36 +0,0 @@
--TEST--
constant() tests
--FILE--
<?php
var_dump(constant());
var_dump(constant("", ""));
var_dump(constant(""));
var_dump(constant(array()));
define("TEST_CONST", 1);
var_dump(constant("TEST_CONST"));
define("TEST_CONST2", "test");
var_dump(constant("TEST_CONST2"));
echo "Done\n";
?>
--EXPECTF--
Warning: Wrong parameter count for constant() in %s on line %d
NULL
Warning: Wrong parameter count for constant() in %s on line %d
NULL
Warning: constant(): Couldn't find constant in %s on line %d
NULL
Notice: Array to string conversion in %s on line %d
Warning: constant(): Couldn't find constant Array in %s on line %d
NULL
int(1)
string(4) "test"
Done
-1332
View File
File diff suppressed because it is too large. Load diff
-31
View File
@@ -1,31 +0,0 @@
--TEST--
func_get_arg() invalid usage
--FILE--
<?php
var_dump(func_get_arg(1,2,3));
var_dump(func_get_arg(1));
var_dump(func_get_arg());
function bar() {
var_dump(func_get_arg(1));
}
function foo() {
bar(func_get_arg(1));
}
foo(1,2);
echo "Done\n";
?>
--EXPECTF--
bool(false)
Warning: func_get_arg(): Called from the global scope - no function context in %s on line %d
bool(false)
bool(false)
Warning: func_get_arg(): Argument 1 not passed to function in %s on line %d
bool(false)
Done
+1 -2
View File
@@ -10,5 +10,4 @@ abstract class TestClass
===DONE===
--EXPECTF--
Strict Standards: Static function TestClass::getName() should not be abstract in %sabstract-static.php on line %d
===DONE===
Fatal error: Static function TestClass::getName() cannot be abstract in %sabstract-static.php on line %d
-73
View File
@@ -1,73 +0,0 @@
--TEST--
adding arrays
--FILE--
<?php
$a = array(1,2,3);
$b = array("str", "here");
$c = $a + $b;
var_dump($c);
$a = array(1,2,3);
$b = array(1,2,4);
$c = $a + $b;
var_dump($c);
$a = array("a"=>"aaa",2,3);
$b = array(1,2,"a"=>"bbbbbb");
$c = $a + $b;
var_dump($c);
$a += $b;
var_dump($c);
$a += $a;
var_dump($c);
echo "Done\n";
?>
--EXPECTF--
array(3) {
[0]=>
int(1)
[1]=>
int(2)
[2]=>
int(3)
}
array(3) {
[0]=>
int(1)
[1]=>
int(2)
[2]=>
int(3)
}
array(3) {
["a"]=>
string(3) "aaa"
[0]=>
int(2)
[1]=>
int(3)
}
array(3) {
["a"]=>
string(3) "aaa"
[0]=>
int(2)
[1]=>
int(3)
}
array(3) {
["a"]=>
string(3) "aaa"
[0]=>
int(2)
[1]=>
int(3)
}
Done
-19
View File
@@ -1,19 +0,0 @@
--TEST--
adding objects to arrays
--FILE--
<?php
$a = array(1,2,3);
$o = new stdclass;
$o->prop = "value";
$c = $a + $o;
var_dump($c);
echo "Done\n";
?>
--EXPECTF--
Notice: Object of class stdClass could not be converted to int in %s on line %d
Fatal error: Unsupported operand types in %s on line %d
-19
View File
@@ -1,19 +0,0 @@
--TEST--
adding arrays to objects
--FILE--
<?php
$a = array(1,2,3);
$o = new stdclass;
$o->prop = "value";
$c = $o + $a;
var_dump($c);
echo "Done\n";
?>
--EXPECTF--
Notice: Object of class stdClass could not be converted to int in %s on line %d
Fatal error: Unsupported operand types in %s on line %d
-14
View File
@@ -1,14 +0,0 @@
--TEST--
adding numbers to arrays
--FILE--
<?php
$a = array(1,2,3);
$c = $a + 5;
var_dump($c);
echo "Done\n";
?>
--EXPECTF--
Fatal error: Unsupported operand types in %s on line %d
-22
View File
@@ -1,22 +0,0 @@
--TEST--
adding integers to doubles
--INI--
precision=14
--FILE--
<?php
$i = 75636;
$d = 2834681123.123123;
$c = $i + $d;
var_dump($c);
$c = $d + $i;
var_dump($c);
echo "Done\n";
?>
--EXPECTF--
float(2834756759.1231)
float(2834756759.1231)
Done
-49
View File
@@ -1,49 +0,0 @@
--TEST--
adding numbers to strings
--INI--
precision=14
--FILE--
<?php
$i = 75636;
$s1 = "this is a string";
$s2 = "876222numeric";
$s3 = "48474874";
$s4 = "25.68";
$c = $i + $s1;
var_dump($c);
$c = $i + $s2;
var_dump($c);
$c = $i + $s3;
var_dump($c);
$c = $i + $s4;
var_dump($c);
$c = $s1 + $i;
var_dump($c);
$c = $s2 + $i;
var_dump($c);
$c = $s3 + $i;
var_dump($c);
$c = $s4 + $i;
var_dump($c);
echo "Done\n";
?>
--EXPECTF--
int(75636)
int(951858)
int(48550510)
float(75661.68)
int(75636)
int(951858)
int(48550510)
float(75661.68)
Done
-16
View File
@@ -1,16 +0,0 @@
--TEST--
adding strings to arrays
--FILE--
<?php
$a = array(1,2,3);
$s1 = "some string";
$c = $a + $s1;
var_dump($c);
echo "Done\n";
?>
--EXPECTF--
Fatal error: Unsupported operand types in %s on line %d
-39
View File
@@ -1,39 +0,0 @@
--TEST--
bitwise AND and strings
--FILE--
<?php
$s = "123";
$s1 = "234";
var_dump($s & $s1);
$s = "test";
$s1 = "some";
var_dump($s & $s1);
$s = "test long";
$s1 = "some";
var_dump($s & $s1);
$s = "test";
$s1 = "some long";
var_dump($s & $s1);
$s = "test";
$s &= "some long";
var_dump($s);
echo "Done\n";
?>
--EXPECTF--
string(3) "020"
string(4) "pead"
string(4) "pead"
string(4) "pead"
string(4) "pead"
Done
-16
View File
@@ -1,16 +0,0 @@
--TEST--
Tests that array manipulation code is correctly dealing with copy on write and splitting on reference
--FILE--
<?php
$a=array();
$b=1;
$c=&$b;
$a[]=$b;
$b=2;
var_dump ($a);
?>
--EXPECT--
array(1) {
[0]=>
int(1)
}
-16
View File
@@ -1,16 +0,0 @@
--TEST--
Tests that array unshift code is correctly dealing with copy on write and splitting on reference
--FILE--
<?php
$a=array();
$b=1;
$c=&$b;
array_unshift ($a,$b);
$b=2;
var_dump ($a);
?>
--EXPECT--
array(1) {
[0]=>
int(1)
}
+1 -1
View File
@@ -1,5 +1,5 @@
--TEST--
Bug #22725 (A derived class can call a parent's protected method that calls a private method)
bug #22725 (A derived class can call a parent's protected method that calls a private method)
--SKIPIF--
<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
+1 -1
View File
@@ -1,5 +1,5 @@
--TEST--
Bug #27304 (Static functions don't function properly)
Bug #27304
--FILE--
<?php
+2 -2
View File
@@ -49,12 +49,12 @@ array(1) {
}
Base::__construct
array(3) {
["Baz"]=>
int(4)
["Foo"]=>
int(1)
["Bar"]=>
int(2)
["Baz"]=>
int(3)
}
Child::__construct
array(3) {
+1 -1
View File
@@ -1,5 +1,5 @@
--TEST--
Bug #29104 (Function declaration in method doesn't work)
Bug #29104 Function declaration in method doesn't work
--FILE--
<?php
class A
+1 -1
View File
@@ -1,5 +1,5 @@
--TEST--
Bug #29210 (Function is_callable does not support private and protected methods)
Bug #29210 Function: is_callable - no support for private and protected classes
--FILE--
<?php
class test_class {
+1 -1
View File
@@ -1,5 +1,5 @@
--TEST--
Bug #30519 (Interface not existing says Class not found)
Bug #30519 Interface not existing says Class not found
--FILE--
<?php
class test implements a {
+1 -1
View File
@@ -1,5 +1,5 @@
--TEST--
Bug #30702 (cannot initialize class variable from class constant)
Bug #30702 cannot initialize class variable from class constant
--FILE--
<?php
class foo {
+1 -1
View File
@@ -1,5 +1,5 @@
--TEST--
Bug #30791 (magic methods (__sleep/__wakeup/__toString) call __call if object is overloaded)
Bug #30791 magic methods (__sleep/__wakeup/__toString) call __call if object is overloaded
--FILE--
<?php
+1 -1
View File
@@ -1,5 +1,5 @@
--TEST--
Bug #30889 (Conflict between __get/__set and ++ operator)
Bug #30889 Conflict between __get/__set and ++ operator
--FILE--
<?php
class overloaded
+1 -1
View File
@@ -1,5 +1,5 @@
--TEST--
Bug #32296 (get_class_methods output has changed between 5.0.2 and 5.0.3)
Bug #32296 get_class_methods output has changed between 5.0.2 and 5.0.3
--FILE--
<?php
abstract class space{
+1 -1
View File
@@ -1,5 +1,5 @@
--TEST--
Bug #32427 (Interfaces are not allowed 'static' access modifier)
Bug #32427 Interfaces are not allowed 'static' access modifier
--FILE--
<?php
+1 -1
View File
@@ -1,5 +1,5 @@
--TEST--
Bug #32660 (Assignment by reference causes crash when field access is overloaded (__get))
Bug #32660 Assignment by reference causes crash when field access is overloaded (__get)
--FILE--
<?php
class A
+1 -1
View File
@@ -1,5 +1,5 @@
--TEST--
Bug #32674 (exception in iterator causes crash)
Bug #32674 exception in iterator causes crash
--FILE--
<?php
class collection implements Iterator {
+1 -1
View File
@@ -1,5 +1,5 @@
--TEST--
Bug #32833 (Invalid opcode with $a[] .= '')
Bug #32833 Invalid opcode
--FILE--
<?php
$test = array();
+1 -1
View File
@@ -1,5 +1,5 @@
--TEST--
Bug #33257 (array_splice() inconsistent when passed function instead of variable)
Bug #33257 array_splice() inconsistent when passed function instead of variable
--INI--
error_reporting=4095
--FILE--
-19
View File
@@ -1,19 +0,0 @@
--TEST--
Bug #33282 (Re-assignment by reference does not clear the is_ref flag)
--FILE--
<?php
$a = array(1, 2, 3);
$r = &$a[0];
$r = &$a[1];
$r = &$a[2];
var_dump($a);
?>
--EXPECT--
array(3) {
[0]=>
int(1)
[1]=>
int(2)
[2]=>
&int(3)
}
+2 -2
View File
@@ -1,7 +1,7 @@
--TEST--
Bug #34617 (zend_deactivate: objects_store used after zend_objects_store_destroy is called)
--SKIPIF--
<?php if (!extension_loaded("xml")) print "skip the xml extension not available"; ?>
<?php if (!extension_loaded("xml")) print "skip"; ?>
--FILE--
<?php
class Thing {}
@@ -15,4 +15,4 @@ function boom()
boom();
?>
--EXPECT--
ok
ok
+1 -1
View File
@@ -1,5 +1,5 @@
--TEST--
Bug #34712 (zend.ze1_compatibility_mode = on segfault)
Bug #34712 zend.ze1_compatibility_mode = on segfault
--INI--
zend.ze1_compatibility_mode=1
error_reporting=4095
-14
View File
@@ -1,14 +0,0 @@
--TEST--
Bug #35106 (nested foreach fails when array variable has a reference)
--FILE--
<?php
$a=array("1","2");
$b=&$a;
foreach($a as $i){
echo $i;
foreach($a as $p);
}
echo "\n";
?>
--EXPECT--
12
+1 -1
View File
@@ -1,5 +1,5 @@
--TEST--
Bug #35437 (Segfault or Invalid Opcode 137/1/4)
Bug #35437 Segfault or Invalid Opcode 137/1/4
--FILE--
<?php
function err2exception($errno, $errstr)
-36
View File
@@ -1,36 +0,0 @@
--TEST--
Bug #35634 (Erroneous "Class declarations may not be nested" error raised)
--INI--
error_reporting=0
--FILE--
<?php
if (defined("pass3")) {
class ErrorClass {
}
} else if (defined("pass2")) {
class TestClass {
function __construct() {
}
function TestClass() {
$this->__construct();
}
}
} else {
function errorHandler($errorNumber, $errorMessage, $fileName, $lineNumber) {
define("pass3", 1);
include(__FILE__);
die("Error: $errorMessage ($fileName:$lineNumber)\n");
}
set_error_handler('errorHandler');
define("pass2", 1);
include(__FILE__);
}
?>
--EXPECTF--
Error: Redefining already defined constructor for class TestClass (%sbug35634.php:12)
-54
View File
@@ -1,54 +0,0 @@
--TEST--
Bug #36214 (__get method works properly only when conditional operator is used)
--SKIPIF--
<?php if (!extension_loaded("spl")) die("skip SPL is no available"); ?>
--FILE--
<?php
class context {
public $stack = array();
public function __set($name,$var) {
$this->stack[$name] = $var;return;
}
public function &__get($name) {
return $this->stack[$name];
}
}
$ctx = new context;
$ctx->comment_preview = array();
$ctx->comment_preview[0] = 1;
$ctx->comment_preview[1] = 2;
var_dump($ctx->comment_preview);
$comment_preview = array();
$comment_preview[0] = 1;
$comment_preview[1] = 2;
$ctx->comment_preview = $comment_preview;
var_dump($ctx->comment_preview);
$ctx->comment_preview = new ArrayObject();
$ctx->comment_preview[0] = 1;
$ctx->comment_preview[1] = 2;
var_dump($ctx->comment_preview);
?>
--EXPECT--
array(2) {
[0]=>
int(1)
[1]=>
int(2)
}
array(2) {
[0]=>
int(1)
[1]=>
int(2)
}
object(ArrayObject)#2 (2) {
[0]=>
int(1)
[1]=>
int(2)
}
+1 -1
View File
@@ -1,5 +1,5 @@
--TEST--
Bug #37212 (Access to protected property of common base class)
Bug #3721 (Access to protected property of common base class)
--FILE--
<?php
-29
View File
@@ -1,29 +0,0 @@
--TEST--
Bug #37715 (array pointers resetting on copy)
--FILE--
<?php
$a = array(
'a' => array(
'A', 'B', 'C', 'D',
),
'b' => array(
'AA', 'BB', 'CC', 'DD',
),
);
// Set the pointer of $a to 'b' and the pointer of 'b' to 'CC'
reset($a);
next($a);
next($a['b']);
next($a['b']);
next($a['b']);
var_dump(key($a['b']));
foreach($a as $k => $d)
{
}
// Alternatively $c = $a; and foreachloop removal will cause identical results.
var_dump(key($a['b']));
--EXPECT--
int(3)
int(3)
+1 -1
View File
@@ -1,5 +1,5 @@
--TEST--
Bug #37811 (define not using toString on objects)
Bug #37811 define not using toString on objects
--FILE--
<?php
+1 -1
View File
@@ -1,5 +1,5 @@
--TEST--
Bug #38220 (Crash on some object operations)
Bug #38220 Crash on some object operations
--FILE--
<?php
class drv {
-45
View File
@@ -1,45 +0,0 @@
--TEST--
Bug #39297 (Memory corryption because of indirect modification of overloaded array)
--FILE--
<?php
function compareByRef(&$first, &$second) {
return $first === $second;
}
class MyTree implements ArrayAccess {
public $parent;
public $children = array();
public function offsetExists($offset) {
}
public function offsetUnset($offset) {
}
public function offsetSet($offset, $value) {
echo "offsetSet()\n";
$cannonicalName = strtolower($offset);
$this->children[$cannonicalName] = $value;
$value->parent = $this;
}
public function offsetGet($offset) {
echo "offsetGet()\n";
$cannonicalName = strtolower($offset);
return $this->children[$cannonicalName];
}
}
$id = 'Test';
$root = new MyTree();
$child = new MyTree();
$root[$id] = $child;
var_dump(compareByRef($root[$id], $child));
?>
--EXPECT--
offsetSet()
offsetGet()
bool(true)
-9
View File
@@ -1,9 +0,0 @@
--TEST--
Bug #39304 (Segmentation fault with list unpacking of string offset)
--FILE--
<?php
$s = "";
list($a, $b) = $s[0];
?>
--EXPECTF--
Fatal error: Cannot use string offset as an array in %sbug39304.php on line 3
-45
View File
@@ -1,45 +0,0 @@
--TEST--
Bug #39438 (Fatal error: Out of memory)
--INI--
memory_limit=16M
--FILE--
<?php
$i=0;
$test2=array(
'a1_teasermenu' => array(
'downloadcounter' => 2777,
'versions' => array(
'0.1.0' => array (
'title' => 'A1 Teasermenu',
'description' => 'Displays a teaser for advanced subpages or a selection of advanced pages',
'state' => 'stable',
'reviewstate' => 0,
'category' => 'plugin',
'downloadcounter' => 2787,
'lastuploaddate' => 1088427240,
'dependencies' => array (
'depends' => array(
'typo3' =>'',
'php' =>'',
'cms' => ''
),
'conflicts' => array('' =>'')
),
'authorname' => 'Mirko Balluff',
'authoremail' => 'balluff@amt1.de',
'ownerusername' => 'amt1',
't3xfilemd5' => '3a4ec198b6ea8d0bc2d69d9b7400398f',
)
)
)
);
$test=array();
while($i<1200) {
$test[]=$test2;
$i++;
}
$out=serialize($test);
echo "ok\n";
?>
--EXPECT--
ok
-16
View File
@@ -1,16 +0,0 @@
--TEST--
Bug #39445 (Calling debug_backtrace() in the __toString() function produces a crash)
--FILE--
<?php
class test {
public function __toString() {
debug_backtrace();
return 'lowercase';
}
}
$test = new test();
echo strtoupper($test);
?>
--EXPECT--
LOWERCASE
-40
View File
@@ -1,40 +0,0 @@
--TEST--
Bug #39449 (Overloaded array properties do not work correctly)
--FILE--
<?php
class A {
private $keys = array();
public function & __get($val) {
return $this->keys[$val];
}
public function __set($k, $v) {
$this->keys[$k] = $v;
}
}
$a =new A();
$a->arr = array('a','b','c');
$b = &$a->arr;
$b[]= 'd';
foreach ($a->arr as $k => $v) {
echo "$k => $v\n";
}
$a->arr[]='d';
foreach ($a->arr as $k => $v) {
echo "$k => $v\n";
}
?>
--EXPECT--
0 => a
1 => b
2 => c
3 => d
0 => a
1 => b
2 => c
3 => d
4 => d
-24
View File
@@ -1,24 +0,0 @@
--TEST--
Bug #39542 (Behaviour of require_once/include_once different to < 5.2.0)
--FILE--
<?php
$oldcwd = getcwd();
chdir(dirname(__FILE__));
if (substr(PHP_OS, 0, 3) == 'WIN') {
set_include_path(dirname(__FILE__).'/bug39542;.');
} else {
set_include_path(dirname(__FILE__).'/bug39542:.');
}
function __autoload($class) {
if (!require_once($class.'.php')) {
error_log('Error: Autoload class: '.$class.' not found!');
}
}
new bug39542();
chdir($oldcwd);
?>
--EXPECT--
ok
-7
View File
@@ -1,7 +0,0 @@
<?php
class bug39542 {
function bug39542() {
echo "ok\n";
}
}
?>
-15
View File
@@ -1,15 +0,0 @@
--TEST--
Bug #39602 (Invalid session.save_handler crashes PHP)
--SKIPIF--
<?php if (!extension_loaded("session")) die("skip"); ?>
--INI--
session.save_handler=qwerty
error_reporting=0
--FILE--
<?php
ini_set("session.save_handler","files");
$x = new stdClass();
echo "ok";
?>
--EXPECT--
ok
-30
View File
@@ -1,30 +0,0 @@
--TEST--
Bug #39721 (Runtime inheritance causes data corruption)
--FILE--
<?php
class test2 {
private static $instances = 0;
public $instance;
public function __construct() {
$this->instance = ++self::$instances;
}
}
$foo = new test2();
if (is_object($foo)) {
class test2_child extends test2 {
}
}
$child = new test2_child();
echo $foo->instance . "\n";
echo $child->instance . "\n";
?>
--EXPECT--
1
2
-20
View File
@@ -1,20 +0,0 @@
--TEST--
Bug #39775 ("Indirect modification ..." message is not shown)
--FILE--
<?php
class test {
var $array = array();
function __get($var) {
$v =& $this->array;
return $this->array;
}
}
$t = new test;
$t->anything[] = 'bar';
print_r($t->anything);
?>
--EXPECTF--
Notice: Indirect modification of overloaded property test::$anything has no effect in %sbug39775.php on line 10
Array
(
)
-13
View File
@@ -1,13 +0,0 @@
--TEST--
Bug #39825 (foreach produces memory error)
--FILE--
<?php
$array = array(1 => 2, "foo" => "bar");
$obj = (object)$array;
foreach ($obj as $name => $value) {
echo "$name -> $value\n";
}
?>
--EXPECT--
1 -> 2
foo -> bar
-88
View File
@@ -1,88 +0,0 @@
--TEST--
Bug #39944 (References broken)
--FILE--
<?php
$intTheValue = 0;
function &getValue() {
global $intTheValue;
return $intTheValue;
}
function setValue(&$int, $iNewValue) {
$int = $iNewValue;
}
setValue(getValue(), 10);
echo "intTheValue = {$intTheValue}\n";
$b = &$intTheValue;
setValue(getValue(), 10);
echo "intTheValue = {$intTheValue}\n";
/****/
$arrTheArray = array();
function &getArray() {
global $arrTheArray;
return $arrTheArray;
}
function addToArray(&$arr, $strToAdd) {
$arr[] = $strToAdd;
}
addToArray(getArray(), "xx1");
$a = getArray();
addToArray($a, "xx2");
$b = &$arrTheArray;
addToArray($b, "xx3");
addToArray(getArray(), "xx4");
$a = getArray();
addToArray($a, "xx5");
echo "arrTheArray = " . print_r($arrTheArray, 1);
/****/
class RefTest {
protected $arr;
function Add($strToAdd) {
$this->addToArray($this->getArray(), $strToAdd);
}
function &getArray() {
if (!$this->arr)
$this->arr = array();
return $this->arr;
}
private function addToArray(&$arr, $strToAdd) {
$arr[] = $strToAdd;
}
}
$objRefTest = new RefTest();
$objRefTest->Add("xx1");
$objRefTest->Add("xx2");
$objRefTest->Add("xx3");
echo "objRefTest->getArray() = " . print_r($objRefTest->getArray(), 1);
?>
--EXPECT--
intTheValue = 10
intTheValue = 10
arrTheArray = Array
(
[0] => xx1
[1] => xx3
[2] => xx4
)
objRefTest->getArray() = Array
(
[0] => xx1
[1] => xx2
[2] => xx3
)
-17
View File
@@ -1,17 +0,0 @@
--TEST--
Bug #39990 (Cannot "foreach" over overloaded properties)
--FILE--
<?php
class Foo {
public function __get($name) {
return array('Hello', 'World');
}
}
$obj=new Foo();
foreach($obj->arr as $value)
echo "$value\n";
?>
--EXPECT--
Hello
World
-10
View File
@@ -1,10 +0,0 @@
<?php
function func1() { }
function func2() { }
function func3() { }
function func4() { }
function func5() { }
function func6() { }
function func7() { }
print ("ok\n");
?>
-17
View File
@@ -1,17 +0,0 @@
--TEST--
Bug #40236 (php -a function allocation eats memory)
--SKIPIF--
<?php
if (php_sapi_name() != "cli") die("skip CLI only");
if (extension_loaded("readline")) die("skip Test doesn't support readline");
?>
--FILE--
<?php
$php = getenv('TEST_PHP_EXECUTABLE');
$cmd = "$php -d memory_limit=4M -a ".dirname(__FILE__)."/bug40236.inc";
echo `$cmd`;
?>
--EXPECTF--
Interactive %s
ok
-25
View File
@@ -1,25 +0,0 @@
--TEST--
Bug #40261 (Extremely slow data handling due to memory fragmentation)
--INI--
memory_limit=128M
--FILE--
<?php
$num = 100000;
$a = Array();
for ($i=0; $i<$num; $i++) {
$a[$i] = Array(1);
}
for ($i=0; $i<$num; $i++) {
$b[$i] = $a[$i][0];
}
unset($a);
for ($i=0; $i<$num; $i++) {
$b[$i] = "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890";
}
echo "ok\n";
?>
--EXPECT--
ok
-26
View File
@@ -1,26 +0,0 @@
--TEST--
Bug #40509 key() function changed behaviour if global array is used within function
--FILE--
<?php
function foo()
{
global $arr;
$c = $arr["v"];
foreach ($c as $v) {}
}
$arr["v"] = array("a");
var_dump(key($arr["v"]));
foo();
var_dump(key($arr["v"]));
foreach ($arr["v"] as $k => $v) {
var_dump($k);
}
var_dump(key($arr["v"]));
--EXPECT--
int(0)
int(0)
int(0)
NULL
-20
View File
@@ -1,20 +0,0 @@
--TEST--
Bug #40621 (Crash when constructor called inappropriately (statically))
--FILE--
<?php
class Foo {
private function __construct() { }
function get() {
self::__construct();
}
}
Foo::get();
echo "Done\n";
?>
--EXPECTF--
Strict Standards: Non-static method Foo::get() should not be called statically in %s on line %d
Fatal error: Non-static method Foo::__construct() cannot be called statically in %s on line %d
-26
View File
@@ -1,26 +0,0 @@
--TEST--
Bug #40705 Iterating within function moves original array pointer
--FILE--
<?php
function doForeach($array)
{
foreach ($array as $k => $v) {
// do stuff
}
}
$foo = array('foo', 'bar', 'baz');
var_dump(key($foo));
doForeach($foo);
var_dump(key($foo));
foreach ($foo as $k => $v) {
var_dump($k);
}
var_dump(key($foo));
--EXPECT--
int(0)
int(0)
int(0)
int(1)
int(2)
NULL
-28
View File
@@ -1,28 +0,0 @@
--TEST--
Bug #40757 (get_object_vars() get nothing in child class)
--FILE--
<?php
class Base {
private $p1='sadf';
function getFields($obj){
return get_object_vars($obj);
}
}
class Child extends Base { }
$base=new Base();
print_r($base->getFields(new Base()));
$child=new Child();
print_r($child->getFields(new Base()));
?>
--EXPECT--
Array
(
[p1] => sadf
)
Array
(
[p1] => sadf
)
-22
View File
@@ -1,22 +0,0 @@
--TEST--
Bug #40770 (Apache child exits when PHP memory limit reached)
--INI--
memory_limit=8M
--SKIPIF--
<?php
$zend_mm_enabled = getenv("USE_ZEND_ALLOC");
if ($zend_mm_enabled === "0") {
die("skip Zend MM disabled");
}
?>
--FILE--
<?php
ini_set('display_errors',true);
$mb=148;
$var = '';
for ($i=0; $i<=$mb; $i++) {
$var.= str_repeat('a',1*1024*1024);
}
?>
--EXPECTF--
Fatal error: Allowed memory size of 8388608 bytes exhausted%s(tried to allocate %d bytes) in %s on line %d
-24
View File
@@ -1,24 +0,0 @@
--TEST--
Bug #40784 (Case sensivity in constructor's fallback)
--FILE--
<?php
class A {
function A () { echo "I'm A\n"; }
}
class B extends A {
function __construct() {
parent::__construct();
parent::__constrUct();
}
}
$b = new B;
echo "Done\n";
?>
--EXPECTF--
I'm A
I'm A
Done
-33
View File
@@ -1,33 +0,0 @@
--TEST--
Bug #40809 (Poor perfomance of ".=")
--FILE--
<?php
error_reporting(E_ALL|E_STRICT);
$num_increments = 100;
$num_repeats = 1000;
$increment = 50;
/* Create some more holes to give the memory allocator something to
* work with. */
$num = 5000;
$a = Array();
for ($i=0; $i<$num; $i++) {
$a[$i] = Array(1);
}
for ($i=0; $i<$num; $i++) {
$b[$i] = $a[$i][0];
}
unset($a);
for ($i=0;$i<$num_repeats;$i++) {
$evil = "";
for ($j=0;$j<$num_increments;$j++) {
$evil .= str_repeat("a", $increment);
}
unset($evil);
}
echo "ok\n";
?>
--EXPECT--
ok
-18
View File
@@ -1,18 +0,0 @@
--TEST--
Bug #40815 (using strings like "class::func" and static methods in set_exception_handler() might result in crash).
--FILE--
<?php
class ehandle{
static public function exh ($ex) {
echo 'foo';
}
}
set_exception_handler("ehandle::exh");
throw new Exception ("Whiii");
echo "Done\n";
?>
--EXPECTF--
foo
-72
View File
@@ -1,72 +0,0 @@
--TEST--
Bug #40833 (Crash when using unset() on an ArrayAccess object retrieved via __get)
--FILE--
<?php
class entity
{
private $data;
private $modified;
function __get($name)
{
if ( isset($this->data[$name]) )
return $this->data[$name];
else
return $this->data[$name] = new set($this);
}
function __set($name, $value)
{
$this->modified[$name] = $value;
}
}
class set implements ArrayAccess
{
private $entity;
function __construct($entity)
{
$this->entity = $entity;
$this->entity->whatever = $this;
}
function clear() {
$this->entity->whatever = null;
}
function offsetUnset($offset)
{
$this->clear();
// $this->entity->{$this->name} = null;
}
function offsetSet($offset, $value)
{
}
function offsetGet($offset)
{
return 'Bogus ';
}
function offsetExists($offset)
{
}
}
$entity = new entity();
echo($entity->whatever[0]);
//This will crash
// $entity->whatever->clear();
unset($entity->whatever[0]);
//This will not crash (comment previous & uncomment this to test
// $test = $entity->whatever; unset($test[0]);
echo($entity->whatever[0]);
echo "ok\n";
?>
--EXPECT--
Bogus Bogus ok
-9
View File
@@ -1,9 +0,0 @@
--TEST--
Bug #40899 (memory leak when nesting list())
--FILE--
<?php
list(list($a,$b),$c)=array(array('a','b'),'c');
echo "$a$b$c\n";
?>
--EXPECT--
abc
-26
View File
@@ -1,26 +0,0 @@
--TEST--
Bug #41026 (segfault when calling "self::method()" in shutdown functions)
--FILE--
<?php
class try_class
{
static public function main ()
{
register_shutdown_function (array ("self", "on_shutdown"));
}
static public function on_shutdown ()
{
printf ("CHECKPOINT\n"); /* never reached */
}
}
try_class::main ();
echo "Done\n";
?>
--EXPECTF--
Done
Warning: (Registered shutdown functions) Unable to call self::on_shutdown() - function does not exist in Unknown on line 0
-31
View File
@@ -1,31 +0,0 @@
--TEST--
Bug #41075 (memleak when creating default object caused exception)
--FILE--
<?php
function err($errno, $errstr, $errfile, $errline)
{
throw new Exception($errstr);
}
set_error_handler("err");
class test {
function foo() {
$var = $this->blah->prop = "string";
var_dump($this->blah);
}
}
$t = new test;
try {
$t->foo();
} catch (Exception $e) {
var_dump($e->getMessage());
}
echo "Done\n";
?>
--EXPECTF--
string(40) "Creating default object from empty value"
Done
Loaded 100 of 2970 files, more files were not shown because too many files have changed in this diff. Show more