mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-10 18:50:50 +00:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c89cf742c4 |
No files matched your search
@@ -12,25 +12,6 @@ document ____executor_globals
|
||||
ZTS detection is automatically based on ext/standard module struct
|
||||
end
|
||||
|
||||
define print_cvs
|
||||
____executor_globals
|
||||
set $p = $eg.current_execute_data.CVs
|
||||
set $c = $eg.current_execute_data.op_array.last_var
|
||||
set $v = $eg.current_execute_data.op_array.vars
|
||||
set $i = 0
|
||||
|
||||
printf "Compiled variables count: %d\n", $c
|
||||
while $i < $c
|
||||
printf "%d = %s\n", $i, $v[$i].name
|
||||
if $p[$i] != 0
|
||||
printzv *$p[$i]
|
||||
else
|
||||
printf "*uninitialized*\n"
|
||||
end
|
||||
set $i = $i + 1
|
||||
end
|
||||
end
|
||||
|
||||
define dump_bt
|
||||
set $t = $arg0
|
||||
while $t
|
||||
|
||||
+2
-2
@@ -58,8 +58,8 @@ Exceptions:
|
||||
calling.
|
||||
|
||||
[7] When commenting out code using a #if statement, do NOT use 0 only. Instead
|
||||
use "<svn username here>_0". For example, #if FOO_0, where FOO is your
|
||||
svn user foo. This allows easier tracking of why code was commented out,
|
||||
use "<cvs username here>_0". For example, #if FOO_0, where FOO is your
|
||||
cvs user foo. This allows easier tracking of why code was commented out,
|
||||
especially in bundled libraries.
|
||||
|
||||
[8] Do not define functions that are not available. For instance, if a
|
||||
|
||||
+1
-1
@@ -206,7 +206,7 @@ STATUS: Working
|
||||
SINCE: 5.1
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pdo_pgsql
|
||||
PRIMARY MAINTAINER: Ilia Alshanetsky <iliaa@php.net>
|
||||
PRIMARY MAINTAINER: Unknown
|
||||
MAINTENANCE: Odd fixes
|
||||
STATUS: Working
|
||||
SINCE: 5.1
|
||||
|
||||
@@ -386,7 +386,7 @@ Apache 2.0 on Unix systems
|
||||
http://snaps.php.net/php5-latest.tar.gz or download binaries for
|
||||
Windows http://snaps.php.net/win32/php5-win32-latest.zip.
|
||||
* a prerelease version downloadable from http://qa.php.net/.
|
||||
* you have always the option to obtain PHP through SVN.
|
||||
* you have always the option to obtain PHP through anonymous CVS.
|
||||
|
||||
These versions of PHP are compatible to Apache 2.0.40 and later.
|
||||
|
||||
@@ -1303,8 +1303,8 @@ Introduction to PECL Installations
|
||||
|
||||
When building PHP modules, it's important to have known-good versions
|
||||
of the required tools (autoconf, automake, libtool, etc.) See the
|
||||
SVN Instructions for details on the required tools, and required
|
||||
versions.
|
||||
Anonymous CVS Instructions for details on the required tools, and
|
||||
required versions.
|
||||
__________________________________________________________________
|
||||
|
||||
Downloading PECL extensions
|
||||
@@ -1320,11 +1320,14 @@ Downloading PECL extensions
|
||||
PECL extensions that have releases listed on the PECL web site are
|
||||
available for download and installation using the pecl command.
|
||||
Specific revisions may also be specified.
|
||||
* SVN
|
||||
All PECL files reside in SVN. A web-based view may be seen at
|
||||
http://svn.php.net/pecl/. To download straight from SVN, use:
|
||||
* CVS
|
||||
Most PECL extensions also reside in CVS. A web-based view may be
|
||||
seen at http://cvs.php.net/pecl/. To download straight from CVS,
|
||||
the following sequence of commands may be used. Note that phpfi is
|
||||
the password for user cvsread:
|
||||
|
||||
$ svn co http://svn.php.net/repository/pecl/<extname>/trunk <extname>
|
||||
$ cvs -d:pserver:cvsread@cvs.php.net:/repository login
|
||||
$ cvs -d:pserver:cvsread@cvs.php.net:/repository co pecl/extname
|
||||
|
||||
* Windows downloads
|
||||
Windows users may find compiled PECL binaries by downloading the
|
||||
|
||||
+47
-19
@@ -11,7 +11,7 @@ all: $(all_targets)
|
||||
@echo "Don't forget to run 'make test'."
|
||||
@echo
|
||||
|
||||
build-modules: $(PHP_MODULES) $(PHP_ZEND_EX)
|
||||
build-modules: $(PHP_MODULES)
|
||||
|
||||
libphp$(PHP_MAJOR_VERSION).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 $@
|
||||
@@ -73,30 +73,57 @@ PHP_TEST_SHARED_EXTENSIONS = ` \
|
||||
for i in $(PHP_MODULES)""; do \
|
||||
. $$i; $(top_srcdir)/build/shtool echo -n -- " -d extension=$$dlname"; \
|
||||
done; \
|
||||
fi; \
|
||||
if test "x$(PHP_ZEND_EX)" != "x"; then \
|
||||
for i in $(PHP_ZEND_EX)""; do \
|
||||
. $$i; $(top_srcdir)/build/shtool echo -n -- " -d $(ZEND_EXT_TYPE)=$(top_builddir)/modules/$$dlname"; \
|
||||
done; \
|
||||
fi`
|
||||
|
||||
test: all
|
||||
-@if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \
|
||||
INI_FILE=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r 'echo php_ini_loaded_file();' 2> /dev/null`; \
|
||||
if test "$$INI_FILE"; then \
|
||||
$(EGREP) -v '^(zend_)?extension(_debug)?(_ts)?[\t\ ]*=' "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \
|
||||
else \
|
||||
echo > $(top_builddir)/tmp-php.ini; \
|
||||
fi; \
|
||||
INI_SCANNED_PATH=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r '$$a = explode(",\n", trim(php_ini_scanned_files())); echo $$a[0];' 2> /dev/null`; \
|
||||
if test "$$INI_SCANNED_PATH"; then \
|
||||
INI_SCANNED_PATH=`$(top_srcdir)/build/shtool path -d $$INI_SCANNED_PATH`; \
|
||||
$(EGREP) -h -v '^(zend_)?extension(_debug)?(_ts)?[\t\ ]*=' "$$INI_SCANNED_PATH"/*.ini >> $(top_builddir)/tmp-php.ini; \
|
||||
fi; \
|
||||
TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \
|
||||
TEST_PHP_SRCDIR=$(top_srcdir) \
|
||||
CC="$(CC)" \
|
||||
$(PHP_EXECUTABLE) -n -c $(top_builddir)/tmp-php.ini $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -n -c $(top_builddir)/tmp-php.ini -d extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \
|
||||
$(PHP_EXECUTABLE) $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -U -d extension_dir=modules/ $(PHP_TEST_SHARED_EXTENSIONS) 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); \
|
||||
else \
|
||||
echo "ERROR: Cannot run tests without CLI sapi."; \
|
||||
fi
|
||||
@@ -110,8 +137,9 @@ clean:
|
||||
rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(OVERALL_TARGET) modules/* libs/*
|
||||
|
||||
distclean: clean
|
||||
rm -f Makefile 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/libphp$(PHP_MAJOR_VERSION).module buildmk.stamp
|
||||
$(EGREP) define'.*include/php' $(top_srcdir)/configure | $(SED) 's/.*>//'|xargs rm -f
|
||||
find . -name Makefile | xargs rm -f
|
||||
|
||||
.PHONY: all clean install distclean test
|
||||
.NOEXPORT:
|
||||
@@ -1,821 +1,6 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
27 Nov 2009, PHP 5.2.12RC3
|
||||
- Fixed break in the build chain introduced in 5.2.12RC2 (Jani)
|
||||
|
||||
26 Nov 2009, PHP 5.2.12RC2
|
||||
- Updated timezone database to version 2009.19 (2009s). (Derick)
|
||||
|
||||
- Changed "post_max_size" php.ini directive to allow unlimited post size by
|
||||
setting it to 0. (Rasmus)
|
||||
|
||||
- Fixed error_log() to be binary safe when using message_type 3. (Jani)
|
||||
|
||||
- Fixed bug #50285 (xmlrpc does not preserve keys in encoded indexed arrays).
|
||||
(Felipe)
|
||||
- Fixed bug #50282 (xmlrpc_encode_request() changes object into array in
|
||||
calling function). (Felipe)
|
||||
- Fixed bug #50255 (isset() and empty() silently casts array to object).
|
||||
(Felipe)
|
||||
- Fixed bug #50219 (soap call Segmentation fault on a redirected url).
|
||||
(Pierrick)
|
||||
- Fixed bug #50207 (segmentation fault when concatenating very large strings
|
||||
on 64bit linux). (Ilia)
|
||||
- Fixed bug #50195 (pg_copy_to() fails when table name contains schema. (Ilia)
|
||||
- Fixed bug #50185 (ldap_get_entries() return false instead of an empty array
|
||||
when there is no error). (Jani)
|
||||
- Fixed bug #50174 (Incorrectly matched docComment). (Felipe)
|
||||
- Fixed bug #50158 (FILTER_VALIDATE_EMAIL fails with valid addresses
|
||||
containing = or ?). (Pierrick)
|
||||
- Fixed bug #49677 (ini parser crashes with apache2 and using ${something}
|
||||
ini variables). (Jani)
|
||||
- Fixed bug #49521 (PDO fetchObject sets values before calling constructor).
|
||||
(Pierrick)
|
||||
|
||||
|
||||
12 Nov 2009, PHP 5.2.12RC1
|
||||
- Updated timezone database to version 2009.18 (2009r). (Derick)
|
||||
|
||||
- Added "max_file_uploads" INI directive, which can be set to limit the
|
||||
number of file uploads per-request to 20 by default, to prevent possible
|
||||
DOS via temporary file exhaustion. (Ilia)
|
||||
|
||||
- Fixed unnecessary invocation of setitimer when timeouts have been disabled.
|
||||
(Arvind Srinivasan)
|
||||
- Fixed crash in com_print_typeinfo when an invalid typelib is given.
|
||||
(Pierre)
|
||||
- Fixed a safe_mode bypass in tempnam() identified by Grzegorz Stachowiak.
|
||||
(Rasmus)
|
||||
- Fixed a open_basedir bypass in posix_mkfifo() identified by Grzegorz
|
||||
Stachowiak. (Rasmus)
|
||||
- Fixed crash in SQLiteDatabase::ArrayQuery() and SQLiteDatabase::SingleQuery()
|
||||
when calling using Reflection. (Felipe)
|
||||
- Fixed crash when instantiating PDORow and PDOStatement through Reflection.
|
||||
(Felipe)
|
||||
- Fixed memory leak in openssl_pkcs12_export_to_file(). (Felipe)
|
||||
|
||||
- Fixed bug #50073 (parse_url() incorrect when ? in fragment). (Ilia)
|
||||
- Fixed bug #50006 (Segfault caused by uksort()). (Felipe)
|
||||
- Fixed bug #50005 (Throwing through Reflection modified Exception object
|
||||
makes segmentation fault). (Felipe)
|
||||
- Fixed bug #49990 (SNMP3 warning message about security level printed twice).
|
||||
(Jani)
|
||||
- Fixed bug #49985 (pdo_pgsql prepare() re-use previous aborted transaction).
|
||||
(ben dot pineau at gmail dot com, Ilia, Matteo)
|
||||
- Fixed bug #49921 (Curl post upload functions changed). (Ilia)
|
||||
- Fixed bug #49972 (AppendIterator undefined function crash). (Johannes)
|
||||
- Fixed bug #49855 (import_request_variables() always returns NULL). (Ilia,
|
||||
sjoerd at php dot net)
|
||||
- Fixed bug #49847 (exec() fails to return data inside 2nd parameter, given
|
||||
output lines >4095 bytes). (Ilia)
|
||||
- Fixed bug #49809 (time_sleep_until() is not available on OpenSolaris). (Jani)
|
||||
- Fixed Bug #49785 (insufficient input string validation of htmlspecialchars()).
|
||||
(Moriyoshi, hello at iwamot dot com)
|
||||
- Fixed bug #49757 (long2ip() can return wrong value in a multi-threaded
|
||||
applications). (Ilia, Florian Anderiasch)
|
||||
- Fixed bug #48752 (Crash during date parsing with invalid date). (Pierre)
|
||||
- Fixed bug #49738 (calling mcrypt() after mcrypt_generic_deinit() crashes).
|
||||
(Sriram Natarajan)
|
||||
- Fixed bug #49719 (ReflectionClass::hasProperty returns true for a private
|
||||
property in base class). (Felipe)
|
||||
- Fixed bug #49698 (Unexpected change in strnatcasecmp()). (Rasmus)
|
||||
- Fixed bug #49647 (DOMUserData does not exist). (Rob)
|
||||
- Fixed bug #49630 (imap_listscan() function missing). (Felipe)
|
||||
- Fixed bug #49627 (error_log to specified file does not log time according
|
||||
to date.timezone). (Dmitry)
|
||||
- Fixed bug #49578 (make install-pear fails). (Hannes)
|
||||
- Fixed bug #49536 (mb_detect_encoding() returns incorrect results when
|
||||
mbstring.strict_mode is turned on). (Moriyoshi)
|
||||
- Fixed bug #49531 (CURLOPT_INFILESIZE sometimes causes warning "CURLPROTO_FILE
|
||||
cannot be set"). (Felipe)
|
||||
- Fixed bug #49517 (cURL's CURLOPT_FILE prevents file from being deleted after
|
||||
fclose()). (Ilia)
|
||||
- Fixed bug #49354 (mb_strcut() cuts wrong length when offset is in the middle
|
||||
of a multibyte character). (Moriyoshi)
|
||||
- Fixed bug #49528 (UTF-16 strings prefixed by BOMs wrongly converted).
|
||||
(Moriyoshi)
|
||||
- Fixed bug #49332 (Build error with Snow Leopard). (Scott)
|
||||
- Fixed bug #49244 (Floating point NaN cause garbage characters). (Sjoerd)
|
||||
- Fixed bug #49098 (mysqli segfault on error). (Rasmus)
|
||||
- Fixed bug #48805 (IPv6 socket transport is not working). (Ilia)
|
||||
- Fixed bug #48764 (PDO_pgsql::query() always uses implicit prepared statements
|
||||
if v3 proto available). (Matteo, Mark Kirkwood)
|
||||
|
||||
|
||||
17 Sep 2009, PHP 5.2.11
|
||||
- Fixed certificate validation inside php_openssl_apply_verification_policy.
|
||||
(Ryan Sleevi, Ilia)
|
||||
- Updated timezone database to version 2009.13 (2009m) (Derick)
|
||||
- Added missing sanity checks around exif processing. (Ilia)
|
||||
- Fixed sanity check for the color index in imagecolortransparent. (Pierre)
|
||||
- Fixed zlib.deflate compress filter to actually accept level parameter. (Jani)
|
||||
- Fixed leak on error in popen/exec (and related functions) on Windows.
|
||||
(Pierre)
|
||||
- Fixed regression in cURL extension that prevented flush of data to output
|
||||
defined as a file handle. (Ilia)
|
||||
- Fixed memory leak in stream_is_local(). (Felipe, Tony)
|
||||
|
||||
- Fixed bug #49470 (FILTER_SANITIZE_EMAIL allows disallowed characters). (Ilia)
|
||||
- Fixed bug #49447 (php engine needs to correctly check for socket API return
|
||||
status on windows). (Sriram Natarajan)
|
||||
- Fixed bug #49372 (segfault in php_curl_option_curl). (Pierre)
|
||||
- Fixed bug #49361 (wordwrap() wraps incorrectly on end of line boundaries).
|
||||
(Ilia, code-it at mail dot ru)
|
||||
- Fixed bug #49289 (bcmath module doesn't compile with phpize configure).
|
||||
(Jani)
|
||||
- Fixed bug #49286 (php://input (php_stream_input_read) is broken). (Jani)
|
||||
- Fixed bug #49269 (Ternary operator fails on Iterator object when used
|
||||
inside foreach declaration). (Etienne, Dmitry)
|
||||
- Fixed bug #49236 (Missing PHP_SUBST(PDO_MYSQL_SHARED_LIBADD)). (Jani)
|
||||
- Fixed bug #49144 (Import of schema from different host transmits original
|
||||
authentication details). (Dmitry)
|
||||
- Fixed bug #49132 (posix_times returns false without error).
|
||||
(phpbugs at gunnu dot us)
|
||||
- Fixed bug #49125 (Error in dba_exists C code). (jdornan at stanford dot edu)
|
||||
- Fixed bug #49095 (proc_get_status['exitcode'] fails on win32). (Felipe)
|
||||
- Fixed bug #49074 (private class static fields can be modified by using
|
||||
reflection). (Jani)
|
||||
- Fixed bug #49072 (feof never returns true for damaged file in zip).
|
||||
(Pierre)
|
||||
- Fixed bug #49052 (context option headers freed too early when using
|
||||
--with-curlwrappers). (Jani)
|
||||
- Fixed bug #49032 (SplFileObject::fscanf() variables passed by reference).
|
||||
(Jani)
|
||||
- Fixed bug #49026 (proc_open() can bypass safe_mode_protected_env_vars
|
||||
restrictions). (Ilia)
|
||||
- Fixed bug #49000 (PHP CLI in Interactive mode (php -a) crashes when
|
||||
including files from function). (Stas)
|
||||
- Fixed bug #48994 (zlib.output_compression does not output HTTP headers
|
||||
when set to a string value). (Jani)
|
||||
- Fixed bug #48980 (Crash when compiling with pdo_firebird). (Felipe)
|
||||
- Fixed bug #48962 (cURL does not upload files with specified filename). (Ilia)
|
||||
- Fixed bug #48929 (Double \r\n after HTTP headers when "header" context
|
||||
option is an array). (David Zülke)
|
||||
- Fixed bug #48913 (Too long error code strings in pdo_odbc driver).
|
||||
(naf at altlinux dot ru, Felipe)
|
||||
- Fixed bug #48802 (printf() returns incorrect outputted length). (Jani)
|
||||
- Fixed bug #48801 (Problem with imagettfbbox). (Takeshi Abe)
|
||||
- Fixed bug #48788 (RecursiveDirectoryIterator doesn't descend into
|
||||
symlinked directories). (Ilia)
|
||||
- Fixed bug #48774 (SIGSEGVs when using curl_copy_handle()). (Sriram Natarajan)
|
||||
- Fixed bug #48763 (ZipArchive produces corrupt archive).
|
||||
(dani dot church at gmail dot com, Pierre)
|
||||
- Fixed bug #48762 (IPv6 address filter still rejects valid address). (Felipe)
|
||||
- Fixed bug #48733 (CURLOPT_WRITEHEADER|CURLOPT_FILE|CURLOPT_STDERR warns on
|
||||
files that have been opened with r+). (Ilia)
|
||||
- Fixed bug #48732 (TTF Bounding box wrong for letters below baseline).
|
||||
(Takeshi Abe)
|
||||
- Fixed bug #48718 (FILTER_VALIDATE_EMAIL does not allow numbers in domain
|
||||
components). (Ilia)
|
||||
- Fixed bug #48709 (metaphone and 'wh'). (brettz9 at yahoo dot com, Felipe)
|
||||
- Fixed bug #48697 (mb_internal_encoding() value gets reset by parse_str()).
|
||||
(Moriyoshi)
|
||||
- Fixed bug #48696 (ldap_read() segfaults with invalid parameters). (Felipe)
|
||||
- Fixed bug #48693 (Double declaration of __lambda_func when lambda wrongly
|
||||
formatted). (peter at lvp-media dot com, Felipe)
|
||||
- Fixed bug #48661 (phpize is broken with non-bash shells). (Jani)
|
||||
- Fixed bug #48645 (mb_convert_encoding() doesn't understand hexadecimal
|
||||
html-entities). (Moriyoshi)
|
||||
- Fixed bug #48637 ("file" fopen wrapper is overwritten when using
|
||||
--with-curlwrappers). (Jani)
|
||||
- Fixed bug #48636 (Error compiling of ext/date on netware).
|
||||
(guenter at php.net, Ilia)
|
||||
- Fixed bug #48629 (get_defined_constants() ignores categorize parameter).
|
||||
(Felipe)
|
||||
- Fixed bug #48619 (imap_search ALL segfaults). (Pierre)
|
||||
- Fixed bug #48608 (Invalid libreadline version not detected during
|
||||
configure). (Jani)
|
||||
- Fixed bug #48555 (ImageFTBBox() differs from previous versions for texts with
|
||||
new lines) (Takeshi Abe)
|
||||
- Fixed bug #48539 (pdo_dblib fails to connect, throws empty PDOException
|
||||
"SQLSTATE[] (null)"). (Felipe)
|
||||
- Fixed bug #48465 (sys_get_temp_dir() possibly inconsistent when using TMPDIR).
|
||||
(Ilia)
|
||||
- Fixed bug #48450 (Compile failure under IRIX 6.5.30 building gd.c). (Kalle)
|
||||
- Fixed bug #48400 (imap crashes when closing stream opened with OP_PROTOTYPE
|
||||
flag). (Jani)
|
||||
- Fixed bug #48284 (hash "adler32" byte order is reversed). (Scott)
|
||||
- Fixed bug #48276 (date("Y") on big endian machines produces the wrong
|
||||
result). (Scott)
|
||||
- Fixed bug #48247 (Infinite loop and possible crash during startup with
|
||||
errors when errors are logged). (Jani)
|
||||
- Fixed bug #48182 (ssl handshake fails during asynchronous socket connection).
|
||||
(Sriram Natarajan)
|
||||
- Fixed bug #48116 (Fixed build with Openssl 1.0).
|
||||
(Pierre, Al dot Smith at aeschi dot ch dot eu dot org)
|
||||
- Fixed bug #48060 (pdo_pgsql - large objects are returned as empty). (Matteo)
|
||||
- Fixed bug #48057 (Only the date fields of the first row are fetched,
|
||||
others are empty). (info at programmiernutte dot net)
|
||||
- Fixed bug #47481 (natcasesort() does not sort extended ASCII characters
|
||||
correctly). (Herman Radtke)
|
||||
- Fixed bug #47351 (Memory leak in DateTime). (Derick, Tobias John)
|
||||
- Fixed bug #47273 (Encoding bug in SoapServer->fault). (Dmitry)
|
||||
- Fixed bug #46020 (with Sun Java System Web Server 7.0 on HPUX, #define HPUX).
|
||||
(Uwe Schindler)
|
||||
- Fixed bug #45905 (imagefilledrectangle() clipping error).
|
||||
(markril at hotmail dot com, Pierre)
|
||||
- Fixed bug #45280 (Reflection of instantiated COM classes causes PHP to
|
||||
crash). (Paul Richards, Kalle)
|
||||
- Fixed bug #45141 (setcookie will output expires years of >4 digits). (Ilia)
|
||||
- Fixed bug #44683 (popen crashes when an invalid mode is passed). (Pierre)
|
||||
- Fixed bug #44144 (spl_autoload_functions() should return object instance
|
||||
when appropriate). (Hannes, Etienne)
|
||||
- Fixed bug #43510 (stream_get_meta_data() does not return same mode as used in
|
||||
fopen). (Jani)
|
||||
- Fixed bug #42434 (ImageLine w/ antialias = 1px shorter).
|
||||
(wojjie at gmail dot com, Kalle)
|
||||
- Fixed bug #28038 (Sent incorrect RCPT TO commands to SMTP server) (Garrett)
|
||||
- Fixed bug #49572 (use of C++ style comments causes build failure).
|
||||
(Sriram Natarajan)
|
||||
|
||||
17 Jun 2009, PHP 5.2.10
|
||||
- Added "ignore_errors" option to http fopen wrapper. (David Zulke, Sara)
|
||||
- Added new CURL options CURLOPT_REDIR_PROTOCOLS, CURLOPT_PROTOCOLS,
|
||||
and CURLPROTO_* for redirect fixes in CURL 7.19.4. (Yoram Bar Haim, Stas)
|
||||
- Added support for Sun CC (FR #46595 and FR #46513). (David Soria Parra)
|
||||
|
||||
- Changed default value of array_unique()'s optional sorting type parameter
|
||||
back to SORT_STRING to fix backwards compatibility breakage introduced in
|
||||
PHP 5.2.9. (Moriyoshi)
|
||||
|
||||
- Fixed memory corruptions while reading properties of zip files. (Ilia)
|
||||
- Fixed memory leak in ob_get_clean/ob_get_flush. (Christian)
|
||||
- Fixed segfault on invalid session.save_path. (Hannes)
|
||||
- Fixed leaks in imap when a mail_criteria is used. (Pierre)
|
||||
- Fixed missing erealloc() in fix for Bug #40091 in spl_autoload_register. (Greg)
|
||||
|
||||
- Fixed bug #48562 (Reference recursion causes segfault when used in
|
||||
wddx_serialize_vars()). (Felipe)
|
||||
- Fixed bug #48557 (Numeric string keys in Apache Hashmaps are not cast to
|
||||
integers). (David Zuelke)
|
||||
- Fixed bug #48518 (curl crashes when writing into invalid file handle). (Tony)
|
||||
- Fixed bug #48514 (cURL extension uses same resource name for simple and
|
||||
multi APIs). (Felipe)
|
||||
- Fixed bug #48469 (ldap_get_entries() leaks memory on empty search
|
||||
results). (Patrick)
|
||||
- Fixed bug #48456 (CPPFLAGS not restored properly in phpize.m4). (Jani,
|
||||
spisek at kerio dot com)
|
||||
- Fixed bug #48448 (Compile failure under IRIX 6.5.30 building cast.c).
|
||||
(Kalle)
|
||||
- Fixed bug #48441 (ldap_search() sizelimit, timelimit and deref options
|
||||
persist). (Patrick)
|
||||
- Fixed bug #48434 (Improve memory_get_usage() accuracy). (Arnaud)
|
||||
- Fixed bug #48416 (Force a cache limit in ereg() to stop excessive memory
|
||||
usage). (Scott)
|
||||
- Fixed bug #48409 (Crash when exception is thrown while passing function
|
||||
arguments). (Arnaud)
|
||||
- Fixed bug #48378 (exif_read_data() segfaults on certain corrupted .jpeg
|
||||
files). (Pierre)
|
||||
- Fixed bug #48359 (Script hangs on snmprealwalk if OID is not increasing).
|
||||
(Ilia, simonov at gmail dot com)
|
||||
- Fixed bug #48336 (ReflectionProperty::getDeclaringClass() does not work
|
||||
with redeclared property).
|
||||
(patch by Markus dot Lidel at shadowconnect dot com)
|
||||
- Fixed bug #48326 (constant MSG_DONTWAIT not defined). (Arnaud)
|
||||
- Fixed bug #48313 (fgetcsv() does not return null for empty rows). (Ilia)
|
||||
- Fixed bug #48309 (stream_copy_to_stream() and fpasstru() do not update
|
||||
stream position of plain files). (Arnaud)
|
||||
- Fixed bug #48307 (stream_copy_to_stream() copies 0 bytes when $source is a
|
||||
socket). (Arnaud)
|
||||
- Fixed bug #48273 (snmp*_real_walk() returns SNMP errors as values).
|
||||
(Ilia, lytboris at gmail dot com)
|
||||
- Fixed bug #48256 (Crash due to double-linking of history.o).
|
||||
(tstarling at wikimedia dot org)
|
||||
- Fixed bug #48248 (SIGSEGV when access to private property via &__get).
|
||||
(Felipe)
|
||||
- Fixed bug #48247 (Crash on errors during startup). (Stas)
|
||||
- Fixed bug #48240 (DBA Segmentation fault dba_nextkey). (Felipe)
|
||||
- Fixed bug #48224 (Incorrect shuffle in array_rand). (Etienne)
|
||||
- Fixed bug #48221 (memory leak when passing invalid xslt parameter).
|
||||
(Felipe)
|
||||
- Fixed bug #48207 (CURLOPT_(FILE|WRITEHEADER options do not error out when
|
||||
working with a non-writable stream). (Ilia)
|
||||
- Fixed bug #48206 (Iterating over an invalid data structure with
|
||||
RecursiveIteratorIterator leads to a segfault). (Scott)
|
||||
- Fixed bug #48204 (xmlwriter_open_uri() does not emit warnings on invalid
|
||||
paths). (Ilia)
|
||||
- Fixed bug #48203 (Crash when CURLOPT_STDERR is set to regular file). (Jani)
|
||||
- Fixed bug #48202 (Out of Memory error message when passing invalid file
|
||||
path) (Pierre)
|
||||
- Fixed bug #48156 (Added support for lcov v1.7). (Ilia)
|
||||
- Fixed bug #48132 (configure check for curl ssl support fails with
|
||||
--disable-rpath). (Jani)
|
||||
- Fixed bug #48131 (Don't try to bind ipv4 addresses to ipv6 ips via bindto).
|
||||
(Ilia)
|
||||
- Fixed bug #48070 (PDO_OCI: Segfault when using persistent connection).
|
||||
(Pierre, Matteo, jarismar dot php at gmail dot com)
|
||||
- Fixed bug #48058 (Year formatter goes wrong with out-of-int range). (Derick)
|
||||
- Fixed bug #48038 (odbc_execute changes variables used to form params array).
|
||||
(Felipe)
|
||||
- Fixed bug #47997 (stream_copy_to_stream returns 1 on empty streams). (Arnaud)
|
||||
- Fixed bug #47991 (SSL streams fail if error stack contains items). (Mikko)
|
||||
- Fixed bug #47981 (error handler not called regardless). (Hannes)
|
||||
- Fixed bug #47969 (ezmlm_hash() returns different values depend on OS). (Ilia)
|
||||
- Fixed bug #47946 (ImageConvolution overwrites background). (Ilia)
|
||||
- Fixed bug #47940 (memory leaks in imap_body). (Pierre, Jake Levitt)
|
||||
- Fixed bug #47937 (system() calls sapi_flush() regardless of output
|
||||
buffering). (Ilia)
|
||||
- Fixed bug #47903 ("@" operator does not work with string offsets). (Felipe)
|
||||
- Fixed bug #47893 (CLI aborts on non blocking stdout). (Arnaud)
|
||||
- Fixed bug #47849 (Non-deep import loses the namespace). (Rob)
|
||||
- Fixed bug #47845 (PDO_Firebird omits first row from query). (Lars W)
|
||||
- Fixed bug #47836 (array operator [] inconsistency when the array has
|
||||
PHP_INT_MAX index value). (Matt)
|
||||
- Fixed bug #47831 (Compile warning for strnlen() in main/spprintf.c).
|
||||
(Ilia, rainer dot jung at kippdata dot de)
|
||||
- Fixed bug #47828 (openssl_x509_parse() segfaults when a UTF-8 conversion
|
||||
fails). (Scott, Kees Cook, Pierre)
|
||||
- Fixed bug #47818 (Segfault due to bound callback param). (Felipe)
|
||||
- Fixed bug #47801 (__call() accessed via parent:: operator is provided
|
||||
incorrect method name). (Felipe)
|
||||
- Fixed bug #47769 (Strange extends PDO). (Felipe)
|
||||
- Fixed bug #47745 (FILTER_VALIDATE_INT doesn't allow minimum integer).
|
||||
(Dmitry)
|
||||
- Fixed bug #47721 (Alignment issues in mbstring and sysvshm extension).
|
||||
(crrodriguez at opensuse dot org, Ilia)
|
||||
- Fixed bug #47704 (PHP crashes on some "bad" operations with string
|
||||
offsets). (Dmitry)
|
||||
- Fixed bug #47695 (build error when xmlrpc and iconv are compiled against
|
||||
different iconv versions). (Scott)
|
||||
- Fixed bug #47667 (ZipArchive::OVERWRITE seems to have no effect).
|
||||
(Mikko, Pierre)
|
||||
- Fixed bug #47644 (Valid integers are truncated with json_decode()). (Scott)
|
||||
- Fixed bug #47639 (pg_copy_from() WARNING: nonstandard use of \\ in a
|
||||
string literal). (Ilia)
|
||||
- Fixed bug #47616 (curl keeps crashing). (Felipe)
|
||||
- Fixed bug #47598 (FILTER_VALIDATE_EMAIL is locale aware). (Ilia)
|
||||
- Fixed bug #47566 (pcntl_wexitstatus() returns signed status).
|
||||
(patch by james at jamesreno dot com)
|
||||
- Fixed bug #47564 (unpacking unsigned long 32bit bit endian returns wrong
|
||||
result). (Ilia)
|
||||
- Fixed bug #47487 (performance degraded when reading large chunks after
|
||||
fix of bug #44607). (Arnaud)
|
||||
- Fixed bug #47468 (enable cli|cgi-only extensions for embed sapi). (Jani)
|
||||
- Fixed bug #47435 (FILTER_FLAG_NO_PRIV_RANGE does not work with ipv6
|
||||
addresses in the filter extension). (Ilia)
|
||||
- Fixed bug #47430 (Errors after writing to nodeValue parameter of an absent
|
||||
previousSibling). (Rob)
|
||||
- Fixed bug #47365 (ip2long() may allow some invalid values on certain 64bit
|
||||
systems). (Ilia)
|
||||
- Fixed bug #47254 (Wrong Reflection for extends class). (Felipe)
|
||||
- Fixed bug #47042 (cgi sapi is incorrectly removing SCRIPT_FILENAME).
|
||||
(Sriram Natarajan, David Soria Parra)
|
||||
- Fixed bug #46882 (Serialize / Unserialize misbehaviour under OS with
|
||||
different bit numbers). (Matt)
|
||||
- Fixed bug #46812 (get_class_vars() does not include visible private variable
|
||||
looking at subclass). (Arnaud)
|
||||
- Fixed bug #46386 (Digest authentication with SOAP module fails against MSSQL
|
||||
SOAP services). (Ilia, lordelph at gmail dot com)
|
||||
- Fixed bug #46109 (Memory leak when mysqli::init() is called multiple times).
|
||||
(Andrey)
|
||||
- Fixed bug #45997 (safe_mode bypass with exec/system/passthru (windows only)).
|
||||
(Pierre)
|
||||
- Fixed bug #45877 (Array key '2147483647' left as string). (Matt)
|
||||
- Fixed bug #45822 (Near infinite-loops while parsing huge relative offsets).
|
||||
(Derick, Mike Sullivan)
|
||||
- Fixed bug #45799 (imagepng() crashes on empty image).
|
||||
(Martin McNickle, Takeshi Abe)
|
||||
- Fixed bug #45622 (isset($arrayObject->p) misbehaves with
|
||||
ArrayObject::ARRAY_AS_PROPS set). (robin_fernandes at uk dot ibm dot com, Arnaud)
|
||||
- Fixed bug #45614 (ArrayIterator::current(), ::key() can show 1st private prop
|
||||
of wrapped object). (robin_fernandes at uk dot ibm dot com, Arnaud)
|
||||
- Fixed bug #45540 (stream_context_create creates bad http request). (Arnaud)
|
||||
- Fixed bug #45202 (zlib.output_compression can not be set with ini_set()).
|
||||
(Jani)
|
||||
- Fixed bug #45191 (error_log ignores date.timezone php.ini val when setting
|
||||
logging timestamps). (Derick)
|
||||
- Fixed bug #45092 (header HTTP context option not being used when compiled
|
||||
using --with-curlwrappers). (Jani)
|
||||
- Fixed bug #44996 (xmlrpc_decode() ignores time zone on iso8601.datetime).
|
||||
(Ilia, kawai at apache dot org)
|
||||
- Fixed bug #44827 (define() is missing error checks for class constants).
|
||||
(Ilia)
|
||||
- Fixed bug #44214 (Crash using preg_replace_callback() and global variables).
|
||||
(Nuno, Scott)
|
||||
- Fixed bug #43073 (TrueType bounding box is wrong for angle<>0).
|
||||
(Martin McNickle)
|
||||
- Fixed bug #42663 (gzinflate() try to allocate all memory with truncated
|
||||
data). (Arnaud)
|
||||
- Fixed bug #42414 (some odbc_*() functions incompatible with Oracle ODBC
|
||||
driver). (jhml at gmx dot net)
|
||||
- Fixed bug #42362 (HTTP status codes 204 and 304 should not be gzipped).
|
||||
(Scott, Edward Z. Yang)
|
||||
- Fixed bug #42143 (The constant NAN is reported as 0 on Windows)
|
||||
(Kanwaljeet Singla, Venkat Raman Don)
|
||||
- Fixed bug #38805 (PDO truncates text from SQL Server text data type field).
|
||||
(Steph)
|
||||
|
||||
|
||||
26 Feb 2009, PHP 5.2.9
|
||||
- Changed __call() to be invoked on private/protected method access, similar to
|
||||
properties and __get(). (Andrei)
|
||||
|
||||
- Added optional sorting type flag parameter to array_unique(). Default is
|
||||
SORT_REGULAR. (Andrei)
|
||||
|
||||
- Fixed a crash on extract in zip when files or directories entry names contain
|
||||
a relative path. (Pierre)
|
||||
- Fixed error conditions handling in stream_filter_append(). (Arnaud)
|
||||
- Fixed zip filename property read. (Pierre)
|
||||
- Fixed explode() behavior with empty string to respect negative limit. (Shire)
|
||||
- Fixed security issue in imagerotate(), background colour isn't validated
|
||||
correctly with a non truecolour image. Reported by Hamid Ebadi,
|
||||
APA Laboratory (Fixes CVE-2008-5498). (Scott)
|
||||
- Fixed a segfault when malformed string is passed to json_decode(). (Scott)
|
||||
- Fixed bug in xml_error_string() which resulted in messages being
|
||||
off by one. (Scott)
|
||||
|
||||
- Fixed bug #47422 (modulus operator returns incorrect results on 64 bit
|
||||
linux). (Matt)
|
||||
- Fixed bug #47399 (mb_check_encoding() returns true for some illegal SJIS
|
||||
characters). (for-bugs at hnw dot jp, Moriyoshi)
|
||||
- Fixed bug #47353 (crash when creating a lot of objects in object
|
||||
destructor). (Tony)
|
||||
- Fixed bug #47322 (sscanf %d doesn't work). (Felipe)
|
||||
- Fixed bug #47282 (FILTER_VALIDATE_EMAIL is marking valid email addresses
|
||||
as invalid). (Ilia)
|
||||
- Fixed bug #47220 (segfault in dom_document_parser in recovery mode). (Rob)
|
||||
- Fixed bug #47217 (content-type is not set properly for file uploads). (Ilia)
|
||||
- Fixed bug #47174 (base64_decode() interprets pad char in mid string as
|
||||
terminator). (Ilia)
|
||||
- Fixed bug #47165 (Possible memory corruption when passing return value by
|
||||
reference). (Dmitry)
|
||||
- Fixed bug #47152 (gzseek/fseek using SEEK_END produces strange results).
|
||||
(Felipe)
|
||||
- Fixed bug #47131 (SOAP Extension ignores "user_agent" ini setting). (Ilia)
|
||||
- Fixed bug #47109 (Memory leak on $a->{"a"."b"} when $a is not an object).
|
||||
(Etienne, Dmitry)
|
||||
- Fixed bug #47104 (Linking shared extensions fails with icc). (Jani)
|
||||
- Fixed bug #47049 (SoapClient::__soapCall causes a segmentation fault).
|
||||
(Dmitry)
|
||||
- Fixed bug #47048 (Segfault with new pg_meta_data). (Felipe)
|
||||
- Fixed bug #47042 (PHP cgi sapi is removing SCRIPT_FILENAME for non
|
||||
apache). (Sriram Natarajan)
|
||||
- Fixed bug #47037 (No error when using fopen with empty string). (Cristian
|
||||
Rodriguez R., Felipe)
|
||||
- Fixed bug #47035 (dns_get_record returns a garbage byte at the end of a
|
||||
TXT record). (Felipe)
|
||||
- Fixed bug #47027 (var_export doesn't show numeric indices on ArrayObject).
|
||||
(Derick)
|
||||
- Fixed bug #46985 (OVERWRITE and binary mode does not work, regression
|
||||
introduced in 5.2.8). (Pierre)
|
||||
- Fixed bug #46973 (IPv6 address filter rejects valid address). (Felipe)
|
||||
- Fixed bug #46964 (Fixed pdo_mysql build with older version of MySQL). (Ilia)
|
||||
- Fixed bug #46959 (Unable to disable PCRE). (Scott)
|
||||
- Fixed bug #46918 (imap_rfc822_parse_adrlist host part not filled in
|
||||
correctly). (Felipe)
|
||||
- Fixed bug #46889 (Memory leak in strtotime()). (Derick)
|
||||
- Fixed bug #46887 (Invalid calls to php_error_docref()). (oeriksson at
|
||||
mandriva dot com, Ilia)
|
||||
- Fixed bug #46873 (extract($foo) crashes if $foo['foo'] exists). (Arnaud)
|
||||
- Fixed bug #46843 (CP936 euro symbol is not converted properly). (ty_c at
|
||||
cybozuy dot co dot jp, Moriyoshi)
|
||||
- Fixed bug #46798 (Crash in mssql extension when retrieving a NULL value
|
||||
inside a binary or image column type). (Ilia)
|
||||
- Fixed bug #46782 (fastcgi.c parse error). (Matt)
|
||||
- Fixed bug #46760 (SoapClient doRequest fails when proxy is used). (Felipe)
|
||||
- Fixed bug #46748 (Segfault when an SSL error has more than one error).
|
||||
(Scott)
|
||||
- Fixed bug #46739 (array returned by curl_getinfo should contain
|
||||
content_type key). (Mikko)
|
||||
- Fixed bug #46699 (xml_parse crash when parser is namespace aware). (Rob)
|
||||
- Fixed bug #46419 (Elements of associative arrays with NULL value are
|
||||
lost). (Dmitry)
|
||||
- Fixed bug #46282 (Corrupt DBF When Using DATE). (arne at bukkie dot nl)
|
||||
- Fixed bug #46026 (bz2.decompress/zlib.inflate filter tries to decompress
|
||||
after end of stream). (Greg)
|
||||
- Fixed bug #46005 (User not consistently logged under Apache2). (admorten
|
||||
at umich dot edu, Stas)
|
||||
- Fixed bug #45996 (libxml2 2.7 causes breakage with character data in
|
||||
xml_parse()). (Rob)
|
||||
- Fixed bug #45940 (MySQLI OO does not populate connect_error property on
|
||||
failed connect). (Johannes)
|
||||
- Fixed bug #45923 (mb_st[r]ripos() offset not handled correctly). (Moriyoshi)
|
||||
- Fixed bug #45327 (memory leak if offsetGet throws exception). (Greg)
|
||||
- Fixed bug #45239 (Encoding detector hangs with mbstring.strict_detection
|
||||
enabled). (Moriyoshi)
|
||||
- Fixed bug #45161 (Reusing a curl handle leaks memory). (Mark Karpeles, Jani)
|
||||
- Fixed bug #44336 (Improve pcre UTF-8 string matching performance). (frode
|
||||
at coretrek dot com, Nuno)
|
||||
- Fixed bug #43841 (mb_strrpos() offset is byte count for negative values).
|
||||
(Moriyoshi)
|
||||
- Fixed bug #37209 (mssql_execute with non fatal errors). (Kalle)
|
||||
- Fixed bug #35975 (Session cookie expires date format isn't the most
|
||||
compatible. Now matches that of setcookie()). (Scott)
|
||||
|
||||
|
||||
08 Dec 2008, PHP 5.2.8
|
||||
- Reverted bug fix #42718 that broke magic_quotes_gpc (Scott)
|
||||
|
||||
04 Dec 2008, PHP 5.2.7
|
||||
- Upgraded PCRE to version 7.8 (Fixes CVE-2008-2371). (Ilia)
|
||||
- Updated timezone database to version 2008.9. (Derick)
|
||||
- Upgraded bundled libzip to 0.9.0. (Pierre)
|
||||
|
||||
- Added logging option for error_log to send directly to SAPI. (Stas)
|
||||
- Added PHP_MAJOR_VERSION, PHP_MINOR_VERSION, PHP_RELEASE_VERSION,
|
||||
PHP_EXTRA_VERSION, PHP_VERSION_ID, PHP_ZTS and PHP_DEBUG constants. (Pierre)
|
||||
- Added "PHP_INI_SCAN_DIR" environment variable which can be used to
|
||||
either disable or change the compile time ini scan directory (FR #45114).
|
||||
(Jani)
|
||||
|
||||
- Reverted fix for bug #44197 due to behaviour change in minor version.
|
||||
(Felipe)
|
||||
|
||||
- Fixed missing initialization of BG(page_uid) and BG(page_gid),
|
||||
reported by Maksymilian Arciemowicz. (Stas)
|
||||
- Fixed memory leak inside sqlite_create_aggregate(). (Felipe)
|
||||
- Fixed memory leak inside PDO sqlite's sqliteCreateAggregate() method.
|
||||
(Felipe)
|
||||
- Fixed a crash inside gd with invalid fonts (Fixes CVE-2008-3658). (Pierre)
|
||||
- Fixed a possible overflow inside memnstr (Fixes CVE-2008-3659).
|
||||
(LaurentGaffie)
|
||||
- Fixed incorrect php_value order for Apache configuration, reported by
|
||||
Maksymilian Arciemowicz. (Stas)
|
||||
- Fixed memory leak inside readline_callback_handler_remove() function.
|
||||
(Felipe)
|
||||
- Fixed sybase_fetch_*() to continue reading after CS_ROW_FAIL status (Timm)
|
||||
- Fixed a bug inside dba_replace() that could cause file truncation
|
||||
withinvalid keys. (Ilia)
|
||||
- Fixed memory leak inside readline_callback_handler_install() function.(Ilia)
|
||||
- Fixed memory leak inside readline_completion_function() function. (Felipe)
|
||||
- Fixed stream_get_contents() when using $maxlength and socket is notclosed.
|
||||
indeyets [at] php [dot] net on #46049. (Arnaud)
|
||||
- Fixed stream_get_line() to behave as documented on non-blocking streams.
|
||||
(Arnaud)
|
||||
- Fixed endless loop in PDOStatement::debugDumpParams().
|
||||
(jonah.harris at gmail dot com)
|
||||
- Fixed ability to use "internal" heaps in extensions. (Arnaud, Dmitry)
|
||||
- Fixed weekdays adding/subtracting algorithm. (Derick)
|
||||
- Fixed some ambiguities in the date parser. (Derick)
|
||||
- Fixed a bug with the YYYY-MM format not resetting the day correctly.
|
||||
(Derick)
|
||||
- Fixed a bug in the DateTime->modify() methods, it would not use the advanced
|
||||
relative time strings. (Derick)
|
||||
- Fixed extraction of zip files or directories when the entry name is a
|
||||
relative path. (Pierre)
|
||||
- Fixed read or write errors for large zip archives. (Pierre)
|
||||
- Fixed security issues detailed in CVE-2008-2665 and CVE-2008-2666.
|
||||
(Christian Hoffmann)
|
||||
- Fixed simplexml asXML() not to lose encoding when dumping entire
|
||||
document to file. (Ilia)
|
||||
- Fixed a crash inside PDO when trying instantiate PDORow manually.
|
||||
(Felipe)
|
||||
- Fixed build failure of ext/mysqli with libmysql 6.0 - missing
|
||||
rplfunctions. (Andrey)
|
||||
- Fixed a regression when using strip_tags() and < is within an
|
||||
attribute.(Scott)
|
||||
- Fixed a crash on invalid method in ReflectionParameter constructor.
|
||||
(Christian Seiler)
|
||||
|
||||
- Fixed bug #46732 (mktime.year description is wrong). (Derick)
|
||||
- Fixed bug #46696 (cURL fails in upload files with specified content-type).
|
||||
(Ilia)
|
||||
- Fixed bug #46673 (stream_lock call with wrong parameter). (Arnaud)
|
||||
- Fixed bug #46649 (Setting array element with that same array produces
|
||||
inconsistent results). (Arnaud)
|
||||
- Fixed bug #46626 (mb_convert_case does not handle apostrophe correctly).
|
||||
(Ilia)
|
||||
- Fixed bug #46543 (ibase_trans() memory leaks when using wrong parameters).
|
||||
(Felipe)
|
||||
- Fixed bug #46521 (Curl ZTS OpenSSL, error in config.m4 fragment).
|
||||
(jd at cpanel dot net)
|
||||
- Fixed bug #46496 (wddx_serialize treats input as ISO-8859-1). (Mark Karpeles)
|
||||
- Fixed bug #46427 (SoapClient() stumbles over its "stream_context" parameter).
|
||||
(Dmitry, Herman Radtke)
|
||||
- Fixed bug #46426 (offset parameter of stream_get_contents() does not
|
||||
workfor "0"). (Felipe)
|
||||
- Fixed bug #46406 (Unregistering nodeclass throws E_FATAL). (Rob)
|
||||
- Fixed bug #46389 (NetWare needs small patch for _timezone).
|
||||
(patch by guenter@php.net)
|
||||
- Fixed bug #46388 (stream_notification_callback inside of object destroys
|
||||
object variables). (Felipe)
|
||||
- Fixed bug #46381 (wrong $this passed to internal methods causes segfault).
|
||||
(Tony)
|
||||
- Fixed bug #46379 (Infinite loop when parsing '#' in one line file). (Arnaud)
|
||||
- Fixed bug #46366 (bad cwd with / as pathinfo). (Dmitry)
|
||||
- Fixed bug #46360 (TCP_NODELAY constant for socket_{get,set}_option).
|
||||
(bugs at trick dot vanstaveren dot us)
|
||||
- Fixed bug #46343 (IPv6 address filter accepts invalid address). (Ilia)
|
||||
- Fixed bug #46335 (DOMText::splitText doesn't handle multibyte characters).
|
||||
(Rob)
|
||||
- Fixed bug #46323 (compilation of simplexml for NetWare breaks).
|
||||
(Patch by guenter [at] php [dot] net)
|
||||
- Fixed bug #46319 (PHP sets default Content-Type header for HTTP 304
|
||||
response code, in cgi sapi). (Ilia)
|
||||
- Fixed bug #46313 (Magic quotes broke $_FILES). (Arnaud)
|
||||
- Fixed bug #46308 (Invalid write when changing property from inside getter).
|
||||
(Dmitry)
|
||||
- Fixed bug #46292 (PDO::setFetchMode() shouldn't requires the 2nd arg when
|
||||
using FETCH_CLASSTYPE). (Felipe)
|
||||
- Fixed bug #46274, #46249 (pdo_pgsql always fill in NULL for empty BLOB and
|
||||
segfaults when returned by SELECT). (Felipe)
|
||||
- Fixed bug #46271 (local_cert option is not resolved to full path). (Ilia)
|
||||
- Fixed bug #46247 (ibase_set_event_handler() is allowing to pass callback
|
||||
without event). (Felipe)
|
||||
- Fixed bug #46246 (difference between call_user_func(array($this, $method))
|
||||
and $this->$method()). (Dmitry)
|
||||
- Fixed bug #46222 (ArrayObject EG(uninitialized_var_ptr) overwrite).
|
||||
(Etienne)
|
||||
- Fixed bug #46215 (json_encode mutates its parameter and has some
|
||||
class-specific state). (Felipe)
|
||||
- Fixed bug #46206 (pg_query_params/pg_execute convert passed values to
|
||||
strings). (Ilia)
|
||||
- Fixed bug #46191 (BC break: DOMDocument saveXML() doesn't accept null).
|
||||
(Rob)
|
||||
- Fixed bug #46164 (stream_filter_remove() closes the stream). (Arnaud)
|
||||
- Fixed bug #46157 (PDOStatement::fetchObject prototype error). (Felipe)
|
||||
- Fixed bug #46147 (after stream seek, appending stream filter reads
|
||||
incorrect data). (Greg)
|
||||
- Fixed bug #46139 (PDOStatement->setFetchMode() forgets FETCH_PROPS_LATE).
|
||||
(chsc at peytz dot dk, Felipe)
|
||||
- Fixed bug #46127 (php_openssl_tcp_sockop_accept forgets to set context
|
||||
on accepted stream) (Mark Karpeles, Pierre)
|
||||
- Fixed bug #46110 (XMLWriter - openmemory() and openuri() leak memory on
|
||||
multiple calls). (Ilia)
|
||||
- Fixed bug #46088 (RegexIterator::accept - segfault). (Felipe)
|
||||
- Fixed bug #46082 (stream_set_blocking() can cause a crash in some
|
||||
circumstances). (Felipe)
|
||||
- Fixed bug #46064 (Exception when creating ReflectionProperty object
|
||||
on dynamicly created property). (Felipe)
|
||||
- Fixed bug #46059 (Compile failure under IRIX 6.5.30 building posix.c).
|
||||
(Arnaud)
|
||||
- Fixed bug #46053 (SplFileObject::seek - Endless loop). (Arnaud)
|
||||
- Fixed bug #46051 (SplFileInfo::openFile - memory overlap). (Arnaud)
|
||||
- Fixed bug #46047 (SimpleXML converts empty nodes into object with
|
||||
nested array). (Rob)
|
||||
- Fixed bug #46031 (Segfault in AppendIterator::next). (Arnaud)
|
||||
- Fixed bug #46029 (Segfault in DOMText when using with Reflection). (Rob)
|
||||
- Fixed bug #46026 (bzip2.decompress/zlib.inflate filter tries to decompress
|
||||
after end of stream). (Keisial at gmail dot com, Greg)
|
||||
- Fixed bug #46024 (stream_select() doesn't return the correct number).
|
||||
(Arnaud)
|
||||
- Fixed bug #46010 (warnings incorrectly generated for iv in ecb mode).
|
||||
(Felipe)
|
||||
- Fixed bug #46003 (isset on nonexisting node return unexpected results). (Rob)
|
||||
- Fixed bug #45956 (parse_ini_file() does not return false with syntax errors
|
||||
in parsed file). (Jani)
|
||||
- Fixed bug #45901 (wddx_serialize_value crash with SimpleXMLElement object).
|
||||
(Rob)
|
||||
- Fixed bug #45862 (get_class_vars is inconsistent with 'protected' and
|
||||
'private' variables). (ilewis at uk dot ibm dot com, Felipe)
|
||||
- Fixed bug #45860 (header() function fails to correctly replace all Status
|
||||
lines). (Dmitry)
|
||||
- Fixed bug #45805 (Crash on throwing exception from error handler). (Dmitry)
|
||||
- Fixed bug #45765 (ReflectionObject with default parameters of self::xxx cause
|
||||
an error). (Felipe)
|
||||
- Fixed bug #45751 (Using auto_prepend_file crashes (out of scope stack address
|
||||
use)). (basant dot kukreja at sun dot com)
|
||||
- Fixed bug #45722 (mb_check_encoding() crashes). (Moriyoshi)
|
||||
- Fixed bug #45705 (rfc822_parse_adrlist() modifies passed address parameter).
|
||||
(Jani)
|
||||
- Fixed bug #45691 (Some per-dir or runtime settings may leak into other
|
||||
requests). (Moriyoshi)
|
||||
- Fixed bug #45581 (htmlspecialchars() double encoding &#x hex items). (Arnaud)
|
||||
- Fixed bug #45580 (levenshtein() crashes with invalid argument). (Ilia)
|
||||
- Fixed bug #45575 (Segfault with invalid non-string as event handler callback).
|
||||
(Christian Seiler)
|
||||
- Fixed bug #45568 (ISAPI doesn't properly clear auth_digest in header).
|
||||
(Patch by: navara at emclient dot com)
|
||||
- Fixed bug #45556 (Return value from callback isn't freed). (Felipe)
|
||||
- Fixed bug #45555 (Segfault with invalid non-string as
|
||||
register_introspection_callback). (Christian Seiler)
|
||||
- Fixed bug #45553 (Using XPath to return values for attributes with a
|
||||
namespace does not work). (Rob)
|
||||
- Fixed bug #45529 (new DateTimeZone() and date_create()->getTimezone() behave
|
||||
different). (Derick)
|
||||
- Fixed bug #45522 (FCGI_GET_VALUES request does not return supplied values).
|
||||
(Arnaud)
|
||||
- Fixed bug #45486 (mb_send_mail(); header 'Content-Type: text/plain; charset='
|
||||
parsing incorrect). (Felipe)
|
||||
- Fixed bug #45485 (strip_tags and <?XML tag). (Felipe)
|
||||
- Fixed bug #45460 (imap patch for fromlength fix in imap_headerinfo doesn't
|
||||
accept lengths of 1024). (Felipe, andrew at lifescale dot com)
|
||||
- Fixed bug #45449 (filesize() regression using ftp wrapper).
|
||||
(crrodriguez at suse dot de)
|
||||
- Fixed bug #45423 (fastcgi parent process doesn't invoke php_module_shutdown
|
||||
before shutdown) (basant dot kukreja at sun dot com)
|
||||
- Fixed bug #45406 (session.serialize_handler declared by shared extension fails).
|
||||
(Kalle, oleg dot grenrus at dynamoid dot com)
|
||||
- Fixed bug #45405 (snmp extension memory leak).
|
||||
(Federico Cuello, Rodrigo Campos)
|
||||
- Fixed bug #45382 (timeout bug in stream_socket_enable_crypto). (Ilia)
|
||||
- Fixed bug #45373 (php crash on query with errors in params). (Felipe)
|
||||
- Fixed bug #45352 (Segmentation fault because of tick function on second
|
||||
request). (Dmitry)
|
||||
- Fixed bug #45312 (Segmentation fault on second request for array functions).
|
||||
(Dmitry)
|
||||
- Fixed bug #45303 (Opening php:// wrapper in append mode results in a warning).
|
||||
(Arnaud)
|
||||
- Fixed bug #45251 (double free or corruption with setAttributeNode()). (Rob)
|
||||
- Fixed bug #45226 and #18916 (xmlrpc_set_type() segfaults and wrong behavior
|
||||
with valid ISO8601 date string). (Jeff Lawsons)
|
||||
- Fixed bug #45220 (curl_read callback returns -1 when needs to return
|
||||
size_t (unsigned)). (Felipe)
|
||||
- Fixed bug #45181 (chdir() should clear relative entries in stat cache).
|
||||
(Arnaud)
|
||||
- Fixed bug #45178 (memory corruption on assignment result of "new" by
|
||||
reference). (Dmitry)
|
||||
- Fixed bug #45166 (substr() overflow changes). (Felipe)
|
||||
- Fixed bug #45151 (Crash with URI/file..php (filename contains 2 dots)).
|
||||
(Fixes CVE-2008-3660) (Dmitry)
|
||||
- Fixed bug #45139 (ReflectionProperty returns incorrect declaring class).
|
||||
(Felipe)
|
||||
- Fixed bug #45124 ($_FILES['upload']['size'] sometimes return zero and some
|
||||
times the filesize). (Arnaud)
|
||||
- Fixed bug #45028 (CRC32 output endianness is different between crc32() and
|
||||
hash()). (Tony)
|
||||
- Fixed bug #45004 (pg_insert() does not accept 4 digit timezone format).
|
||||
(Ilia)
|
||||
- Fixed bug #44991 (Compile Failure With freetds0.82).
|
||||
(jklowden at freetds dot org, matthias at dsx dot at)
|
||||
- Fixed bug #44938 (gettext functions crash with overly long domain).
|
||||
(Christian Schneider, Ilia)
|
||||
- Fixed bug #44925 (preg_grep() modifies input array). (Nuno)
|
||||
- Fixed bug #44900 (OpenSSL extension fails to link with OpenSSL 0.9.6).
|
||||
(jd at cpanel dot net, Pierre)
|
||||
- Fixed bug #44891 Memory leak using registerPHPFunctions and XSLT Variable
|
||||
as function parameter. (Rob)
|
||||
- Fixed bug #44882 (SOAP extension object decoding bug). (Dmitry)
|
||||
- Fixed bug #44830 (Very minor issue with backslash in heredoc). (Matt)
|
||||
- Fixed bug #44818 (php://memory writeable when opened read only). (Arnaud)
|
||||
- Fixed bug #44811 (Improve error message when creating a new SoapClient
|
||||
that contains invalid data). (Markus Fischer, David C)
|
||||
- Fixed bug #44798 (Memory leak assigning value to attribute). (Ilia)
|
||||
- Fixed bug #44716 (Progress notifications incorrect). (Hannes)
|
||||
- Fixed bug #44712 (stream_context_set_params segfaults on invalid arguments).
|
||||
(Hannes)
|
||||
- Fixed bug #44617 (wrong HTML entity output when substitute_character=entity).
|
||||
(Moriyoshi)
|
||||
- Fixed bug #44607 (stream_get_line unable to correctly identify the "ending"
|
||||
in the stream content). (Arnaud)
|
||||
- Fixed bug #44425 (Extending PDO/MySQL class with a __call() function doesn't
|
||||
work). (Johannes)
|
||||
- Fixed bug #44327 (PDORow::queryString property & numeric offsets / Crash).
|
||||
(Felipe)
|
||||
- Fixed bug #44251, #41125 (PDO + quote() + prepare() can result in segfault).
|
||||
(tsteiner at nerdclub dot net)
|
||||
- Fixed bug #44246 (closedir() accepts a file resource opened by fopen()).
|
||||
(Dmitry, Tony)
|
||||
- Fixed bug #44182 (extract($a, EXTR_REFS) can fail to split copy-on-write
|
||||
references). (robin_fernandes at uk dot ibm dot com)
|
||||
- Fixed bug #44181 (extract($a, EXTR_OVERWRITE|EXTR_REFS) can fail to create
|
||||
references to $a). (robin_fernandes at uk dot ibm dot com)
|
||||
- Fixed bug #44127 (UNIX abstract namespace socket connect does not work).
|
||||
(Jani)
|
||||
- Fixed bug #43993 (mb_substr_count() behaves differently to substr_count()
|
||||
with overlapping needles). (Moriyoshi)
|
||||
- Fixed Bug #43958 (class name added into the error message). (Dmitry)
|
||||
- Fixed bug #43941 (json_encode silently cuts non-UTF8 strings). (Stas)
|
||||
- Fixed bug #43925 (Incorrect argument counter in prepared statements with
|
||||
pgsql). (Felipe)
|
||||
- Fixed bug #43731 (socket_getpeername: cannot use on stdin with inetd).
|
||||
(Arnaud)
|
||||
- Fixed bug #43723 (SOAP not sent properly from client for <choice>). (Dmitry)
|
||||
- Fixed bug #43668 (Added odbc.default_cursortype to control the ODBCcursor
|
||||
model). (Patrick)
|
||||
- Fixed bug #43666 (Fixed code to use ODBC 3.52 datatypes for 64bit
|
||||
systems). (Patrick)
|
||||
- Fixed bug #43540 (rfc1867 handler newlength problem). (Arnaud)
|
||||
- Fixed bug #43452 (strings containing a weekday, or a number plus weekday
|
||||
behaved incorrect of the current day-of-week was the same as the one in the
|
||||
phrase). (Derick)
|
||||
- Fixed bug #43353 (wrong detection of 'data' wrapper causes notice).
|
||||
(gk at gknw dot de, Arnaud)
|
||||
- Fixed bug #43053 (Regression: some numbers shown in scientific notation).
|
||||
(int-e at gmx dot de)
|
||||
- Fixed bug #43045 (SOAP encoding violation on "INF" for type double/float).
|
||||
(Dmitry)
|
||||
- Fixed bug #42862 (IMAP toolkit crash: rfc822.c legacy routine buffer
|
||||
overflow). (Fixes CVE-2008-2829) (Dmitry)
|
||||
- Fixed bug #42855 (dns_get_record() doesn't return all text from TXT record).
|
||||
(a dot u dot savchuk at gmail dot com)
|
||||
- Fixed bug #42737 (preg_split('//u') triggers a E_NOTICE with newlines).
|
||||
(Nuno)
|
||||
- Fixed bug #42718 (FILTER_UNSAFE_RAW not applied when configured as default
|
||||
filter). (Arnaud)
|
||||
- Fixed bug #42604 ("make test" fails with --with-config-file-scan-dir=path).
|
||||
(Jani)
|
||||
- Fixed bug #42473 (ob_start php://output and headers). (Arnaud)
|
||||
- Fixed bug #42318 (problem with nm on AIX, not finding object files).
|
||||
(Dmitry)
|
||||
- Fixed bug #42294 (Unified solution for round() based on C99 round). (Ilia)
|
||||
- Fixed bug #42078 (pg_meta_data mix tables metadata from different schemas).
|
||||
(Felipe)
|
||||
- Fixed bug #41348 (OCI8: allow compilation with Oracle 8.1). (Chris Jones)
|
||||
- Fixed bug #41033 (enable signing with DSA keys.
|
||||
(gordyf at google dot com, Pierre)
|
||||
- Fixed bug #37100 (data is returned truncated with BINARY CURSOR). (Tony)
|
||||
- Fixed bug #30312 (crash in sybase_unbuffered_query() function). (Timm)
|
||||
- Fixed bug #24679 (pg_* functions doesn't work using schema). (Felipe)
|
||||
- Fixed bug #14962 (PECL) (::extractTo 2nd argument is not really optional)
|
||||
(Mark van Der Velden)
|
||||
- Fixed bug #14032 (Mail() always returns false but mail is sent). (Mikko)
|
||||
|
||||
|
||||
01 May 2008, PHP 5.2.6
|
||||
- Upgraded PCRE to version 7.6 (Nuno)
|
||||
|
||||
- Fixed two possible crashes inside posix extension (Tony)
|
||||
- Fixed incorrect heredoc handling when label is used within the block.
|
||||
(Matt)
|
||||
@@ -835,6 +20,7 @@ PHP NEWS
|
||||
- Fixed segfault in filter extension when using callbacks. (Arnar Mar Sig,
|
||||
Felipe)
|
||||
- Fixed faulty fix for bug #40189 (endless loop in zlib.inflate stream filter). (Greg)
|
||||
- Upgraded PCRE to version 7.6 (Nuno)
|
||||
|
||||
- Fixed bug #44742 (timezone_offset_get() causes segmentation faults). (Derick)
|
||||
- Fixed bug #44720 (Prevent crash within session_register()). (Scott)
|
||||
|
||||
@@ -1,31 +1,24 @@
|
||||
====================
|
||||
SVN Commit Rules
|
||||
====================
|
||||
|
||||
This is the first file you should be reading after you get your SVN account.
|
||||
We'll assume you're basically familiar with SVN, but feel free to post
|
||||
your questions on the mailing list. Please have a look at
|
||||
http://svnbook.red-bean.com/ for more detailed information on SVN.
|
||||
This is the first file you should be reading after you get your CVS account.
|
||||
We'll assume you're basically familiar with CVS, but feel free to post
|
||||
your questions on the mailing list. Please have a look at
|
||||
http://cvsbook.red-bean.com/ for more detailed information on CVS.
|
||||
|
||||
PHP is developed through the efforts of a large number of people.
|
||||
Collaboration is a Good Thing(tm), and SVN lets us do this. Thus, following
|
||||
some basic rules with regards to SVN usage will::
|
||||
Collaboration is a Good Thing(tm), and CVS lets us do this. Thus, following
|
||||
some basic rules with regards to CVS usage will:
|
||||
|
||||
a. Make everybody happier, especially those responsible for maintaining
|
||||
the SVN itself.
|
||||
|
||||
the CVS itself.
|
||||
b. Keep the changes consistently well documented and easily trackable.
|
||||
|
||||
c. Prevent some of those 'Oops' moments.
|
||||
|
||||
d. Increase the general level of good will on planet Earth.
|
||||
|
||||
Having said that, here are the organizational rules::
|
||||
|
||||
Having said that, here are the organizational rules:
|
||||
|
||||
1. Respect other people working on the project.
|
||||
|
||||
2. Discuss any significant changes on the list before committing and get
|
||||
confirmation from the release manager for the given branch.
|
||||
2. Discuss any significant changes on the list before committing.
|
||||
|
||||
3. Look at EXTENSIONS file to see who is the primary maintainer of
|
||||
the code you want to contribute to.
|
||||
@@ -37,54 +30,45 @@ Having said that, here are the organizational rules::
|
||||
|
||||
6. Test your changes before committing them. We mean it. Really.
|
||||
To do so use "make test".
|
||||
|
||||
|
||||
7. For development use the --enable-maintainer-zts switch to ensure your
|
||||
code handles TSRM correctly and doesn't break for thos who need that.
|
||||
|
||||
Currently we have the following branches in use::
|
||||
Currently we have the following branches in use:
|
||||
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_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.
|
||||
|
||||
trunk Will become PHP 6.0. This CVS branch is for active development.
|
||||
The next few rules are more of a technical nature.
|
||||
|
||||
branches/PHP_5_3 Is used to release the PHP 5.3.x series. It still allows for
|
||||
larger enhancements.
|
||||
|
||||
branches/PHP_5_2 Is used to release the PHP 5.2.x series. Only bugfixes are permitted
|
||||
on this branch (Consult the releasemaster prior to commit).
|
||||
|
||||
branches/PHP_5_1 This branch is closed.
|
||||
|
||||
branches/PHP_4_4 This branch is closed.
|
||||
|
||||
The next few rules are more of a technical nature::
|
||||
|
||||
1. All changes should first go to trunk and then get merged from trunk
|
||||
(aka MFH'ed) to all other relevant branches.
|
||||
|
||||
2. DO NOT TOUCH ChangeLog! It is automagically updated from the commit
|
||||
1. DO NOT TOUCH ChangeLog! It is automagically updated from the commit
|
||||
messages every day. Woe be to those who attempt to mess with it.
|
||||
|
||||
3. All news updates intended for public viewing, such as new features,
|
||||
bug fixes, improvements, etc., should go into the NEWS file of the
|
||||
*first* to be released version with the given change. In other words
|
||||
any NEWS file change only needs to done in one branch.
|
||||
|
||||
2. All news updates intended for public viewing, such as new features,
|
||||
bug fixes, improvements, etc., should go into the NEWS file.
|
||||
|
||||
NB! Lines, starting with @ will go automagically into NEWS file, but
|
||||
this is NOT recommended, though. Please, add news entries directly to
|
||||
this is NOT recommended, though. Please, add news entries directly to
|
||||
NEWS file and don't forget to keep them adjusted and sorted.
|
||||
|
||||
4. Do not commit multiple file and dump all messages in one commit. If you
|
||||
3. Do not commit multiple file and dump all messages in one commit. If you
|
||||
modified several unrelated files, commit each group separately and
|
||||
provide a nice commit message for each one. See example below.
|
||||
|
||||
5. Do write your commit message in such a way that it makes sense even
|
||||
4. Do write your commit message in such a way that it makes sense even
|
||||
without the corresponding diff. One should be able to look at it, and
|
||||
immediately know what was modified. Definitely include the function name
|
||||
in the message as shown below.
|
||||
|
||||
6. In your commit messages, keep each line shorter than 80 characters. And
|
||||
5. In your commit messages, keep each line shorter than 80 characters. And
|
||||
try to align your lines vertically, if they wrap. It looks bad otherwise.
|
||||
|
||||
7. If you modified a function that is callable from PHP, prepend PHP to
|
||||
6. If you modified a function that is callable from PHP, prepend PHP to
|
||||
the function name as shown below.
|
||||
|
||||
|
||||
@@ -96,7 +80,7 @@ If a line begins with #, it is taken to be a comment and will not appear
|
||||
in the ChangeLog. Everything else goes into the ChangeLog.
|
||||
|
||||
It is important to note that if your comment or news logline spans multiple
|
||||
lines, you have to put # at the beginning of **every** such line.
|
||||
lines, you have to put # at the beginning of _every_ such line.
|
||||
|
||||
Example. Say you modified two files, datetime.c and string.c. In datetime.c you
|
||||
added a new format option for the date() function, and in string.c you fixed a
|
||||
@@ -104,15 +88,13 @@ memory leak in php_trim(). Don't commit both of these at once. Commit them
|
||||
separately and try to make sure your commit messages look something like the
|
||||
following.
|
||||
|
||||
For datetime.c::
|
||||
For datetime.c:
|
||||
- Added new 'K' format modifier to date() for printing out number of days until
|
||||
New Year's Eve.
|
||||
|
||||
- Added new 'K' format modifier to date() for printing out number of days
|
||||
until New Year's Eve.
|
||||
|
||||
For string.c::
|
||||
|
||||
- Fixed a memory leak in php_trim() resulting from improper use of zval_dtor().
|
||||
#- Man, that thing was leaking all over the place!
|
||||
For string.c:
|
||||
- Fixed a memory leak in php_trim() resulting from improper use of zval_dtor().
|
||||
#- Man, that thing was leaking all over the place!
|
||||
|
||||
The # lines will be omitted from the ChangeLog automagically.
|
||||
|
||||
@@ -124,19 +106,16 @@ 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.
|
||||
|
||||
Example::
|
||||
Example:
|
||||
|
||||
Fixed bug #14016 (pgsql notice handler double free crash bug.)
|
||||
Fixed bug #14016 (pgsql notice handler double free crash bug.)
|
||||
|
||||
If you don't see your messages in ChangeLog right away, don't worry!
|
||||
These files are updated once a day, so your stuff will not show up until
|
||||
somewhat later.
|
||||
|
||||
When you change the NEWS file for a bug fix, then please keep the bugs
|
||||
sorted in decreasing order under the fixed version.
|
||||
somewhat later.
|
||||
|
||||
You can use LXR (http://lxr.php.net/) and Bonsai (http://bonsai.php.net/)
|
||||
to look at PHP SVN repository in various ways.
|
||||
to look at PHP CVS repository in various ways.
|
||||
|
||||
To receive daily updates to ChangeLog and NEWS, send an empty message to
|
||||
php-cvs-daily-subscribe@lists.php.net.
|
||||
+30
-10
@@ -8,11 +8,11 @@ part is making it acceptable for inclusion into our repository. :-)
|
||||
|
||||
How to create patch?
|
||||
--------------------
|
||||
We use Subversion (SVN) for revision control. You need to get the
|
||||
source from SVN in order to create a patch. Read
|
||||
http://www.php.net/svn.php for help on using SVN. You can check out
|
||||
older branches, but make sure you get trunk as well and make your
|
||||
patch work there.
|
||||
We are working with CVS. You need to get CVS source to create a patch
|
||||
that we accept. Visit http://www.php.net/anoncvs.php to get CVS
|
||||
source. You can check out older versions, but make sure you get
|
||||
the default branch (i.e. Do not use -r option when you check out the
|
||||
CVS source)
|
||||
|
||||
Read CODING_STANDARDS file before you start working.
|
||||
|
||||
@@ -21,7 +21,7 @@ add a new feature to PHP. After you finished editing, please test your
|
||||
patch. Read README.TESTING for testing.
|
||||
|
||||
After you finish testing your patch, take diff file using
|
||||
"svn diff > your.patch" command.
|
||||
"cvs diff > your.patch" command.
|
||||
|
||||
Read README.TESTING for submitting a test script for your patch. This is
|
||||
not strictly required, but it is preferred to submit a test script along
|
||||
@@ -41,8 +41,25 @@ maintainer and/or internals@lists.php.net, or pear-dev@lists.php.net if
|
||||
you are patching PEAR. Official module maintainers can be found in
|
||||
EXTENSIONS file in PHP source.
|
||||
|
||||
If you are new to SVN (Subversion), visit
|
||||
http://svnbook.red-bean.com/ for details.
|
||||
If you are new to CVS (Concurrent Versions System), visit
|
||||
http://cvshome.org/ for details.
|
||||
|
||||
|
||||
Recommended CVS client settings for creating patch file
|
||||
------------------------------------------------------
|
||||
Recommended ~/.cvsrc file setting is:
|
||||
------
|
||||
cvs -z3
|
||||
update -d -P
|
||||
checkout -P
|
||||
diff -u
|
||||
|
||||
------
|
||||
diff -u means:
|
||||
-u Use the unified output format.
|
||||
|
||||
With this CVS setting, you don't have to worry about adding/deleting
|
||||
newlines and spaces.
|
||||
|
||||
|
||||
Check list for submitting patch
|
||||
@@ -53,7 +70,10 @@ Check list for submitting patch
|
||||
web server error logs when you test your patch?
|
||||
- Did you build PHP for multi-threaded web servers. (Optional)
|
||||
- Did you create test script for "make test"? (Recommended)
|
||||
- Did you update SVN source before you take final patch?
|
||||
- Did you check your patch is unified format and it does not
|
||||
contain white space changes? (If you are not using recommended
|
||||
cvs setting)
|
||||
- Did you update CVS source before you take final patch?
|
||||
- Did you read the patch again?
|
||||
|
||||
|
||||
@@ -98,7 +118,7 @@ these questions:
|
||||
|
||||
What happens when your patch is applied?
|
||||
----------------------------------------
|
||||
Your name will be included together with your email address in the SVN
|
||||
Your name will be included together with your email address in the CVS
|
||||
commit log. If your patch affects end-users, a brief description
|
||||
and your name might be added to the NEWS file.
|
||||
|
||||
|
||||
+4
-5
@@ -32,12 +32,11 @@ sapi/cli/php [-c /path/to/php.ini] run-tests.php [ext/foo/tests/GLOB]
|
||||
|
||||
[Which "php" executable "make test" look for]
|
||||
---------------------------------------------
|
||||
If you are running the run-tests.php script from the command line (as above)
|
||||
you must set the TEST_PHP_EXECUTABLE environment variable to explicitly
|
||||
select the PHP executable that is to be tested, that is, used to run the test scripts.
|
||||
You must use TEST_PHP_EXECUTABLE environment variable to explicitly
|
||||
select the php executable to be used to run the tests. That can either
|
||||
be the CLI or CGI executable.
|
||||
|
||||
If you run the tests using make test, the PHP CLI and CGI executables are
|
||||
automatically set for you. "make test" executes "run-tests.php" script with the CLI binary. Some
|
||||
"make test" executes "run-tests.php" script with "php" binary. Some
|
||||
test scripts such as session must be executed by CGI SAPI. Therefore,
|
||||
you must build PHP with CGI SAPI to perform all tests.
|
||||
|
||||
|
||||
+14
-14
@@ -1,11 +1,11 @@
|
||||
[IMPORTANT NOTICE]
|
||||
------------------
|
||||
This is an addendum to README.TESTING with additional information
|
||||
specific to server-tests.php.
|
||||
specific to run-tests2.php.
|
||||
|
||||
server-tests.php is backward compatible with tests developed for
|
||||
the original run-tests.php script. server-tests is *not* used by
|
||||
'make test'. server-tests was developed to provide support for
|
||||
run-tests2.php is backward compatible with tests developed for
|
||||
the original run-tests.php script. run-tests2 is *not* used by
|
||||
'make test'. run-tests2 was developed to provide support for
|
||||
testing PHP under it's primary environment, HTTP, and can run the
|
||||
PHP tests under any of the SAPI modules that are direct executables,
|
||||
or are accessable via HTTP.
|
||||
@@ -13,12 +13,12 @@ or are accessable via HTTP.
|
||||
[New features]
|
||||
----------------
|
||||
* Command line interface:
|
||||
You can run 'php server-tests.php -h' to get all the possible options.
|
||||
You can run 'php run-tests2.php -h' to get all the possible options.
|
||||
* Configuration file:
|
||||
the -c argument will allow you to use a configuration file. This is
|
||||
handy if you are testing multiple environments and need various options
|
||||
depending on the environment.
|
||||
see server-tests-config.php for details.
|
||||
see run-tests-config.php for details.
|
||||
* CGI Emulation:
|
||||
Will emulate a CGI environment when testing with the cgi sapi executable.
|
||||
* HTTP testing:
|
||||
@@ -39,23 +39,23 @@ make testing work.
|
||||
Some (but not all!) examples of usage:
|
||||
|
||||
1. run tests from the php source directory
|
||||
php server-tests.php -p /path/to/php-cli
|
||||
php run-tests2.php -p /path/to/php-cli
|
||||
|
||||
2. run tests using cgi emulation
|
||||
php server-tests.php -p /path/to/php-cgi
|
||||
php run-tests2.php -p /path/to/php-cgi
|
||||
|
||||
3. run tests over http, copying test files into document root
|
||||
php server-tests.php -w -u http://localhost/test -m /path/to/htdocs/test
|
||||
php run-tests2.php -w -u http://localhost/test -m /path/to/htdocs/test
|
||||
|
||||
4. run tests over http, php sources have been aliased in web server
|
||||
php server-tests.php -w -u http://localhost/test
|
||||
php run-tests2.php -w -u http://localhost/test
|
||||
|
||||
5. run tests using configuration file
|
||||
php server-tests.php -c /path/to/server-tests-config.php
|
||||
php run-tests2.php -c /path/to/run-tests-config.php
|
||||
|
||||
6. run tests using configuration file, but overriding some settings:
|
||||
(config file must be first)
|
||||
php server-tests.php -c /path/to/server-tests-config.php -w -t 3 -d /path/to/testdir
|
||||
php run-tests2.php -c /path/to/run-tests-config.php -w -t 3 -d /path/to/testdir
|
||||
|
||||
NOTE: configuration as described in README.TESTING still works.
|
||||
|
||||
@@ -63,7 +63,7 @@ NOTE: configuration as described in README.TESTING still works.
|
||||
----------------
|
||||
In addition to the traditional test sections
|
||||
(see http://qa.php.net/write-test.php), several new sections are available
|
||||
under server-tests.
|
||||
under run-tests2.
|
||||
|
||||
--POST--
|
||||
This is not a new section, but not multipart posts are supported for testing
|
||||
@@ -97,7 +97,7 @@ include:
|
||||
$scriptname this is what will become SCRIPT_NAME unless you override it
|
||||
$docroot the equivelant of DOCUMENT_ROOT under Apache
|
||||
$cwd the directory that the test is being initiated from
|
||||
$this->conf all server-tests configuration vars
|
||||
$this->conf all run-tests2 configuration vars
|
||||
$this->env all environment variables that will get passed to the test
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Thread Safe Resource Manager |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1999-2009, Andi Gutmans, Sascha Schumann, Zeev Suraski |
|
||||
| Copyright (c) 1999-2008, 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 |
|
||||
+----------------------------------------------------------------------+
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Thread Safe Resource Manager |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1999-2009, Andi Gutmans, Sascha Schumann, Zeev Suraski |
|
||||
| Copyright (c) 1999-2008, 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 |
|
||||
+----------------------------------------------------------------------+
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 5 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2009 The PHP Group |
|
||||
| Copyright (c) 1997-2008 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
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 5 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2009 The PHP Group |
|
||||
| Copyright (c) 1997-2008 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 |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 5 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2009 The PHP Group |
|
||||
| Copyright (c) 1997-2008 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 |
|
||||
@@ -491,7 +491,6 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
|
||||
int use_relative_path = 0;
|
||||
#ifdef TSRM_WIN32
|
||||
int is_unc;
|
||||
int exists;
|
||||
#endif
|
||||
TSRMLS_FETCH();
|
||||
|
||||
@@ -590,7 +589,6 @@ no_realpath:
|
||||
CWD_STATE_COPY(&old_state, state);
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
exists = (use_realpath != CWD_EXPAND);
|
||||
ret = 0;
|
||||
is_unc = 0;
|
||||
if (path_length >= 2 && path[1] == ':') {
|
||||
@@ -698,16 +696,13 @@ no_realpath:
|
||||
ptr_length = length;
|
||||
FindClose(hFind);
|
||||
ret = 0;
|
||||
} else {
|
||||
} else if (use_realpath == CWD_REALPATH) {
|
||||
if (is_unc) {
|
||||
/* skip share name */
|
||||
is_unc--;
|
||||
ret = 0;
|
||||
} else {
|
||||
exists = 0;
|
||||
if (use_realpath == CWD_REALPATH) {
|
||||
ret = 1;
|
||||
}
|
||||
ret = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -747,7 +742,7 @@ no_realpath:
|
||||
|
||||
/* Store existent file in realpath cache. */
|
||||
#ifdef TSRM_WIN32
|
||||
if (use_cache && !is_unc && exists) {
|
||||
if (use_cache && !is_unc) {
|
||||
#else
|
||||
if (use_cache && (use_realpath == CWD_REALPATH)) {
|
||||
#endif
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 5 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2009 The PHP Group |
|
||||
| Copyright (c) 1997-2008 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 |
|
||||
|
||||
+15
-35
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 5 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2009 The PHP Group |
|
||||
| Copyright (c) 1997-2008 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 |
|
||||
@@ -88,7 +88,7 @@ TSRM_API int tsrm_win32_access(const char *pathname, int mode)
|
||||
{
|
||||
if (mode == 1 /*X_OK*/) {
|
||||
#if 1
|
||||
/* This code is not supported by Windows 98,
|
||||
/* This code is not supported by Windows 98,
|
||||
* but we don't support it anymore */
|
||||
DWORD type;
|
||||
|
||||
@@ -96,7 +96,7 @@ TSRM_API int tsrm_win32_access(const char *pathname, int mode)
|
||||
#else
|
||||
SHFILEINFO sfi;
|
||||
|
||||
return access(pathname, 0) == 0 &&
|
||||
return access(pathname, 0) == 0 &&
|
||||
SHGetFileInfo(pathname, 0, &sfi, sizeof(SHFILEINFO), SHGFI_EXETYPE) != 0 ? 0 : -1;
|
||||
#endif
|
||||
} else {
|
||||
@@ -109,22 +109,22 @@ static process_pair *process_get(FILE *stream TSRMLS_DC)
|
||||
{
|
||||
process_pair *ptr;
|
||||
process_pair *newptr;
|
||||
|
||||
|
||||
for (ptr = TWG(process); ptr < (TWG(process) + TWG(process_size)); ptr++) {
|
||||
if (ptr->stream == stream) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (ptr < (TWG(process) + TWG(process_size))) {
|
||||
return ptr;
|
||||
}
|
||||
|
||||
|
||||
newptr = (process_pair*)realloc((void*)TWG(process), (TWG(process_size)+1)*sizeof(process_pair));
|
||||
if (newptr == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
TWG(process) = newptr;
|
||||
ptr = newptr + TWG(process_size);
|
||||
TWG(process_size)++;
|
||||
@@ -136,7 +136,7 @@ static shm_pair *shm_get(int key, void *addr)
|
||||
shm_pair *ptr;
|
||||
shm_pair *newptr;
|
||||
TSRMLS_FETCH();
|
||||
|
||||
|
||||
for (ptr = TWG(shm); ptr < (TWG(shm) + TWG(shm_size)); ptr++) {
|
||||
if (!ptr->descriptor) {
|
||||
continue;
|
||||
@@ -151,12 +151,12 @@ static shm_pair *shm_get(int key, void *addr)
|
||||
if (ptr < (TWG(shm) + TWG(shm_size))) {
|
||||
return ptr;
|
||||
}
|
||||
|
||||
|
||||
newptr = (shm_pair*)realloc((void*)TWG(shm), (TWG(shm_size)+1)*sizeof(shm_pair));
|
||||
if (newptr == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
TWG(shm) = newptr;
|
||||
ptr = newptr + TWG(shm_size);
|
||||
TWG(shm_size)++;
|
||||
@@ -179,42 +179,23 @@ TSRM_API FILE *popen(const char *command, const char *type)
|
||||
TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, char *env)
|
||||
{
|
||||
FILE *stream = NULL;
|
||||
int fno, type_len = strlen(type), read, mode;
|
||||
int fno, str_len = strlen(type), read, mode;
|
||||
STARTUPINFO startup;
|
||||
PROCESS_INFORMATION process;
|
||||
SECURITY_ATTRIBUTES security;
|
||||
HANDLE in, out;
|
||||
process_pair *proc;
|
||||
char *cmd;
|
||||
int i;
|
||||
char *ptype = (char *)type;
|
||||
process_pair *proc;
|
||||
TSRMLS_FETCH();
|
||||
|
||||
if (!type) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*The following two checks can be removed once we drop XP support */
|
||||
type_len = strlen(type);
|
||||
if (type_len <1 || type_len > 2) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
for (i=0; i < type_len; i++) {
|
||||
if (!(*ptype == 'r' || *ptype == 'w' || *ptype == 'b' || *ptype == 't')) {
|
||||
return NULL;
|
||||
}
|
||||
ptype++;
|
||||
}
|
||||
|
||||
security.nLength = sizeof(SECURITY_ATTRIBUTES);
|
||||
security.bInheritHandle = TRUE;
|
||||
security.lpSecurityDescriptor = NULL;
|
||||
|
||||
if (!type_len || !CreatePipe(&in, &out, &security, 2048L)) {
|
||||
if (!str_len || !CreatePipe(&in, &out, &security, 2048L)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
memset(&startup, 0, sizeof(STARTUPINFO));
|
||||
memset(&process, 0, sizeof(PROCESS_INFORMATION));
|
||||
|
||||
@@ -223,7 +204,7 @@ TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd,
|
||||
startup.hStdError = GetStdHandle(STD_ERROR_HANDLE);
|
||||
|
||||
read = (type[0] == 'r') ? TRUE : FALSE;
|
||||
mode = ((type_len == 2) && (type[1] == 'b')) ? O_BINARY : O_TEXT;
|
||||
mode = ((str_len == 2) && (type[1] == 'b')) ? O_BINARY : O_TEXT;
|
||||
|
||||
|
||||
if (read) {
|
||||
@@ -239,7 +220,6 @@ 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)) {
|
||||
free(cmd);
|
||||
return NULL;
|
||||
}
|
||||
free(cmd);
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 5 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2009 The PHP Group |
|
||||
| Copyright (c) 1997-2008 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 |
|
||||
|
||||
@@ -381,12 +381,12 @@ ext/pfpro not actively maintained
|
||||
ext/w32api pecl/ffi
|
||||
ext/yp not actively maintained
|
||||
sapi/activescript http://pecl4win.php.net/ext.php/php5activescript.dll (PECL package)
|
||||
or pecl/activescript (SVN)
|
||||
or pecl/activescript (CVS)
|
||||
|
||||
Modules in PECL that are not actively maintained (i.e. have not been supported
|
||||
for some time, have no active maintainer working on them currently, and do not
|
||||
have any PECL package releases), are still available in SVN at
|
||||
http://svn.php.net/pecl/. However, unreleased PHP modules are by their nature
|
||||
have any PECL package releases), are still available in CVS at
|
||||
http://cvs.php.net/pecl/. However, unreleased PHP modules are by their nature
|
||||
unsupported, and your mileage may vary when attempting to install or use them.
|
||||
|
||||
9b. Class constants in new PHP 5.1 extensions
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2009 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 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
-1
@@ -4,7 +4,7 @@ dnl This file contains local autoconf functions.
|
||||
|
||||
AC_DEFUN([LIBZEND_BISON_CHECK],[
|
||||
# we only support certain bison versions
|
||||
bison_version_list="1.28 1.35 1.75 1.875 2.0 2.1 2.2 2.3 2.4 2.4.1"
|
||||
bison_version_list="1.28 1.35 1.75 1.875 2.0 2.1 2.2 2.3"
|
||||
|
||||
# for standalone build of Zend Engine
|
||||
test -z "$SED" && SED=sed
|
||||
|
||||
+6
-6
@@ -23,18 +23,18 @@ var_dump(constant("test const"));
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: define() expects at least 2 parameters, 0 given in %s on line %d
|
||||
Warning: Wrong parameter count for define() in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: define() expects at least 2 parameters, 1 given in %s on line %d
|
||||
Warning: Wrong parameter count for define() in %s on line %d
|
||||
NULL
|
||||
bool(true)
|
||||
|
||||
Warning: define() expects parameter 3 to be boolean, array given in %s on line %d
|
||||
NULL
|
||||
Notice: Constant true already defined in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: define() expects parameter 1 to be string, array given in %s on line %d
|
||||
NULL
|
||||
Notice: Array to string conversion in %s on line %d
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ int(%d)
|
||||
Warning: get_loaded_extensions() expects at most 1 parameter, 2 given in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: get_defined_constants() expects at most 1 parameter, 2 given in %s on line %d
|
||||
Warning: Wrong parameter count for get_defined_constants() in %s on line %d
|
||||
NULL
|
||||
string(5) "array"
|
||||
string(5) "array"
|
||||
|
||||
+11
-12
@@ -359,8 +359,7 @@ var_dump($global_var);
|
||||
|
||||
//Note: No error conditions relating to passing arugments can be tested
|
||||
// because these are not functions but statements, it will result in syntax error.
|
||||
?>
|
||||
===DONE===
|
||||
echo "Done\n";
|
||||
--EXPECTF--
|
||||
*** Testing unset(), empty() & isset() with scalar variables ***
|
||||
-- Iteration 1 --
|
||||
@@ -1186,11 +1185,11 @@ bool(true)
|
||||
|
||||
*** Testing unset(), emtpy() & isset() with resource variables ***
|
||||
-- Iteration 1 --
|
||||
resource(%d) of type (stream)
|
||||
resource(5) of type (stream)
|
||||
bool(true)
|
||||
bool(false)
|
||||
bool(true)
|
||||
resource(%d) of type (stream)
|
||||
resource(5) of type (stream)
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(false)
|
||||
@@ -1199,11 +1198,11 @@ bool(false)
|
||||
Notice: Undefined variable: resource in %s on line %d
|
||||
NULL
|
||||
-- Iteration 2 --
|
||||
resource(%d) of type (stream)
|
||||
resource(6) of type (stream)
|
||||
bool(true)
|
||||
bool(false)
|
||||
bool(true)
|
||||
resource(%d) of type (stream)
|
||||
resource(6) of type (stream)
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(false)
|
||||
@@ -1218,7 +1217,7 @@ bool(false)
|
||||
bool(true)
|
||||
|
||||
*** Testing unset(), empty() & isset() with objects ***
|
||||
object(Point)#%d (3) {
|
||||
object(Point)#1 (3) {
|
||||
["x"]=>
|
||||
int(30)
|
||||
["y"]=>
|
||||
@@ -1240,7 +1239,7 @@ bool(false)
|
||||
|
||||
Notice: Undefined variable: lable in %s on line %d
|
||||
bool(true)
|
||||
object(Point)#%d (3) {
|
||||
object(Point)#1 (3) {
|
||||
["x"]=>
|
||||
int(30)
|
||||
["y"]=>
|
||||
@@ -1248,7 +1247,7 @@ object(Point)#%d (3) {
|
||||
["lable"]=>
|
||||
string(6) "Point1"
|
||||
}
|
||||
object(Point)#%d (2) {
|
||||
object(Point)#1 (2) {
|
||||
["y"]=>
|
||||
int(40)
|
||||
["lable"]=>
|
||||
@@ -1256,7 +1255,7 @@ object(Point)#%d (2) {
|
||||
}
|
||||
bool(false)
|
||||
bool(true)
|
||||
object(Point)#%d (0) {
|
||||
object(Point)#1 (0) {
|
||||
}
|
||||
bool(true)
|
||||
bool(false)
|
||||
@@ -1277,7 +1276,7 @@ array(3) {
|
||||
[2]=>
|
||||
string(9) "testPoint"
|
||||
}
|
||||
object(Point)#%d (3) {
|
||||
object(Point)#1 (3) {
|
||||
["x"]=>
|
||||
int(5)
|
||||
["y"]=>
|
||||
@@ -1330,4 +1329,4 @@ bool(false)
|
||||
bool(false)
|
||||
bool(true)
|
||||
int(10)
|
||||
===DONE===
|
||||
Done
|
||||
@@ -1,39 +0,0 @@
|
||||
--TEST--
|
||||
__call() for private/protected methods
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A {
|
||||
private $var1 = 'var1 value';
|
||||
protected $var2 = 'var2 value';
|
||||
|
||||
private function func1()
|
||||
{
|
||||
return "in func1";
|
||||
}
|
||||
protected function func2()
|
||||
{
|
||||
return "in func2";
|
||||
}
|
||||
public function __get($var)
|
||||
{
|
||||
return $this->$var;
|
||||
}
|
||||
public function __call($func, array $args = array())
|
||||
{
|
||||
return call_user_func_array(array($this, $func), $args);
|
||||
}
|
||||
}
|
||||
|
||||
$a = new A();
|
||||
echo $a->var1,"\n";
|
||||
echo $a->var2,"\n";
|
||||
echo $a->func1(),"\n";
|
||||
echo $a->func2(),"\n";
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
var1 value
|
||||
var2 value
|
||||
in func1
|
||||
in func2
|
||||
@@ -1,21 +0,0 @@
|
||||
--TEST--
|
||||
Trigger __call() in lieu of non visible methods when called via a callback.
|
||||
--FILE--
|
||||
<?php
|
||||
class C {
|
||||
protected function prot() { }
|
||||
private function priv() { }
|
||||
public function __call($name, $args) {
|
||||
echo "In __call() for method $name()\n";
|
||||
}
|
||||
}
|
||||
|
||||
$c = new C;
|
||||
call_user_func(array($c, 'none'));
|
||||
call_user_func(array($c, 'prot'));
|
||||
call_user_func(array($c, 'priv'));
|
||||
?>
|
||||
--EXPECTF--
|
||||
In __call() for method none()
|
||||
In __call() for method prot()
|
||||
In __call() for method priv()
|
||||
@@ -41,14 +41,12 @@ $db = new hariCow;
|
||||
|
||||
var_dump($db);
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
Notice: Undefined variable: db in %sbug30162.php on line 35
|
||||
NULL
|
||||
object(hariCow)#%d (2) {
|
||||
object(hariCow)#1 (2) {
|
||||
["x"]=>
|
||||
string(1) "x"
|
||||
["y"]=>
|
||||
string(1) "y"
|
||||
}
|
||||
===DONE===
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Bug #38469 (Unexpected creation of cycle)
|
||||
Bug #38469 Unexpected creation of cycle
|
||||
--FILE--
|
||||
<?php
|
||||
$a = array();
|
||||
@@ -8,16 +8,6 @@ var_dump($a);
|
||||
$b = array(array());
|
||||
$b[0][0] = $b;
|
||||
var_dump($b);
|
||||
|
||||
function f() {
|
||||
$a = array();
|
||||
$a[0] = $a;
|
||||
var_dump($a);
|
||||
$b = array(array());
|
||||
$b[0][0] = $b;
|
||||
var_dump($b);
|
||||
}
|
||||
f();
|
||||
?>
|
||||
--EXPECT--
|
||||
array(1) {
|
||||
@@ -36,19 +26,3 @@ array(1) {
|
||||
}
|
||||
}
|
||||
}
|
||||
array(1) {
|
||||
[0]=>
|
||||
array(0) {
|
||||
}
|
||||
}
|
||||
array(1) {
|
||||
[0]=>
|
||||
array(1) {
|
||||
[0]=>
|
||||
array(1) {
|
||||
[0]=>
|
||||
array(0) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,82 +0,0 @@
|
||||
--TEST--
|
||||
Bug #39018 (Error control operator '@' fails to suppress "Uninitialized string offset")
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
error_reporting(E_ALL);
|
||||
|
||||
$a = 'foo';
|
||||
$a[11111111111];
|
||||
|
||||
$a = '';
|
||||
|
||||
$a[0];
|
||||
|
||||
print $a[0]; // 12
|
||||
|
||||
$a[-11111111111111111111111];
|
||||
|
||||
print $a[-11111111111111111111111]; // 16
|
||||
|
||||
$a[-0];
|
||||
|
||||
$x = 'test';
|
||||
|
||||
@$x[4];
|
||||
|
||||
@$y = $x[4];
|
||||
|
||||
@('a' == $x[4]);
|
||||
|
||||
$x[4] == 'a'; // 28
|
||||
|
||||
@$x[4] == 'a';
|
||||
|
||||
(@$x[4]) == 'a';
|
||||
|
||||
($x[4]) == 'a'; // 34
|
||||
|
||||
(@($x[4])) == 'a';
|
||||
|
||||
(($x[4])) == 'a'; // 38
|
||||
|
||||
@($x[4]) == 'a';
|
||||
|
||||
($x[4]) == 'a'; // 42
|
||||
|
||||
@($x[4] == 'a');
|
||||
|
||||
($x[4] == 'a'); // 46
|
||||
|
||||
$y = 'foobar';
|
||||
|
||||
$y[12.2];
|
||||
|
||||
print $y[12.2]; // 52
|
||||
|
||||
$y[3.5];
|
||||
|
||||
print $y[3.5]; // 56
|
||||
|
||||
print "\nDone\n";
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
||||
Notice: Uninitialized string offset: 0 in %s on line 12
|
||||
|
||||
Notice: Uninitialized string offset: -%d in %s on line 16
|
||||
|
||||
Notice: Uninitialized string offset: 4 in %s on line 28
|
||||
|
||||
Notice: Uninitialized string offset: 4 in %s on line 34
|
||||
|
||||
Notice: Uninitialized string offset: 4 in %s on line 38
|
||||
|
||||
Notice: Uninitialized string offset: 4 in %s on line 42
|
||||
|
||||
Notice: Uninitialized string offset: 4 in %s on line 46
|
||||
|
||||
Notice: Uninitialized string offset: 12 in %s on line 52
|
||||
b
|
||||
Done
|
||||
@@ -1,18 +0,0 @@
|
||||
--TEST--
|
||||
Bug #39018 [2] (Error control operator '@' fails to suppress "Uninitialized string offset")
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
error_reporting(E_ALL);
|
||||
|
||||
$foo = 'test';
|
||||
$x = @$foo[6];
|
||||
|
||||
print @($foo[100] + $foo[130]);
|
||||
|
||||
print "\nDone\n";
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
0
|
||||
Done
|
||||
@@ -6,6 +6,4 @@ Bug #39304 (Segmentation fault with list unpacking of string offset)
|
||||
list($a, $b) = $s[0];
|
||||
?>
|
||||
--EXPECTF--
|
||||
Notice: Uninitialized string offset: 0 in %s on line %d
|
||||
|
||||
Fatal error: Cannot use string offset as an array in %sbug39304.php on line %d
|
||||
Fatal error: Cannot use string offset as an array in %sbug39304.php on line 3
|
||||
@@ -8,7 +8,7 @@ if (extension_loaded("readline")) die("skip Test doesn't support readline");
|
||||
--FILE--
|
||||
<?php
|
||||
$php = getenv('TEST_PHP_EXECUTABLE');
|
||||
$cmd = "\"$php\" -n -d memory_limit=4M -a \"".dirname(__FILE__)."\"/bug40236.inc";
|
||||
$cmd = "$php -d memory_limit=4M -a ".dirname(__FILE__)."/bug40236.inc";
|
||||
echo `$cmd`;
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Bug #41372 (Internal pointer of source array resets during array copying)
|
||||
Bug #41372 Internal pointer of source array resets during array copying
|
||||
--FILE--
|
||||
<?php
|
||||
$Foo = array('val1', 'val2', 'val3');
|
||||
|
||||
@@ -8,4 +8,4 @@ $foo[3]->bar[1] = "bang";
|
||||
echo "ok\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Cannot use string offset as an object in %sbug41919.php on line %d
|
||||
Fatal error: Cannot use string offset as an object in %s/bug41919.php on line %d
|
||||
@@ -1,38 +0,0 @@
|
||||
--TEST--
|
||||
bug #42143 (The constant NAN is reported as 0 on Windows build)
|
||||
--CREDITS--
|
||||
Venkat Raman Don
|
||||
--FILE--
|
||||
<?php
|
||||
echo "Testing NAN:\n";
|
||||
echo "NAN= ";
|
||||
var_dump(NAN);
|
||||
var_dump(tan(-1) == 123);
|
||||
var_dump(cos(-100) == "PHP String");
|
||||
var_dump(deg2rad(-5.6) == null);
|
||||
var_dump(sqrt(-0.1) == false);
|
||||
var_dump(sqrt(cos(M_PI)) == 0.1);
|
||||
var_dump(NAN);
|
||||
var_dump(is_nan(sqrt(-1.005)) == false);
|
||||
var_dump(is_nan(floor(1)) == true);
|
||||
var_dump(log10(-1) == log(-1));
|
||||
var_dump(log10(-1) != log10(-1));
|
||||
var_dump(is_finite(log10(-1)) == false);
|
||||
var_dump(NAN == NAN);
|
||||
?>
|
||||
--EXPECT--
|
||||
Testing NAN:
|
||||
NAN= float(NAN)
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(false)
|
||||
float(NAN)
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(false)
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
--TEST--
|
||||
Bug #43053 (Regression: some numbers shown in scientific notation)
|
||||
--FILE--
|
||||
<?php
|
||||
echo 1200000.00."\n";
|
||||
echo 1300000.00."\n";
|
||||
echo 1400000.00."\n";
|
||||
echo 1500000.00."\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
1200000
|
||||
1300000
|
||||
1400000
|
||||
1500000
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Bug #43128 (Very long class name causes segfault)
|
||||
Bug #43128 Very long class name causes segfault
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
--TEST--
|
||||
Bug #44830 (Very minor issue with backslash in heredoc)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$backslash = <<<EOT
|
||||
\
|
||||
EOT;
|
||||
|
||||
var_dump($backslash);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
string(1) "\"
|
||||
@@ -1,29 +0,0 @@
|
||||
--TEST--
|
||||
Bug #45178 memory corruption on assignment result of "new" by reference
|
||||
--FILE--
|
||||
<?php
|
||||
class Foo {
|
||||
function __construct() {
|
||||
$this->error = array($this,$this);
|
||||
}
|
||||
}
|
||||
$a =& new Foo();
|
||||
|
||||
class Bar {
|
||||
function __construct() {
|
||||
$this->_rme2 = $this;
|
||||
}
|
||||
}
|
||||
|
||||
$b =& new Bar();
|
||||
$b->_rme2 = 0;
|
||||
var_dump($b);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Assigning the return value of new by reference is deprecated in %sbug45178.php on line 7
|
||||
|
||||
Strict Standards: Assigning the return value of new by reference is deprecated in %sbug45178.php on line 15
|
||||
object(Bar)#%d (1) {
|
||||
["_rme2"]=>
|
||||
int(0)
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
--TEST--
|
||||
Bug #45805 (Crash on throwing exception from error handler)
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded('reflection') || !extension_loaded('spl')) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
class PHPUnit_Util_ErrorHandler
|
||||
{
|
||||
public static function handleError($errno, $errstr, $errfile, $errline)
|
||||
{
|
||||
throw new RuntimeException;
|
||||
}
|
||||
}
|
||||
|
||||
class A {
|
||||
public function getX() {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
class B {
|
||||
public function foo() {
|
||||
$obj = new A;
|
||||
$source = &$obj->getX();
|
||||
}
|
||||
|
||||
public function bar() {
|
||||
$m = new ReflectionMethod('B', 'foo');
|
||||
$m->invoke($this);
|
||||
}
|
||||
}
|
||||
|
||||
set_error_handler(
|
||||
array('PHPUnit_Util_ErrorHandler', 'handleError'), E_ALL | E_STRICT
|
||||
);
|
||||
|
||||
$o = new B;
|
||||
$o->bar();
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught exception 'RuntimeException' in %sbug45805.php:%d
|
||||
Stack trace:
|
||||
#0 %sbug45805.php(%d): PHPUnit_Util_ErrorHandler::handleError(2048, 'Only variables ...', '%s', %d, Array)
|
||||
#1 [internal function]: B->foo()
|
||||
#2 %sbug45805.php(%d): ReflectionMethod->invoke(Object(B))
|
||||
#3 %sbug45805.php(%d): B->bar()
|
||||
#4 {main}
|
||||
thrown in %sbug45805.php on line %d
|
||||
@@ -1,43 +0,0 @@
|
||||
--TEST--
|
||||
Bug #45862 (get_class_vars is inconsistent with 'protected' and 'private' variables)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class Ancestor {
|
||||
function test() {
|
||||
var_dump(get_class_vars("Tester"));
|
||||
var_dump(Tester::$prot);
|
||||
}
|
||||
}
|
||||
|
||||
class Tester extends Ancestor {
|
||||
static protected $prot = "protected var";
|
||||
static private $priv = "private var";
|
||||
}
|
||||
|
||||
class Child extends Tester {
|
||||
function test() { var_dump(get_class_vars("Tester")); }
|
||||
}
|
||||
|
||||
echo "\n From parent scope\n";
|
||||
$parent = new Ancestor();
|
||||
$parent->test();
|
||||
echo "\n From child scope\n";
|
||||
$child = new Child();
|
||||
$child->test();
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
|
||||
From parent scope
|
||||
array(1) {
|
||||
["prot"]=>
|
||||
string(13) "protected var"
|
||||
}
|
||||
string(13) "protected var"
|
||||
|
||||
From child scope
|
||||
array(1) {
|
||||
["prot"]=>
|
||||
string(13) "protected var"
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
--TEST--
|
||||
Bug #45877 (Array key '2147483647' left as string)
|
||||
--INI--
|
||||
precision=20
|
||||
--FILE--
|
||||
<?php
|
||||
$keys = array(PHP_INT_MAX,
|
||||
(string) PHP_INT_MAX,
|
||||
(string) (-PHP_INT_MAX - 1),
|
||||
-PHP_INT_MAX - 1,
|
||||
(string) (PHP_INT_MAX + 1));
|
||||
|
||||
var_dump(array_fill_keys($keys, 1));
|
||||
?>
|
||||
--EXPECTF--
|
||||
array(3) {
|
||||
[%d7]=>
|
||||
int(1)
|
||||
[-%d8]=>
|
||||
int(1)
|
||||
["%d8"]=>
|
||||
int(1)
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
--TEST--
|
||||
Bug #46246 (difference between call_user_func(array($this, $method)) and $this->$method())
|
||||
--FILE--
|
||||
<?php
|
||||
class A
|
||||
{
|
||||
private function Test()
|
||||
{
|
||||
echo 'Hello from '.get_class($this)."\n";
|
||||
}
|
||||
|
||||
public function call($method, $args = array())
|
||||
{
|
||||
$this->Test();
|
||||
$this->$method();
|
||||
call_user_func(array($this, $method));
|
||||
}
|
||||
}
|
||||
|
||||
class B extends A
|
||||
{
|
||||
protected function Test()
|
||||
{
|
||||
echo 'Overridden hello from '.get_class($this)."\n";
|
||||
}
|
||||
}
|
||||
|
||||
$a = new A;
|
||||
$b = new B;
|
||||
|
||||
$a->call('Test');
|
||||
$b->call('Test');
|
||||
?>
|
||||
--EXPECT--
|
||||
Hello from A
|
||||
Hello from A
|
||||
Hello from A
|
||||
Hello from B
|
||||
Hello from B
|
||||
Hello from B
|
||||
@@ -1,33 +0,0 @@
|
||||
--TEST--
|
||||
Bug #46308 (Invalid write when changing property from inside getter)
|
||||
--FILE--
|
||||
<?php
|
||||
class main
|
||||
{
|
||||
public static $dummy = NULL ;
|
||||
public static $dataAccessor = NULL ;
|
||||
}
|
||||
|
||||
class dataAccessor
|
||||
{
|
||||
}
|
||||
|
||||
class relay
|
||||
{
|
||||
public function __get( $name )
|
||||
{
|
||||
main::$dataAccessor = new dataAccessor;
|
||||
}
|
||||
}
|
||||
|
||||
class dummy
|
||||
{
|
||||
}
|
||||
|
||||
main::$dummy = new dummy();
|
||||
main::$dataAccessor = new relay();
|
||||
main::$dataAccessor->bar;
|
||||
echo "ok\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
ok
|
||||
@@ -1,19 +0,0 @@
|
||||
--TEST--
|
||||
Bug #46381 (wrong $this passed to internal methods causes segfault)
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("spl")) die("skip SPL is no available"); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class test {
|
||||
public function test() {
|
||||
return ArrayIterator::current();
|
||||
}
|
||||
}
|
||||
$test = new test();
|
||||
$test->test();
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Non-static method ArrayIterator::current() cannot be called statically, assuming $this from incompatible context in %s on line %d
|
||||
@@ -1,38 +0,0 @@
|
||||
--TEST--
|
||||
Bug #46701 (Creating associative array with long values in the key fails on 32bit linux)
|
||||
--SKIPIF--
|
||||
<?php if (PHP_INT_SIZE != 4) die('skip this test is for 32bit platforms only'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$test_array = array(
|
||||
0xcc5c4600 => 1,
|
||||
0xce331a00 => 2
|
||||
);
|
||||
$test_array[0xce359000] = 3;
|
||||
|
||||
var_dump($test_array);
|
||||
var_dump($test_array[0xce331a00]);
|
||||
|
||||
class foo {
|
||||
public $x;
|
||||
|
||||
public function __construct() {
|
||||
$this->x[0xce359000] = 3;
|
||||
var_dump($this->x);
|
||||
}
|
||||
}
|
||||
|
||||
new foo;
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(1) {
|
||||
[-2147483648]=>
|
||||
int(3)
|
||||
}
|
||||
int(3)
|
||||
array(1) {
|
||||
[-2147483648]=>
|
||||
int(3)
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
--TEST--
|
||||
Bug #47109 (Memory leak on $a->{"a"."b"} when $a is not an object)
|
||||
--FILE--
|
||||
<?php
|
||||
$a->{"a"."b"};
|
||||
?>
|
||||
--EXPECTF--
|
||||
Notice: Undefined variable: a in %sbug47109.php on line 2
|
||||
|
||||
Notice: Trying to get property of non-object in %sbug47109.php on line 2
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
--TEST--
|
||||
Bug #47165 (Possible memory corruption when passing return value by reference)
|
||||
--FILE--
|
||||
<?php
|
||||
class Foo {
|
||||
var $bar = array();
|
||||
|
||||
static function bar() {
|
||||
static $instance = null;
|
||||
$instance = new Foo();
|
||||
return $instance->bar;
|
||||
}
|
||||
}
|
||||
extract(Foo::bar());
|
||||
echo "ok\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
ok
|
||||
@@ -1,26 +0,0 @@
|
||||
--TEST--
|
||||
Bug #47353 (crash when creating a lot of objects in object destructor)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A
|
||||
{
|
||||
function __destruct()
|
||||
{
|
||||
$myArray = array();
|
||||
|
||||
for($i = 1; $i <= 3000; $i++) {
|
||||
if(!isset($myArray[$i]))
|
||||
$myArray[$i] = array();
|
||||
$ref = & $myArray[$i];
|
||||
$ref[] = new stdClass();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$a = new A();
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Done
|
||||
@@ -1,9 +0,0 @@
|
||||
--TEST--
|
||||
Bug #47704 (crashes on some "bad" operations with string offsets)
|
||||
--FILE--
|
||||
<?php
|
||||
$s = "abd";
|
||||
$s[0]->a += 1;
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Cannot use string offset as an object in %sbug47704.php on line %d
|
||||
@@ -1,31 +0,0 @@
|
||||
--TEST--
|
||||
Bug #47801 (__call() accessed via parent:: operator is provided incorrect method name)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A
|
||||
{
|
||||
function __call($name, $args)
|
||||
{
|
||||
echo("magic method called: $name\n");
|
||||
}
|
||||
}
|
||||
|
||||
class B extends A
|
||||
{
|
||||
function getFoo()
|
||||
{
|
||||
parent::getFoo();
|
||||
}
|
||||
}
|
||||
|
||||
$a = new A();
|
||||
$a->getFoo();
|
||||
|
||||
$b = new B();
|
||||
$b->getFoo();
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
magic method called: getFoo
|
||||
magic method called: getFoo
|
||||
@@ -1,16 +0,0 @@
|
||||
--TEST--
|
||||
Bug #47836 (array operator [] inconsistency when the array has PHP_INT_MAX index value)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$arr[PHP_INT_MAX] = 1;
|
||||
$arr[] = 2;
|
||||
|
||||
var_dump($arr);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: Cannot add element to the array as the next element is already occupied in %s on line 4
|
||||
array(1) {
|
||||
[%d]=>
|
||||
int(1)
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
--TEST--
|
||||
Bug #47981 (error handler not called regardless)
|
||||
--INI--
|
||||
error_reporting=0
|
||||
--FILE--
|
||||
<?php
|
||||
function errh($errno, $errstr) {
|
||||
var_dump($errstr);
|
||||
}
|
||||
set_error_handler("errh");
|
||||
|
||||
interface a{}
|
||||
class b implements a { function f($a=1) {}}
|
||||
class c extends b {function f() {}}
|
||||
?>
|
||||
--EXPECTF--
|
||||
string(62) "Declaration of c::f() should be compatible with that of b::f()"
|
||||
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
--TEST--
|
||||
Bug #48228 (crash when exception is thrown while passing function arguments)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function do_throw() {
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
class aa
|
||||
{
|
||||
function check()
|
||||
{
|
||||
}
|
||||
|
||||
function dosome()
|
||||
{
|
||||
$this->check(do_throw());
|
||||
}
|
||||
}
|
||||
$l_aa=new aa();
|
||||
|
||||
$l_aa->dosome();
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
||||
Fatal error: Uncaught exception 'Exception' in %s
|
||||
Stack trace:
|
||||
#0 %s(%d): do_throw()
|
||||
#1 %s(%d): aa->dosome()
|
||||
#2 {main}
|
||||
thrown in %s
|
||||
@@ -1,27 +0,0 @@
|
||||
--TEST--
|
||||
Bug #48248 (SIGSEGV when access to private property via &__get)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A
|
||||
{
|
||||
public function & __get($name)
|
||||
{
|
||||
return $this->test;
|
||||
}
|
||||
}
|
||||
|
||||
class B extends A
|
||||
{
|
||||
private $test;
|
||||
}
|
||||
|
||||
$b = new B;
|
||||
var_dump($b->test);
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Notice: Undefined property: B::$test in %s on line %d
|
||||
|
||||
Notice: Only variable references should be returned by reference in %s on line %d
|
||||
NULL
|
||||
@@ -1,30 +0,0 @@
|
||||
--TEST--
|
||||
Bug #48408 (crash when exception is thrown while passing function arguments)
|
||||
--FILE--
|
||||
<?php
|
||||
class B{
|
||||
public function process($x){
|
||||
return $x;
|
||||
}
|
||||
}
|
||||
class C{
|
||||
public function generate($x){
|
||||
throw new Exception;
|
||||
}
|
||||
}
|
||||
$b = new B;
|
||||
$c = new C;
|
||||
try{
|
||||
$b->process($c->generate(0));
|
||||
}
|
||||
catch(Exception $e){
|
||||
$c->generate(0);
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
||||
Fatal error: Uncaught exception 'Exception' in %s
|
||||
Stack trace:
|
||||
#0 %s(%d): C->generate(0)
|
||||
#1 {main}
|
||||
thrown in %s
|
||||
@@ -1,67 +0,0 @@
|
||||
--TEST--
|
||||
Bug #48409 (crash when exception is thrown while passing function arguments)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class ABCException extends Exception {}
|
||||
|
||||
class BBB
|
||||
{
|
||||
public function xyz($d, $x)
|
||||
{
|
||||
if ($x == 34) {
|
||||
throw new ABCException;
|
||||
}
|
||||
return array('foo' => 'xyz');
|
||||
}
|
||||
}
|
||||
|
||||
class CCC
|
||||
{
|
||||
public function process($p)
|
||||
{
|
||||
return $p;
|
||||
}
|
||||
}
|
||||
|
||||
class AAA
|
||||
{
|
||||
public function func()
|
||||
{
|
||||
$b = new BBB;
|
||||
$c = new CCC;
|
||||
$i = 34;
|
||||
$item = array('foo' => 'bar');
|
||||
try {
|
||||
$c->process($b->xyz($item['foo'], $i));
|
||||
}
|
||||
catch(ABCException $e) {
|
||||
$b->xyz($item['foo'], $i);
|
||||
}
|
||||
} // end func();
|
||||
}
|
||||
|
||||
class Runner
|
||||
{
|
||||
public function run($x)
|
||||
{
|
||||
try {
|
||||
$x->func();
|
||||
}
|
||||
catch(ABCException $e) {
|
||||
throw new Exception;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
$runner = new Runner;
|
||||
$runner->run(new AAA);
|
||||
}
|
||||
catch(Exception $e) {
|
||||
die('Exception thrown');
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
Exception thrown
|
||||
@@ -1,13 +0,0 @@
|
||||
--TEST--
|
||||
Bug #48428 (crash when exception is thrown while passing function arguments)
|
||||
--FILE--
|
||||
<?php
|
||||
try {
|
||||
function x() { throw new Exception("ERROR"); }
|
||||
x(x());
|
||||
} catch(Exception $e) {
|
||||
echo($e -> getMessage());
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
ERROR
|
||||
@@ -1,28 +0,0 @@
|
||||
--TEST--
|
||||
Bug #48693 (Double declaration of __lambda_func when lambda wrongly formatted)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$x = create_function('', 'return 1; }');
|
||||
$y = create_function('', 'function a() { }; return 2;');
|
||||
$z = create_function('', '{');
|
||||
$w = create_function('', 'return 3;');
|
||||
|
||||
var_dump(
|
||||
$x,
|
||||
$y(),
|
||||
$z,
|
||||
$w(),
|
||||
$y != $z
|
||||
);
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Parse error: syntax error, unexpected '}' in %s(%d) : runtime-created function on line 1
|
||||
|
||||
Parse error: syntax error, unexpected $end in %s(%d) : runtime-created function on line 1
|
||||
bool(false)
|
||||
int(2)
|
||||
bool(false)
|
||||
int(3)
|
||||
bool(true)
|
||||
@@ -1,51 +0,0 @@
|
||||
--TEST--
|
||||
Bug #48770 (call_user_func_array() fails to call parent from inheriting class)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A {
|
||||
public function func($str) {
|
||||
var_dump(__METHOD__ .': '. $str);
|
||||
}
|
||||
private function func2($str) {
|
||||
var_dump(__METHOD__ .': '. $str);
|
||||
}
|
||||
protected function func3($str) {
|
||||
var_dump(__METHOD__ .': '. $str);
|
||||
}
|
||||
private function func22($str) {
|
||||
var_dump(__METHOD__ .': '. $str);
|
||||
}
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
public function func($str) {
|
||||
static $avoid_crash = 0;
|
||||
|
||||
if ($avoid_crash++ == 1) {
|
||||
print "This method shouldn't be called when using parent::func!\n";
|
||||
return;
|
||||
}
|
||||
|
||||
call_user_func_array(array($this, 'parent::func'), array($str));
|
||||
}
|
||||
private function func2($str) {
|
||||
var_dump(__METHOD__ .': '. $str);
|
||||
}
|
||||
protected function func3($str) {
|
||||
var_dump(__METHOD__ .': '. $str);
|
||||
}
|
||||
}
|
||||
|
||||
class C extends B {
|
||||
public function func($str) {
|
||||
parent::func($str);
|
||||
}
|
||||
}
|
||||
|
||||
$c = new C;
|
||||
$c->func('This should work!');
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
%unicode|string%(26) "A::func: This should work!"
|
||||
@@ -1,26 +0,0 @@
|
||||
--TEST--
|
||||
Bug #49269 (Ternary operator fails on Iterator object when used inside foreach declaration).
|
||||
--FILE--
|
||||
<?php
|
||||
class TestObject implements Iterator
|
||||
{
|
||||
public $n = 0;
|
||||
function valid()
|
||||
{
|
||||
return ($this->n < 3);
|
||||
}
|
||||
function current() {return $this->n;}
|
||||
function next() {$this->n++;}
|
||||
function key() { }
|
||||
function rewind() {$this->n = 0;}
|
||||
}
|
||||
|
||||
|
||||
$array_object = new TestObject();
|
||||
|
||||
foreach ((true ? $array_object : $array_object) as $item) echo "$item\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
0
|
||||
1
|
||||
2
|
||||
@@ -1,19 +0,0 @@
|
||||
--TEST--
|
||||
Bug #50005 (Throwing through Reflection modified Exception object makes segmentation fault)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class a extends exception {
|
||||
public function __construct() {
|
||||
$this->file = null;
|
||||
}
|
||||
}
|
||||
|
||||
throw new a;
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught exception 'a' in :%d
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
thrown in Unknown on line %d
|
||||
@@ -1,31 +0,0 @@
|
||||
--TEST--
|
||||
Bug #50174 (Incorrectly matched docComment)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class TestClass
|
||||
{
|
||||
/** const comment */
|
||||
const C = 0;
|
||||
|
||||
function x() {}
|
||||
}
|
||||
|
||||
$rm = new ReflectionMethod('TestClass', 'x');
|
||||
var_dump($rm->getDocComment());
|
||||
|
||||
class TestClass2
|
||||
{
|
||||
/** const comment */
|
||||
const C = 0;
|
||||
|
||||
public $x;
|
||||
}
|
||||
|
||||
$rp = new ReflectionProperty('TestClass2', 'x');
|
||||
var_dump($rp->getDocComment());
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(false)
|
||||
bool(false)
|
||||
@@ -1,30 +0,0 @@
|
||||
--TEST--
|
||||
Bug #50255 (isset() and empty() silently casts array to object)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$arr = array('foo' => 'bar');
|
||||
|
||||
print "isset\n";
|
||||
var_dump(isset($arr->foo));
|
||||
var_dump(isset($arr->bar));
|
||||
var_dump(isset($arr['foo']));
|
||||
var_dump(isset($arr['bar']));
|
||||
print "empty\n";
|
||||
var_dump(empty($arr->foo));
|
||||
var_dump(empty($arr->bar));
|
||||
var_dump(empty($arr['foo']));
|
||||
var_dump(empty($arr['bar']));
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
isset
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(false)
|
||||
empty
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -1,16 +0,0 @@
|
||||
--TEST--
|
||||
Testing declare statement with several type values
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
declare(encoding = 1);
|
||||
declare(encoding = 1123131232131312321);
|
||||
declare(encoding = NULL);
|
||||
declare(encoding = M_PI);
|
||||
declare(encoding = 'utf-8');
|
||||
|
||||
print 'DONE';
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
DONE
|
||||
@@ -1,28 +0,0 @@
|
||||
--TEST--
|
||||
Testing exception properties
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class my_file
|
||||
{
|
||||
public function __toString()
|
||||
{
|
||||
return "somebuildfilename" ;
|
||||
}
|
||||
}
|
||||
|
||||
class my_exception extends exception
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->message = new stdclass ;
|
||||
$this->file = new my_file ;
|
||||
$this->line = "12" ;
|
||||
}
|
||||
}
|
||||
|
||||
throw new my_exception;
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
Catchable fatal error: Object of class stdClass could not be converted to string in Unknown on line 0
|
||||
@@ -1,30 +0,0 @@
|
||||
--TEST--
|
||||
Testing Exception's methods
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$x = new Exception;
|
||||
$x->gettraceasstring(1);
|
||||
$x->gettraceasstring();
|
||||
$x->__tostring(1);
|
||||
$x->gettrace(1);
|
||||
$x->getline(1);
|
||||
$x->getfile(1);
|
||||
$x->getmessage(1);
|
||||
$x->getcode(1);
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: Wrong parameter count for Exception::getTraceAsString() in %s on line %d
|
||||
|
||||
Warning: Wrong parameter count for Exception::__toString() in %s on line %d
|
||||
|
||||
Warning: Wrong parameter count for Exception::getTrace() in %s on line %d
|
||||
|
||||
Warning: Wrong parameter count for Exception::getLine() in %s on line %d
|
||||
|
||||
Warning: Wrong parameter count for Exception::getFile() in %s on line %d
|
||||
|
||||
Warning: Wrong parameter count for Exception::getMessage() in %s on line %d
|
||||
|
||||
Warning: Wrong parameter count for Exception::getCode() in %s on line %d
|
||||
@@ -1,39 +0,0 @@
|
||||
--TEST--
|
||||
function_exists function : basic functionality
|
||||
--FILE--
|
||||
<?php
|
||||
/*
|
||||
* proto bool function_exists(string function_name)
|
||||
* Function is implemented in Zend/zend_builtin_functions.c
|
||||
*/
|
||||
|
||||
echo "*** Testing function_exists() : basic functionality ***\n";
|
||||
|
||||
echo "Internal function: ";
|
||||
var_dump(function_exists('function_exists'));
|
||||
|
||||
echo "User defined function: ";
|
||||
function f() {}
|
||||
var_dump(function_exists('f'));
|
||||
|
||||
echo "Case sensitivity: ";
|
||||
var_dump(function_exists('F'));
|
||||
|
||||
echo "Non existent function: ";
|
||||
var_dump(function_exists('g'));
|
||||
|
||||
echo "Method: ";
|
||||
Class C {
|
||||
static function f() {}
|
||||
}
|
||||
var_dump(function_exists('C::f'));
|
||||
?>
|
||||
===Done===
|
||||
--EXPECT--
|
||||
*** Testing function_exists() : basic functionality ***
|
||||
Internal function: bool(true)
|
||||
User defined function: bool(true)
|
||||
Case sensitivity: bool(true)
|
||||
Non existent function: bool(false)
|
||||
Method: bool(false)
|
||||
===Done===
|
||||
@@ -1,36 +0,0 @@
|
||||
--TEST--
|
||||
Test function_exists() function : error conditions
|
||||
--FILE--
|
||||
<?php
|
||||
/*
|
||||
* proto bool function_exists(string function_name)
|
||||
* Function is implemented in Zend/zend_builtin_functions.c
|
||||
*/
|
||||
|
||||
echo "*** Testing function_exists() : error conditions ***\n";
|
||||
|
||||
$arg_0 = "ABC";
|
||||
$extra_arg = 1;
|
||||
|
||||
echo "\nToo many arguments\n";
|
||||
var_dump(function_exists($arg_0, $extra_arg));
|
||||
|
||||
echo "\nToo few arguments\n";
|
||||
var_dump(function_exists());
|
||||
|
||||
?>
|
||||
===Done===
|
||||
--EXPECTF--
|
||||
*** Testing function_exists() : error conditions ***
|
||||
|
||||
Too many arguments
|
||||
|
||||
Warning: Wrong parameter count for function_exists() in %s on line %d
|
||||
NULL
|
||||
|
||||
Too few arguments
|
||||
|
||||
Warning: Wrong parameter count for function_exists() in %s on line %d
|
||||
NULL
|
||||
===Done===
|
||||
|
||||
@@ -1,135 +0,0 @@
|
||||
--TEST--
|
||||
Test function_exists() function : usage variations - test values for $str argument
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
/*
|
||||
* proto bool function_exists(string function_name)
|
||||
* Function is implemented in Zend/zend_builtin_functions.c
|
||||
*/
|
||||
|
||||
echo "*** Testing function_exists() function: with unexpected inputs for 'str' argument ***\n";
|
||||
|
||||
//get an unset variable
|
||||
$unset_var = 'string_val';
|
||||
unset($unset_var);
|
||||
|
||||
//defining a class
|
||||
class sample {
|
||||
public function __toString() {
|
||||
return "sample object";
|
||||
}
|
||||
}
|
||||
|
||||
//getting the resource
|
||||
$file_handle = fopen(__FILE__, "r");
|
||||
|
||||
// array with different values for $str
|
||||
$inputs = array (
|
||||
|
||||
// integer values
|
||||
0,
|
||||
1,
|
||||
255,
|
||||
256,
|
||||
PHP_INT_MAX,
|
||||
-PHP_INT_MAX,
|
||||
|
||||
// float values
|
||||
10.5,
|
||||
-20.5,
|
||||
10.1234567e10,
|
||||
|
||||
// array values
|
||||
array(),
|
||||
array(0),
|
||||
array(1, 2),
|
||||
|
||||
// boolean values
|
||||
true,
|
||||
false,
|
||||
TRUE,
|
||||
FALSE,
|
||||
|
||||
// null values
|
||||
NULL,
|
||||
null,
|
||||
|
||||
// objects
|
||||
new sample(),
|
||||
|
||||
// resource
|
||||
$file_handle,
|
||||
|
||||
// undefined variable
|
||||
@$undefined_var,
|
||||
|
||||
// unset variable
|
||||
@$unset_var
|
||||
);
|
||||
|
||||
// loop through with each element of the $inputs array to test function_exists() function
|
||||
$count = 1;
|
||||
foreach($inputs as $input) {
|
||||
echo "-- Iteration $count --\n";
|
||||
var_dump( function_exists($input) );
|
||||
$count ++;
|
||||
}
|
||||
|
||||
fclose($file_handle); //closing the file handle
|
||||
|
||||
?>
|
||||
===Done===
|
||||
--EXPECTF--
|
||||
*** Testing function_exists() function: with unexpected inputs for 'str' argument ***
|
||||
-- Iteration 1 --
|
||||
bool(false)
|
||||
-- Iteration 2 --
|
||||
bool(false)
|
||||
-- Iteration 3 --
|
||||
bool(false)
|
||||
-- Iteration 4 --
|
||||
bool(false)
|
||||
-- Iteration 5 --
|
||||
bool(false)
|
||||
-- Iteration 6 --
|
||||
bool(false)
|
||||
-- Iteration 7 --
|
||||
bool(false)
|
||||
-- Iteration 8 --
|
||||
bool(false)
|
||||
-- Iteration 9 --
|
||||
bool(false)
|
||||
-- Iteration 10 --
|
||||
|
||||
Notice: Array to string conversion in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 11 --
|
||||
|
||||
Notice: Array to string conversion in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 12 --
|
||||
|
||||
Notice: Array to string conversion in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 13 --
|
||||
bool(false)
|
||||
-- Iteration 14 --
|
||||
bool(false)
|
||||
-- Iteration 15 --
|
||||
bool(false)
|
||||
-- Iteration 16 --
|
||||
bool(false)
|
||||
-- Iteration 17 --
|
||||
bool(false)
|
||||
-- Iteration 18 --
|
||||
bool(false)
|
||||
-- Iteration 19 --
|
||||
bool(false)
|
||||
-- Iteration 20 --
|
||||
bool(false)
|
||||
-- Iteration 21 --
|
||||
bool(false)
|
||||
-- Iteration 22 --
|
||||
bool(false)
|
||||
===Done===
|
||||
@@ -1,55 +0,0 @@
|
||||
--TEST--
|
||||
get_class_methods(): Testing scope
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
abstract class A {
|
||||
public function a() { }
|
||||
private function b() { }
|
||||
protected function c() { }
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
private function bb() { }
|
||||
|
||||
static public function test() {
|
||||
var_dump(get_class_methods('A'));
|
||||
var_dump(get_class_methods('B'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var_dump(get_class_methods('A'));
|
||||
var_dump(get_class_methods('B'));
|
||||
|
||||
|
||||
B::test();
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(1) {
|
||||
[0]=>
|
||||
string(1) "a"
|
||||
}
|
||||
array(2) {
|
||||
[0]=>
|
||||
string(4) "test"
|
||||
[1]=>
|
||||
string(1) "a"
|
||||
}
|
||||
array(2) {
|
||||
[0]=>
|
||||
string(1) "a"
|
||||
[1]=>
|
||||
string(1) "c"
|
||||
}
|
||||
array(4) {
|
||||
[0]=>
|
||||
string(2) "bb"
|
||||
[1]=>
|
||||
string(4) "test"
|
||||
[2]=>
|
||||
string(1) "a"
|
||||
[3]=>
|
||||
string(1) "c"
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
--TEST--
|
||||
get_class_methods(): Testing with interface
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
interface A {
|
||||
function a();
|
||||
function b();
|
||||
}
|
||||
|
||||
class B implements A {
|
||||
public function a() { }
|
||||
public function b() { }
|
||||
|
||||
public function __construct() {
|
||||
var_dump(get_class_methods('A'));
|
||||
var_dump(get_class_methods('B'));
|
||||
}
|
||||
|
||||
public function __destruct() { }
|
||||
}
|
||||
|
||||
new B;
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Redefining already defined constructor for class B in %s on line %d
|
||||
array(2) {
|
||||
[0]=>
|
||||
string(1) "a"
|
||||
[1]=>
|
||||
string(1) "b"
|
||||
}
|
||||
array(4) {
|
||||
[0]=>
|
||||
string(1) "a"
|
||||
[1]=>
|
||||
string(1) "b"
|
||||
[2]=>
|
||||
string(11) "__construct"
|
||||
[3]=>
|
||||
string(10) "__destruct"
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
--TEST--
|
||||
get_class_methods(): Testing scope
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
interface A {
|
||||
function aa();
|
||||
function bb();
|
||||
static function cc();
|
||||
}
|
||||
|
||||
class C {
|
||||
public function a() { }
|
||||
protected function b() { }
|
||||
private function c() { }
|
||||
|
||||
static public function static_a() { }
|
||||
static protected function static_b() { }
|
||||
static private function static_c() { }
|
||||
}
|
||||
|
||||
class B extends C implements A {
|
||||
public function aa() { }
|
||||
public function bb() { }
|
||||
|
||||
static function cc() { }
|
||||
|
||||
public function __construct() {
|
||||
var_dump(get_class_methods('A'));
|
||||
var_dump(get_class_methods('B'));
|
||||
var_dump(get_class_methods('C'));
|
||||
}
|
||||
|
||||
public function __destruct() { }
|
||||
}
|
||||
|
||||
new B;
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(3) {
|
||||
[0]=>
|
||||
string(2) "aa"
|
||||
[1]=>
|
||||
string(2) "bb"
|
||||
[2]=>
|
||||
string(2) "cc"
|
||||
}
|
||||
array(9) {
|
||||
[0]=>
|
||||
string(2) "aa"
|
||||
[1]=>
|
||||
string(2) "bb"
|
||||
[2]=>
|
||||
string(2) "cc"
|
||||
[3]=>
|
||||
string(11) "__construct"
|
||||
[4]=>
|
||||
string(10) "__destruct"
|
||||
[5]=>
|
||||
string(1) "a"
|
||||
[6]=>
|
||||
string(1) "b"
|
||||
[7]=>
|
||||
string(8) "static_a"
|
||||
[8]=>
|
||||
string(8) "static_b"
|
||||
}
|
||||
array(4) {
|
||||
[0]=>
|
||||
string(1) "a"
|
||||
[1]=>
|
||||
string(1) "b"
|
||||
[2]=>
|
||||
string(8) "static_a"
|
||||
[3]=>
|
||||
string(8) "static_b"
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
--TEST--
|
||||
get_class_vars(): Simple test
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A {
|
||||
public $a = 1;
|
||||
private $b = 2;
|
||||
private $c = 3;
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
static public $aa = 4;
|
||||
static private $bb = 5;
|
||||
static protected $cc = 6;
|
||||
}
|
||||
|
||||
|
||||
var_dump(get_class_vars('A'));
|
||||
var_dump(get_class_vars('B'));
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(1) {
|
||||
["a"]=>
|
||||
int(1)
|
||||
}
|
||||
array(2) {
|
||||
["a"]=>
|
||||
int(1)
|
||||
["aa"]=>
|
||||
int(4)
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
--TEST--
|
||||
get_class_vars(): Testing the scope
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A {
|
||||
public $a = 1;
|
||||
private $b = 2;
|
||||
private $c = 3;
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
static public $aa = 4;
|
||||
static private $bb = 5;
|
||||
static protected $cc = 6;
|
||||
}
|
||||
|
||||
class C extends B {
|
||||
public function __construct() {
|
||||
var_dump(get_class_vars('A'));
|
||||
var_dump(get_class_vars('B'));
|
||||
|
||||
var_dump($this->a, $this->b, $this->c);
|
||||
}
|
||||
}
|
||||
|
||||
new C;
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
array(1) {
|
||||
["a"]=>
|
||||
int(1)
|
||||
}
|
||||
array(3) {
|
||||
["a"]=>
|
||||
int(1)
|
||||
["aa"]=>
|
||||
int(4)
|
||||
["cc"]=>
|
||||
int(6)
|
||||
}
|
||||
|
||||
Notice: Undefined property: C::$b in %s on line %d
|
||||
|
||||
Notice: Undefined property: C::$c in %s on line %d
|
||||
int(1)
|
||||
NULL
|
||||
NULL
|
||||
@@ -1,49 +0,0 @@
|
||||
--TEST--
|
||||
get_class_vars(): Testing the scope
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A {
|
||||
public $a = 1;
|
||||
private $b = 2;
|
||||
private $c = 3;
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
static public $aa = 4;
|
||||
static private $bb = 5;
|
||||
static protected $cc = 6;
|
||||
|
||||
protected function __construct() {
|
||||
var_dump(get_class_vars('C'));
|
||||
}
|
||||
}
|
||||
|
||||
class C extends B {
|
||||
public $aaa = 7;
|
||||
private $bbb = 8;
|
||||
protected $ccc = 9;
|
||||
|
||||
public function __construct() {
|
||||
parent::__construct();
|
||||
}
|
||||
}
|
||||
|
||||
new C;
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(6) {
|
||||
["aaa"]=>
|
||||
int(7)
|
||||
["ccc"]=>
|
||||
int(9)
|
||||
["a"]=>
|
||||
int(1)
|
||||
["aa"]=>
|
||||
int(4)
|
||||
["bb"]=>
|
||||
int(5)
|
||||
["cc"]=>
|
||||
int(6)
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
--TEST--
|
||||
get_class_vars(): Testing the scope
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A {
|
||||
public $a = 1;
|
||||
static public $A = 2;
|
||||
|
||||
private $b = 3;
|
||||
static private $B = 4;
|
||||
|
||||
protected $c = 5;
|
||||
static protected $C = 6;
|
||||
|
||||
public function __construct() {
|
||||
var_dump(get_class_vars('A'));
|
||||
}
|
||||
|
||||
static public function test() {
|
||||
var_dump(get_class_vars('A'));
|
||||
}
|
||||
}
|
||||
|
||||
var_dump(get_class_vars('A'));
|
||||
|
||||
new A;
|
||||
|
||||
var_dump(A::test());
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(2) {
|
||||
["a"]=>
|
||||
int(1)
|
||||
["A"]=>
|
||||
int(2)
|
||||
}
|
||||
array(6) {
|
||||
["a"]=>
|
||||
int(1)
|
||||
["b"]=>
|
||||
int(3)
|
||||
["c"]=>
|
||||
int(5)
|
||||
["A"]=>
|
||||
int(2)
|
||||
["B"]=>
|
||||
int(4)
|
||||
["C"]=>
|
||||
int(6)
|
||||
}
|
||||
array(6) {
|
||||
["a"]=>
|
||||
int(1)
|
||||
["b"]=>
|
||||
int(3)
|
||||
["c"]=>
|
||||
int(5)
|
||||
["A"]=>
|
||||
int(2)
|
||||
["B"]=>
|
||||
int(4)
|
||||
["C"]=>
|
||||
int(6)
|
||||
}
|
||||
NULL
|
||||
@@ -1,39 +0,0 @@
|
||||
--TEST--
|
||||
get_class_vars(): Testing visibility
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A {
|
||||
protected $a = 1;
|
||||
private $b = 2;
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
private $c = 3;
|
||||
public function __construct() {
|
||||
var_dump(get_class_vars('A'));
|
||||
var_dump(get_class_vars('B'));
|
||||
}
|
||||
}
|
||||
|
||||
var_dump(get_class_vars('A'));
|
||||
var_dump(get_class_vars('B'));
|
||||
|
||||
new B;
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(0) {
|
||||
}
|
||||
array(0) {
|
||||
}
|
||||
array(1) {
|
||||
["a"]=>
|
||||
int(1)
|
||||
}
|
||||
array(2) {
|
||||
["c"]=>
|
||||
int(3)
|
||||
["a"]=>
|
||||
int(1)
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
--TEST--
|
||||
get_class_vars(): Testing visibility
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A {
|
||||
protected $a = 1;
|
||||
}
|
||||
|
||||
class B extends A { }
|
||||
|
||||
class C extends B { }
|
||||
|
||||
var_dump(get_class_vars('A'));
|
||||
var_dump(get_class_vars('B'));
|
||||
var_dump(get_class_vars('C'));
|
||||
|
||||
print "---\n";
|
||||
|
||||
class D extends B {
|
||||
public function __construct() {
|
||||
var_dump(get_class_vars('A'));
|
||||
var_dump(get_class_vars('B'));
|
||||
var_dump(get_class_vars('C'));
|
||||
}
|
||||
}
|
||||
|
||||
new D;
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(0) {
|
||||
}
|
||||
array(0) {
|
||||
}
|
||||
array(0) {
|
||||
}
|
||||
---
|
||||
array(1) {
|
||||
["a"]=>
|
||||
int(1)
|
||||
}
|
||||
array(1) {
|
||||
["a"]=>
|
||||
int(1)
|
||||
}
|
||||
array(1) {
|
||||
["a"]=>
|
||||
int(1)
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
--TEST--
|
||||
get_class_vars(): Testing with static properties
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A {
|
||||
static public $a, $aa;
|
||||
static private $b, $bb;
|
||||
static protected $c, $cc;
|
||||
|
||||
static public function test() {
|
||||
var_dump(get_class_vars(__CLASS__));
|
||||
}
|
||||
}
|
||||
|
||||
var_dump(get_class_vars('A'));
|
||||
var_dump(A::test());
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(2) {
|
||||
["a"]=>
|
||||
NULL
|
||||
["aa"]=>
|
||||
NULL
|
||||
}
|
||||
array(6) {
|
||||
["a"]=>
|
||||
NULL
|
||||
["aa"]=>
|
||||
NULL
|
||||
["b"]=>
|
||||
NULL
|
||||
["bb"]=>
|
||||
NULL
|
||||
["c"]=>
|
||||
NULL
|
||||
["cc"]=>
|
||||
NULL
|
||||
}
|
||||
NULL
|
||||
@@ -1,59 +0,0 @@
|
||||
--TEST--
|
||||
get_defined_functions() function : basic functionality
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
/* Prototype : array get_defined_functions ( void )
|
||||
* Description: Gets an array of all defined functions.
|
||||
* Source code: Zend/zend_builtin_functions.c
|
||||
*/
|
||||
|
||||
echo "*** Testing get_defined_functions() : basic functionality ***\n";
|
||||
|
||||
function foo() {}
|
||||
|
||||
// mixed case function
|
||||
function HelloWorld() {}
|
||||
|
||||
Class C {
|
||||
function f1() {}
|
||||
static function f2() {}
|
||||
}
|
||||
|
||||
$func = get_defined_functions();
|
||||
|
||||
if (!is_array($func)) {
|
||||
echo "TEST FAILED: return type not an array\n";
|
||||
}
|
||||
|
||||
|
||||
if (!is_array($func["internal"])) {
|
||||
echo "TEST FAILED: no element in result array with key 'internal'\n";
|
||||
}
|
||||
|
||||
$internal = $func["internal"];
|
||||
|
||||
//check for a few core functions
|
||||
if (!in_array("cos", $internal) || !in_array("strlen", $internal)) {
|
||||
echo "TEST FAILED: missing elements from 'internal' array\n";
|
||||
var_dump($internal);
|
||||
}
|
||||
|
||||
if (!is_array($func["user"])) {
|
||||
echo "TEST FAILED: no element in result array with key 'user'\n";
|
||||
}
|
||||
|
||||
$user = $func["user"];
|
||||
if (count($user) == 2 && in_array("foo", $user) && in_array("helloworld", $user)) {
|
||||
echo "TEST PASSED\n";
|
||||
} else {
|
||||
echo "TEST FAILED: missing elements from 'user' array\n";
|
||||
var_dump($user);
|
||||
}
|
||||
|
||||
?>
|
||||
===Done===
|
||||
--EXPECT--
|
||||
*** Testing get_defined_functions() : basic functionality ***
|
||||
TEST PASSED
|
||||
===Done===
|
||||
@@ -1,29 +0,0 @@
|
||||
--TEST--
|
||||
Test get_defined_functions() function : error conditions
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
/* Prototype : array get_defined_functions ( void )
|
||||
* Description: Gets an array of all defined functions.
|
||||
* Source code: Zend/zend_builtin_functions.c
|
||||
*/
|
||||
|
||||
|
||||
echo "*** Testing get_defined_functions() : error conditions ***\n";
|
||||
|
||||
|
||||
echo "\n-- Testing get_defined_functions() function with more than expected no. of arguments --\n";
|
||||
$extra_arg = 10;
|
||||
var_dump( get_defined_functions($extra_arg) );
|
||||
|
||||
?>
|
||||
===Done===
|
||||
--EXPECTF--
|
||||
*** Testing get_defined_functions() : error conditions ***
|
||||
|
||||
-- Testing get_defined_functions() function with more than expected no. of arguments --
|
||||
|
||||
Warning: Wrong parameter count for get_defined_functions() in %s on line %d
|
||||
NULL
|
||||
|
||||
===Done===
|
||||
@@ -1,16 +0,0 @@
|
||||
--TEST--
|
||||
Check if get_required_files works
|
||||
--CREDITS--
|
||||
Sebastian Schürmann
|
||||
sschuermann@chip.de
|
||||
Testfest 2009 Munich
|
||||
--FILE--
|
||||
<?php
|
||||
$files = get_required_files();
|
||||
var_dump($files);
|
||||
?>
|
||||
--EXPECTF--
|
||||
array(1) {
|
||||
[0]=>
|
||||
%string|unicode%(%d)%s
|
||||
}
|
||||
@@ -22,7 +22,7 @@ foreach ($doubles as $d) {
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
float(4.0833602971%dE+14)
|
||||
float(4083360297110%d)
|
||||
float(4.7223664828%dE+21)
|
||||
float(1.3521606402%dE+31)
|
||||
float(1.9807040628%dE+27)
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
--TEST--
|
||||
Testing isset and unset with variable variables
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
print "- isset ---\n";
|
||||
|
||||
$var_name = 'unexisting';
|
||||
|
||||
if (isset($$var_name)) {
|
||||
print "error\n";
|
||||
}
|
||||
|
||||
$test = 'var_name';
|
||||
|
||||
if (isset($$$test)) {
|
||||
print "error\n";
|
||||
}
|
||||
|
||||
print "- unset ---\n";
|
||||
|
||||
unset($$var_name);
|
||||
|
||||
unset($$$test);
|
||||
|
||||
print "done\n";
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
- isset ---
|
||||
- unset ---
|
||||
done
|
||||
@@ -1,10 +0,0 @@
|
||||
--TEST--
|
||||
Testing isset with several undefined variables as argument
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
var_dump(isset($a, ${$b}, $$c, $$$$d, $e[$f->g]->d));
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(false)
|
||||
@@ -1,40 +0,0 @@
|
||||
--TEST--
|
||||
Testing isset accessing undefined array itens and properties
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$a = 'foo';
|
||||
$b =& $a;
|
||||
|
||||
var_dump(isset($b));
|
||||
|
||||
var_dump(isset($a[0], $b[1]));
|
||||
|
||||
var_dump(isset($a[0]->a));
|
||||
|
||||
var_dump(isset($c[0][1][2]->a->b->c->d));
|
||||
|
||||
var_dump(isset(${$a}->{$b->$c[$d]}));
|
||||
|
||||
var_dump(isset($GLOBALS));
|
||||
|
||||
var_dump(isset($GLOBALS[1]));
|
||||
|
||||
var_dump(isset($GLOBALS[1]->$GLOBALS));
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(false)
|
||||
bool(false)
|
||||
|
||||
Notice: Undefined variable: d in %s on line %d
|
||||
|
||||
Notice: Undefined variable: c in %s on line %d
|
||||
|
||||
Notice: Trying to get property of non-object in %s on line %d
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(false)
|
||||
bool(false)
|
||||
@@ -1,74 +0,0 @@
|
||||
--TEST--
|
||||
Testing method_exists()
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class bar {
|
||||
static public function stat_a2() {
|
||||
}
|
||||
static private function stat_b2() {
|
||||
}
|
||||
static protected function stat_c2() {
|
||||
}
|
||||
|
||||
private function method_a() {
|
||||
}
|
||||
protected function method_b() {
|
||||
}
|
||||
public function method_c() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
class baz extends bar {
|
||||
static public function stat_a() {
|
||||
}
|
||||
static private function stat_b() {
|
||||
}
|
||||
static protected function stat_c() {
|
||||
}
|
||||
|
||||
private function method_a() {
|
||||
}
|
||||
protected function method_b() {
|
||||
}
|
||||
public function method_c() {
|
||||
}
|
||||
}
|
||||
|
||||
var_dump(method_exists('baz', 'stat_a'));
|
||||
var_dump(method_exists('baz', 'stat_b'));
|
||||
var_dump(method_exists('baz', 'stat_c'));
|
||||
print "----\n";
|
||||
var_dump(method_exists('baz', 'stat_a2'));
|
||||
var_dump(method_exists('baz', 'stat_b2'));
|
||||
var_dump(method_exists('baz', 'stat_c2'));
|
||||
print "----\n";
|
||||
|
||||
$baz = new baz;
|
||||
var_dump(method_exists($baz, 'method_a'));
|
||||
var_dump(method_exists($baz, 'method_b'));
|
||||
var_dump(method_exists($baz, 'method_c'));
|
||||
print "----\n";
|
||||
var_dump(method_exists($baz, 'stat_a'));
|
||||
var_dump(method_exists($baz, 'stat_b'));
|
||||
var_dump(method_exists($baz, 'stat_c'));
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
----
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
----
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
----
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
@@ -1,18 +0,0 @@
|
||||
--TEST--
|
||||
Crash when function parameter modified via unexpected reference
|
||||
--FILE--
|
||||
<?php
|
||||
function my_errorhandler($errno,$errormsg) {
|
||||
global $my_var;
|
||||
$my_var = 0;
|
||||
return true;
|
||||
}
|
||||
set_error_handler("my_errorhandler");
|
||||
$my_var = str_repeat("A",64);
|
||||
$data = call_user_func_array("explode",array(new StdClass(), &$my_var));
|
||||
$my_var=array(1,2,3);
|
||||
$data = call_user_func_array("implode",array(&$my_var, new StdClass()));
|
||||
echo "Done.\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Done.
|
||||
@@ -1,5 +1,3 @@
|
||||
<?php
|
||||
|
||||
unset($x)
|
||||
|
||||
?>
|
||||
@@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
unset() CV 7 (indirect unset() of global variable in import_request_variables())
|
||||
--SKIPIF--
|
||||
<?php if (php_sapi_name()=='cli') echo 'skip'; ?>
|
||||
--GET--
|
||||
x=2
|
||||
--FILE--
|
||||
|
||||
@@ -15,5 +15,5 @@ echo "Done\n";
|
||||
float(-100)
|
||||
float(808792757210)
|
||||
float(-4.5646456464565E+27)
|
||||
float(-1.1276204760067E+16)
|
||||
float(-11276204760067000)
|
||||
Done
|
||||
+4
-4
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2009 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 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 |
|
||||
@@ -101,7 +101,7 @@ ZEND_API zval zval_used_for_init; /* True global variable */
|
||||
/* version information */
|
||||
static char *zend_version_info;
|
||||
static uint zend_version_info_length;
|
||||
#define ZEND_CORE_VERSION_INFO "Zend Engine v" ZEND_VERSION ", Copyright (c) 1998-2009 Zend Technologies\n"
|
||||
#define ZEND_CORE_VERSION_INFO "Zend Engine v" ZEND_VERSION ", Copyright (c) 1998-2008 Zend Technologies\n"
|
||||
|
||||
|
||||
#define PRINT_ZVAL_INDENT 4
|
||||
@@ -835,7 +835,7 @@ void zend_deactivate_modules(TSRMLS_D)
|
||||
EG(opline_ptr) = NULL; /* we're no longer executing anything */
|
||||
|
||||
zend_try {
|
||||
zend_hash_reverse_apply(&module_registry, (apply_func_t) module_registry_cleanup TSRMLS_CC);
|
||||
zend_hash_apply(&module_registry, (apply_func_t) module_registry_cleanup TSRMLS_CC);
|
||||
} zend_end_try();
|
||||
}
|
||||
|
||||
@@ -1078,7 +1078,7 @@ ZEND_API void zend_error(int type, const char *format, ...)
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(__GNUC__) && __GNUC__ >= 3 && !defined(__INTEL_COMPILER) && !defined(DARWIN) && !defined(__hpux) && !defined(_AIX) && !defined(__osf__)
|
||||
#if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !defined(DARWIN) && !defined(__hpux) && !defined(_AIX) && !defined(__osf__)
|
||||
void zend_error_noreturn(int type, const char *format, ...) __attribute__ ((alias("zend_error"),noreturn));
|
||||
#endif
|
||||
|
||||
|
||||
+2
-20
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2009 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 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 |
|
||||
@@ -178,12 +178,6 @@ char *alloca ();
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__GNUC__) && ZEND_GCC_VERSION >= 3400
|
||||
#else
|
||||
# define __restrict__
|
||||
#endif
|
||||
#define restrict __restrict__
|
||||
|
||||
#if (HAVE_ALLOCA || (defined (__GNUC__) && __GNUC__ >= 2)) && !(defined(ZTS) && defined(ZEND_WIN32)) && !(defined(ZTS) && defined(NETWARE)) && !(defined(ZTS) && defined(HPUX)) && !defined(DARWIN)
|
||||
# define do_alloca(p) alloca(p)
|
||||
# define free_alloca(p)
|
||||
@@ -255,18 +249,6 @@ char *alloca ();
|
||||
#define LONG_MIN (- LONG_MAX - 1)
|
||||
#endif
|
||||
|
||||
#if SIZEOF_LONG == 4
|
||||
#define MAX_LENGTH_OF_LONG 11
|
||||
static const char long_min_digits[] = "2147483648";
|
||||
#elif SIZEOF_LONG == 8
|
||||
#define MAX_LENGTH_OF_LONG 20
|
||||
static const char long_min_digits[] = "9223372036854775808";
|
||||
#else
|
||||
#error "Unknown SIZEOF_LONG"
|
||||
#endif
|
||||
|
||||
#define MAX_LENGTH_OF_DOUBLE 32
|
||||
|
||||
#undef SUCCESS
|
||||
#undef FAILURE
|
||||
#define SUCCESS 0
|
||||
@@ -280,7 +262,7 @@ static const char long_min_digits[] = "9223372036854775808";
|
||||
#define INTERNAL_FUNCTION_PARAMETERS int ht, zval *return_value, zval **return_value_ptr, zval *this_ptr, int return_value_used TSRMLS_DC
|
||||
#define INTERNAL_FUNCTION_PARAM_PASSTHRU ht, return_value, return_value_ptr, this_ptr, return_value_used TSRMLS_CC
|
||||
|
||||
#if defined(__GNUC__) && __GNUC__ >= 3 && !defined(__INTEL_COMPILER) && !defined(DARWIN) && !defined(__hpux) && !defined(_AIX) && !defined(__osf__) && __GNUC__ >= 3
|
||||
#if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !defined(DARWIN) && !defined(__hpux) && !defined(_AIX) && !defined(__osf__)
|
||||
# define ZEND_VM_ALWAYS_INLINE __attribute__ ((always_inline))
|
||||
void zend_error_noreturn(int type, const char *format, ...) __attribute__ ((noreturn));
|
||||
#else
|
||||
|
||||
+12
-19
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2009 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 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 |
|
||||
@@ -901,21 +901,21 @@ ZEND_API void zend_update_class_constants(zend_class_entry *class_type TSRMLS_DC
|
||||
|
||||
zend_hash_get_current_key_ex(&class_type->default_static_members, &str_index, &str_length, &num_index, 0, &pos);
|
||||
if ((*p)->is_ref &&
|
||||
class_type->parent &&
|
||||
zend_hash_find(&class_type->parent->default_static_members, str_index, str_length, (void**)&q) == SUCCESS &&
|
||||
*p == *q &&
|
||||
zend_hash_find(CE_STATIC_MEMBERS(class_type->parent), str_index, str_length, (void**)&q) == SUCCESS) {
|
||||
class_type->parent &&
|
||||
zend_hash_find(&class_type->parent->default_static_members, str_index, str_length, (void**)&q) == SUCCESS &&
|
||||
*p == *q &&
|
||||
zend_hash_find(CE_STATIC_MEMBERS(class_type->parent), str_index, str_length, (void**)&q) == SUCCESS) {
|
||||
(*q)->refcount++;
|
||||
(*q)->is_ref = 1;
|
||||
zend_hash_add(CE_STATIC_MEMBERS(class_type), str_index, str_length, (void**)q, sizeof(zval*), NULL);
|
||||
} else {
|
||||
zval *r;
|
||||
zval *q;
|
||||
|
||||
ALLOC_ZVAL(r);
|
||||
*r = **p;
|
||||
INIT_PZVAL(r);
|
||||
zval_copy_ctor(r);
|
||||
zend_hash_add(CE_STATIC_MEMBERS(class_type), str_index, str_length, (void**)&r, sizeof(zval*), NULL);
|
||||
ALLOC_ZVAL(q);
|
||||
*q = **p;
|
||||
INIT_PZVAL(q);
|
||||
zval_copy_ctor(q);
|
||||
zend_hash_add(CE_STATIC_MEMBERS(class_type), str_index, str_length, (void**)&q, sizeof(zval*), NULL);
|
||||
}
|
||||
zend_hash_move_forward_ex(&class_type->default_static_members, &pos);
|
||||
}
|
||||
@@ -1779,12 +1779,9 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, zend_function_entr
|
||||
efree(lc_class_name);
|
||||
}
|
||||
while (ptr->fname) {
|
||||
fname_len = strlen(ptr->fname);
|
||||
lowercase_name = zend_str_tolower_dup(ptr->fname, fname_len);
|
||||
if (zend_hash_exists(target_function_table, lowercase_name, fname_len+1)) {
|
||||
if (zend_hash_exists(target_function_table, ptr->fname, strlen(ptr->fname)+1)) {
|
||||
zend_error(error_type, "Function registration failed - duplicate name - %s%s%s", scope ? scope->name : "", scope ? "::" : "", ptr->fname);
|
||||
}
|
||||
efree(lowercase_name);
|
||||
ptr++;
|
||||
}
|
||||
zend_unregister_functions(functions, count, target_function_table TSRMLS_CC);
|
||||
@@ -2215,10 +2212,6 @@ static int zend_is_callable_check_func(int check_flags, zval ***zobj_ptr_ptr, ze
|
||||
retval = 0;
|
||||
}
|
||||
}
|
||||
if (!retval && *zobj_ptr_ptr && *ce_ptr && (*ce_ptr)->__call != 0) {
|
||||
retval = (*ce_ptr)->__call != NULL;
|
||||
*fptr_ptr = (*ce_ptr)->__call;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2009 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 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 |
|
||||
|
||||
+12
-34
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2009 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 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 |
|
||||
@@ -148,12 +148,7 @@ static zend_mm_segment* zend_mm_mem_mmap_realloc(zend_mm_storage *storage, zend_
|
||||
{
|
||||
zend_mm_segment *ret;
|
||||
#ifdef HAVE_MREMAP
|
||||
#if defined(__NetBSD__)
|
||||
/* NetBSD 5 supports mremap but takes an extra newp argument */
|
||||
ret = (zend_mm_segment*)mremap(segment, segment->size, segment, size, MREMAP_MAYMOVE);
|
||||
#else
|
||||
ret = (zend_mm_segment*)mremap(segment, segment->size, size, MREMAP_MAYMOVE);
|
||||
#endif
|
||||
if (ret == MAP_FAILED) {
|
||||
#endif
|
||||
ret = storage->handlers->_alloc(storage, size);
|
||||
@@ -169,7 +164,7 @@ static zend_mm_segment* zend_mm_mem_mmap_realloc(zend_mm_storage *storage, zend_
|
||||
|
||||
static void zend_mm_mem_mmap_free(zend_mm_storage *storage, zend_mm_segment* segment)
|
||||
{
|
||||
munmap((void*)segment, segment->size);
|
||||
munmap(segment, segment->size);
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -404,9 +399,9 @@ struct _zend_mm_heap {
|
||||
size_t compact_size;
|
||||
zend_mm_segment *segments_list;
|
||||
zend_mm_storage *storage;
|
||||
size_t real_size;
|
||||
size_t real_size;
|
||||
size_t real_peak;
|
||||
size_t limit;
|
||||
size_t limit;
|
||||
size_t size;
|
||||
size_t peak;
|
||||
size_t reserve_size;
|
||||
@@ -437,8 +432,8 @@ struct _zend_mm_heap {
|
||||
|
||||
#define ZEND_MM_REST_BUCKET(heap) \
|
||||
(zend_mm_free_block*)((char*)&heap->rest_buckets[0] + \
|
||||
sizeof(zend_mm_free_block*) * 2 - \
|
||||
sizeof(zend_mm_small_free_block))
|
||||
sizeof(zend_mm_free_block*) * 2 - \
|
||||
sizeof(zend_mm_small_free_block))
|
||||
|
||||
#if ZEND_MM_COOKIES
|
||||
|
||||
@@ -1066,26 +1061,16 @@ ZEND_API zend_mm_heap *zend_mm_startup_ex(const zend_mm_mem_handlers *handlers,
|
||||
}
|
||||
if (internal) {
|
||||
int i;
|
||||
zend_mm_free_block *p, *q, *orig;
|
||||
zend_mm_free_block *p;
|
||||
zend_mm_heap *mm_heap = _zend_mm_alloc_int(heap, sizeof(zend_mm_heap) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC);
|
||||
|
||||
*mm_heap = *heap;
|
||||
|
||||
p = ZEND_MM_SMALL_FREE_BUCKET(mm_heap, 0);
|
||||
orig = ZEND_MM_SMALL_FREE_BUCKET(heap, 0);
|
||||
for (i = 0; i < ZEND_MM_NUM_BUCKETS; i++) {
|
||||
q = p;
|
||||
while (q->prev_free_block != orig) {
|
||||
q = q->prev_free_block;
|
||||
}
|
||||
q->prev_free_block = p;
|
||||
q = p;
|
||||
while (q->next_free_block != orig) {
|
||||
q = q->next_free_block;
|
||||
}
|
||||
q->next_free_block = p;
|
||||
p->prev_free_block->next_free_block = p;
|
||||
p->next_free_block->prev_free_block = p;
|
||||
p = (zend_mm_free_block*)((char*)p + sizeof(zend_mm_free_block*) * 2);
|
||||
orig = (zend_mm_free_block*)((char*)orig + sizeof(zend_mm_free_block*) * 2);
|
||||
if (mm_heap->large_free_buckets[i]) {
|
||||
mm_heap->large_free_buckets[i]->parent = &mm_heap->large_free_buckets[i];
|
||||
}
|
||||
@@ -1130,10 +1115,7 @@ ZEND_API zend_mm_heap *zend_mm_startup(void)
|
||||
if (tmp) {
|
||||
seg_size = zend_atoi(tmp, 0);
|
||||
if (zend_mm_low_bit(seg_size) != zend_mm_high_bit(seg_size)) {
|
||||
fprintf(stderr, "ZEND_MM_SEG_SIZE must be a power of two\n");
|
||||
exit(255);
|
||||
} else if (seg_size < ZEND_MM_ALIGNED_SEGMENT_SIZE + ZEND_MM_ALIGNED_HEADER_SIZE) {
|
||||
fprintf(stderr, "ZEND_MM_SEG_SIZE is too small\n");
|
||||
fprintf(stderr, "ZEND_MM_SEG_SIZE must be a power ow two.\n");
|
||||
exit(255);
|
||||
}
|
||||
} else {
|
||||
@@ -1809,7 +1791,7 @@ static void *_zend_mm_alloc_int(zend_mm_heap *heap, size_t size ZEND_FILE_LINE_D
|
||||
heap->cache_stat[ZEND_MM_NUM_BUCKETS].miss++;
|
||||
#endif
|
||||
|
||||
best_fit = zend_mm_search_large_block(heap, true_size);
|
||||
best_fit = zend_mm_search_large_block(heap, true_size);
|
||||
|
||||
if (!best_fit && heap->real_size >= heap->limit - heap->block_size) {
|
||||
zend_mm_free_block *p = heap->rest_buckets[0];
|
||||
@@ -2477,11 +2459,7 @@ ZEND_API size_t zend_memory_usage(int real_usage TSRMLS_DC)
|
||||
if (real_usage) {
|
||||
return AG(mm_heap)->real_size;
|
||||
} else {
|
||||
size_t usage = AG(mm_heap)->size;
|
||||
#if ZEND_MM_CACHE
|
||||
usage -= AG(mm_heap)->cached;
|
||||
#endif
|
||||
return usage;
|
||||
return AG(mm_heap)->size;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+18
-19
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2009 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 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 |
|
||||
@@ -78,29 +78,29 @@ ZEND_API size_t _zend_mem_block_size(void *ptr TSRMLS_DC ZEND_FILE_LINE_DC ZEND_
|
||||
|
||||
inline static void * __zend_malloc(size_t len)
|
||||
{
|
||||
void *tmp = malloc(len);
|
||||
if (tmp) {
|
||||
return tmp;
|
||||
}
|
||||
fprintf(stderr, "Out of memory\n");
|
||||
exit(1);
|
||||
void *tmp = malloc(len);
|
||||
if (tmp) {
|
||||
return tmp;
|
||||
}
|
||||
fprintf(stderr, "Out of memory\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
inline static void * __zend_calloc(size_t nmemb, size_t len)
|
||||
{
|
||||
void *tmp = _safe_malloc(nmemb, len, 0);
|
||||
memset(tmp, 0, nmemb * len);
|
||||
return tmp;
|
||||
void *tmp = _safe_malloc(nmemb, len, 0);
|
||||
memset(tmp, 0, len);
|
||||
return tmp;
|
||||
}
|
||||
|
||||
inline static void * __zend_realloc(void *p, size_t len)
|
||||
{
|
||||
p = realloc(p, len);
|
||||
if (p) {
|
||||
return p;
|
||||
}
|
||||
fprintf(stderr, "Out of memory\n");
|
||||
exit(1);
|
||||
p = realloc(p, len);
|
||||
if (p) {
|
||||
return p;
|
||||
}
|
||||
fprintf(stderr, "Out of memory\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
@@ -113,7 +113,6 @@ inline static void * __zend_realloc(void *p, size_t len)
|
||||
#define safe_perealloc(ptr, nmemb, size, offset, persistent) ((persistent)?_safe_realloc((ptr), (nmemb), (size), (offset)):safe_erealloc((ptr), (nmemb), (size), (offset)))
|
||||
#define perealloc_recoverable(ptr, size, persistent) ((persistent)?__zend_realloc((ptr), (size)):erealloc_recoverable((ptr), (size)))
|
||||
#define pestrdup(s, persistent) ((persistent)?strdup(s):estrdup(s))
|
||||
#define pestrndup(s, length, persistent) ((persistent)?zend_strndup((s),(length)):estrndup((s),(length)))
|
||||
|
||||
#define pemalloc_rel(size, persistent) ((persistent)?__zend_malloc(size):emalloc_rel(size))
|
||||
#define pefree_rel(ptr, persistent) ((persistent)?free(ptr):efree_rel(ptr))
|
||||
@@ -200,12 +199,12 @@ ZEND_API size_t _zend_mm_block_size(zend_mm_heap *heap, void *p ZEND_FILE_LINE_D
|
||||
#define zend_mm_alloc(heap, size) _zend_mm_alloc((heap), (size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
|
||||
#define zend_mm_free(heap, p) _zend_mm_free((heap), (p) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
|
||||
#define zend_mm_realloc(heap, p, size) _zend_mm_realloc((heap), (p), (size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
|
||||
#define zend_mm_block_size(heap, p) _zend_mm_block_size((heap), (p) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
|
||||
#define zend_mm_block_size(heap, p) _zend_mm_block_size((heap), (p), ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
|
||||
|
||||
#define zend_mm_alloc_rel(heap, size) _zend_mm_alloc((heap), (size) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC)
|
||||
#define zend_mm_free_rel(heap, p) _zend_mm_free((heap), (p) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC)
|
||||
#define zend_mm_realloc_rel(heap, p, size) _zend_mm_realloc((heap), (p), (size) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC)
|
||||
#define zend_mm_block_size_rel(heap, p) _zend_mm_block_size((heap), (p) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
|
||||
#define zend_mm_block_size_rel(heap, p) _zend_mm_block_size((heap), (p), ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
|
||||
|
||||
/* Heaps with user defined storage */
|
||||
typedef struct _zend_mm_storage zend_mm_storage;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2009 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 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 |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2009 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 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 |
|
||||
@@ -33,7 +33,7 @@ static ZEND_FUNCTION(zend_version);
|
||||
static ZEND_FUNCTION(func_num_args);
|
||||
static ZEND_FUNCTION(func_get_arg);
|
||||
static ZEND_FUNCTION(func_get_args);
|
||||
static ZEND_FUNCTION(strlen);
|
||||
static ZEND_NAMED_FUNCTION(zend_if_strlen);
|
||||
static ZEND_FUNCTION(strcmp);
|
||||
static ZEND_FUNCTION(strncmp);
|
||||
static ZEND_FUNCTION(strcasecmp);
|
||||
@@ -93,7 +93,7 @@ static zend_function_entry builtin_functions[] = {
|
||||
ZEND_FE(func_num_args, NULL)
|
||||
ZEND_FE(func_get_arg, NULL)
|
||||
ZEND_FE(func_get_args, NULL)
|
||||
ZEND_FE(strlen, NULL)
|
||||
{ "strlen", zend_if_strlen, NULL },
|
||||
ZEND_FE(strcmp, NULL)
|
||||
ZEND_FE(strncmp, NULL)
|
||||
ZEND_FE(strcasecmp, NULL)
|
||||
@@ -275,7 +275,7 @@ ZEND_FUNCTION(func_get_args)
|
||||
|
||||
/* {{{ proto int strlen(string str)
|
||||
Get string length */
|
||||
ZEND_FUNCTION(strlen)
|
||||
ZEND_NAMED_FUNCTION(zend_if_strlen)
|
||||
{
|
||||
zval **str;
|
||||
|
||||
@@ -454,53 +454,35 @@ ZEND_FUNCTION(error_reporting)
|
||||
Define a new constant */
|
||||
ZEND_FUNCTION(define)
|
||||
{
|
||||
char *name;
|
||||
int name_len;
|
||||
zval *val;
|
||||
zval *val_free = NULL;
|
||||
zend_bool non_cs = 0;
|
||||
int case_sensitive = CONST_CS;
|
||||
zval **var, **val, **non_cs, *val_free = NULL;
|
||||
int case_sensitive;
|
||||
zend_constant c;
|
||||
char *p;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz|b", &name, &name_len, &val, &non_cs) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(non_cs) {
|
||||
case_sensitive = 0;
|
||||
}
|
||||
|
||||
/* class constant, check if there is name and make sure class is valid & exists */
|
||||
if ((p = zend_memnstr(name, "::", sizeof("::") - 1, name + name_len))) {
|
||||
char *class_name;
|
||||
int found;
|
||||
zend_class_entry **ce;
|
||||
ALLOCA_FLAG(use_heap)
|
||||
|
||||
if (p == (name + name_len - sizeof("::") + 1)) {
|
||||
zend_error(E_WARNING, "Class constant must have a name");
|
||||
RETURN_FALSE;
|
||||
} else if (p == name) {
|
||||
zend_error(E_WARNING, "Missing class name");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
class_name = do_alloca_with_limit((p - name + 1), use_heap);
|
||||
zend_str_tolower_copy(class_name, name, (p - name));
|
||||
|
||||
found = zend_hash_find(EG(class_table), class_name, p - name + 1, (void **) &ce);
|
||||
|
||||
if (found != SUCCESS) {
|
||||
zend_error(E_WARNING, "Class '%s' does not exist", class_name);
|
||||
free_alloca_with_limit(class_name, use_heap);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
free_alloca_with_limit(class_name, use_heap);
|
||||
switch (ZEND_NUM_ARGS()) {
|
||||
case 2:
|
||||
if (zend_get_parameters_ex(2, &var, &val)==FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
case_sensitive = CONST_CS;
|
||||
break;
|
||||
case 3:
|
||||
if (zend_get_parameters_ex(3, &var, &val, &non_cs)==FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
convert_to_long_ex(non_cs);
|
||||
if (Z_LVAL_PP(non_cs)) {
|
||||
case_sensitive = 0;
|
||||
} else {
|
||||
case_sensitive = CONST_CS;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
break;
|
||||
}
|
||||
|
||||
repeat:
|
||||
switch (Z_TYPE_P(val)) {
|
||||
switch (Z_TYPE_PP(val)) {
|
||||
case IS_LONG:
|
||||
case IS_DOUBLE:
|
||||
case IS_STRING:
|
||||
@@ -510,13 +492,13 @@ repeat:
|
||||
break;
|
||||
case IS_OBJECT:
|
||||
if (!val_free) {
|
||||
if (Z_OBJ_HT_P(val)->get) {
|
||||
val_free = val = Z_OBJ_HT_P(val)->get(val TSRMLS_CC);
|
||||
if (Z_OBJ_HT_PP(val)->get) {
|
||||
val_free = *val = Z_OBJ_HT_PP(val)->get(*val TSRMLS_CC);
|
||||
goto repeat;
|
||||
} else if (Z_OBJ_HT_P(val)->cast_object) {
|
||||
} else if (Z_OBJ_HT_PP(val)->cast_object) {
|
||||
ALLOC_INIT_ZVAL(val_free);
|
||||
if (Z_OBJ_HT_P(val)->cast_object(val, val_free, IS_STRING TSRMLS_CC) == SUCCESS) {
|
||||
val = val_free;
|
||||
if (Z_OBJ_HT_PP(val)->cast_object(*val, val_free, IS_STRING TSRMLS_CC) == SUCCESS) {
|
||||
val = &val_free;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -529,15 +511,16 @@ repeat:
|
||||
}
|
||||
RETURN_FALSE;
|
||||
}
|
||||
convert_to_string_ex(var);
|
||||
|
||||
c.value = *val;
|
||||
c.value = **val;
|
||||
zval_copy_ctor(&c.value);
|
||||
if (val_free) {
|
||||
zval_ptr_dtor(&val_free);
|
||||
}
|
||||
c.flags = case_sensitive; /* non persistent */
|
||||
c.name = zend_strndup(name, name_len);
|
||||
c.name_len = name_len+1;
|
||||
c.name = zend_strndup(Z_STRVAL_PP(var), Z_STRLEN_PP(var));
|
||||
c.name_len = Z_STRLEN_PP(var)+1;
|
||||
c.module_number = PHP_USER_CONSTANT;
|
||||
if (zend_register_constant(&c TSRMLS_CC) == SUCCESS) {
|
||||
RETURN_TRUE;
|
||||
@@ -727,6 +710,8 @@ ZEND_FUNCTION(is_a)
|
||||
/* {{{ add_class_vars */
|
||||
static void add_class_vars(zend_class_entry *ce, HashTable *properties, zval *return_value TSRMLS_DC)
|
||||
{
|
||||
int instanceof = EG(scope) && instanceof_function(EG(scope), ce TSRMLS_CC);
|
||||
|
||||
if (zend_hash_num_elements(properties) > 0) {
|
||||
HashPosition pos;
|
||||
zval **prop;
|
||||
@@ -736,22 +721,19 @@ static void add_class_vars(zend_class_entry *ce, HashTable *properties, zval *re
|
||||
char *key, *class_name, *prop_name;
|
||||
uint key_len;
|
||||
ulong num_index;
|
||||
int prop_name_len = 0;
|
||||
zval *prop_copy;
|
||||
zend_property_info *property_info;
|
||||
zval zprop_name;
|
||||
|
||||
zend_hash_get_current_key_ex(properties, &key, &key_len, &num_index, 0, &pos);
|
||||
zend_hash_move_forward_ex(properties, &pos);
|
||||
|
||||
zend_unmangle_property_name(key, key_len-1, &class_name, &prop_name);
|
||||
prop_name_len = strlen(prop_name);
|
||||
|
||||
ZVAL_STRINGL(&zprop_name, prop_name, prop_name_len, 0);
|
||||
property_info = zend_get_property_info(ce, &zprop_name, 1 TSRMLS_CC);
|
||||
|
||||
if (!property_info || property_info == &EG(std_property_info)) {
|
||||
continue;
|
||||
if (class_name) {
|
||||
if (class_name[0] != '*' && strcmp(class_name, ce->name)) {
|
||||
/* filter privates from base classes */
|
||||
continue;
|
||||
} else if (!instanceof) {
|
||||
/* filter protected if not inside class */
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
/* copy: enforce read only access */
|
||||
@@ -1516,7 +1498,6 @@ ZEND_FUNCTION(create_function)
|
||||
zend_hash_del(EG(function_table), LAMBDA_TEMP_FUNCNAME, sizeof(LAMBDA_TEMP_FUNCNAME));
|
||||
RETURN_STRINGL(function_name, function_name_length, 0);
|
||||
} else {
|
||||
zend_hash_del(EG(function_table), LAMBDA_TEMP_FUNCNAME, sizeof(LAMBDA_TEMP_FUNCNAME));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
}
|
||||
@@ -1619,15 +1600,15 @@ ZEND_FUNCTION(get_loaded_extensions)
|
||||
Return an array containing the names and values of all defined constants */
|
||||
ZEND_FUNCTION(get_defined_constants)
|
||||
{
|
||||
zend_bool categorize = 0;
|
||||
int argc = ZEND_NUM_ARGS();
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|b", &categorize) == FAILURE) {
|
||||
return;
|
||||
if (argc != 0 && argc != 1) {
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
}
|
||||
|
||||
array_init(return_value);
|
||||
|
||||
if (categorize) {
|
||||
if (argc) {
|
||||
HashPosition pos;
|
||||
zend_constant *val;
|
||||
int module_number;
|
||||
@@ -1642,8 +1623,7 @@ ZEND_FUNCTION(get_defined_constants)
|
||||
module_names[0] = "internal";
|
||||
zend_hash_internal_pointer_reset_ex(&module_registry, &pos);
|
||||
while (zend_hash_get_current_data_ex(&module_registry, (void *) &module, &pos) != FAILURE) {
|
||||
module_names[module->module_number] = module->name;
|
||||
i++;
|
||||
module_names[i++] = module->name;
|
||||
zend_hash_move_forward_ex(&module_registry, &pos);
|
||||
}
|
||||
module_names[i] = "user";
|
||||
|
||||
Loaded 100 of 4697 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user