mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-09 02:00:49 +00:00
Compare commits
9
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
12a6ea6fff | ||
|
|
7644cb4436 | ||
|
|
2a24558178 | ||
|
|
2637ce9fb0 | ||
|
|
38faa59bc4 | ||
|
|
57bf3eb6ca | ||
|
|
0e9fe5a2c2 | ||
|
|
29acd17ec2 | ||
|
|
7d14f70776 |
No files matched your search
@@ -1,8 +1,8 @@
|
||||
define ____executor_globals
|
||||
if basic_functions_module.zts
|
||||
set $tsrm_ls = ts_resource_ex(0, 0)
|
||||
set $eg = ((zend_executor_globals*) (*((void ***) $tsrm_ls))[executor_globals_id-1])
|
||||
set $cg = ((zend_compiler_globals*) (*((void ***) $tsrm_ls))[compiler_globals_id-1])
|
||||
set $eg = ((zend_executor_globals) (*((void ***) $tsrm_ls))[executor_globals_id-1])
|
||||
set $cg = ((zend_compiler_globals) (*((void ***) $tsrm_ls))[compiler_globals_id-1])
|
||||
else
|
||||
set $eg = executor_globals
|
||||
set $cg = compiler_globals
|
||||
|
||||
-173
@@ -1,173 +0,0 @@
|
||||
ext/mysqlnd/mysqlnd.h ident
|
||||
ext/simplexml/simplexml.c ident
|
||||
ext/iconv/php_iconv.h ident
|
||||
ext/posix/posix.c ident
|
||||
ext/recode/recode.c ident
|
||||
ext/skeleton/create_stubs ident
|
||||
ext/phar/phar/pharcommand.inc ident
|
||||
ext/phar/phar.c ident
|
||||
ext/sysvmsg/sysvmsg.c ident
|
||||
ext/enchant/enchant.c ident
|
||||
ext/reflection/php_reflection.c ident
|
||||
ext/oci8/oci8.c ident
|
||||
ext/dba/libinifile/inifile.c ident
|
||||
ext/dba/libflatfile/flatfile.c ident
|
||||
ext/dba/libcdb/cdb_make.c ident
|
||||
ext/dba/libcdb/cdb.c ident
|
||||
ext/filter/filter.c ident
|
||||
README.input_filter ident
|
||||
run-tests.php ident
|
||||
sapi/nsapi/nsapi.c ident
|
||||
sapi/continuity/capi.c ident
|
||||
Zend/RFCs/002.txt ident
|
||||
Zend/RFCs/003.txt ident
|
||||
NEWS merge=NEWS
|
||||
/ext/bz2/tests/005.phpt -crlf
|
||||
/ext/dom/tests/dom005.phpt -crlf
|
||||
/ext/dom/tests/DOMImplementation_createDocumentType_basic.phpt -crlf
|
||||
/ext/ereg/tests/009.phpt -crlf
|
||||
/ext/iconv/tests/eucjp2sjis.phpt -crlf
|
||||
/ext/iconv/tests/eucjp2utf8.phpt -crlf
|
||||
/ext/iconv/tests/iconv_stream_filter_delimiter.phpt -crlf
|
||||
/ext/iconv/tests/iconv_stream_filter.phpt -crlf
|
||||
/ext/mbstring/tests/mb_split-compat-01.phpt -crlf
|
||||
/ext/phar/tests/005.phpt -crlf
|
||||
/ext/phar/tests/phar_commitwrite.phpt -crlf
|
||||
/ext/phar/tests/phar_create_in_cwd.phpt -crlf
|
||||
/ext/phar/tests/phar_mount.phpt -crlf
|
||||
/ext/reflection/tests/009.phpt -crlf
|
||||
/ext/reflection/tests/025.phpt -crlf
|
||||
/ext/standard/tests/general_functions/highlight_heredoc.phpt -crlf
|
||||
/ext/standard/tests/general_functions/parse_ini_file.phpt -crlf
|
||||
/ext/standard/tests/general_functions/parse_ini_string_002.phpt -crlf
|
||||
/ext/standard/tests/strings/006.phpt -crlf
|
||||
/ext/standard/tests/strings/addslashes_variation2.phpt -crlf
|
||||
/ext/standard/tests/strings/addslashes_variation3.phpt -crlf
|
||||
/ext/standard/tests/strings/bug21453.phpt -crlf
|
||||
/ext/standard/tests/strings/chop_variation3.phpt -crlf
|
||||
/ext/standard/tests/strings/chunk_split_variation11.phpt -crlf
|
||||
/ext/standard/tests/strings/chunk_split_variation12.phpt -crlf
|
||||
/ext/standard/tests/strings/chunk_split_variation4.phpt -crlf
|
||||
/ext/standard/tests/strings/crc32_variation2.phpt -crlf
|
||||
/ext/standard/tests/strings/crc32_variation3.phpt -crlf
|
||||
/ext/standard/tests/strings/crc32_variation4.phpt -crlf
|
||||
/ext/standard/tests/strings/highlight_file.phpt -crlf
|
||||
/ext/standard/tests/strings/htmlentities_html4.phpt -crlf
|
||||
/ext/standard/tests/strings/lcfirst.phpt -crlf
|
||||
/ext/standard/tests/strings/ltrim.phpt -crlf
|
||||
/ext/standard/tests/strings/nl2br_variation2.phpt -crlf
|
||||
/ext/standard/tests/strings/php_strip_whitespace.phpt -crlf
|
||||
/ext/standard/tests/strings/rtrim.phpt -crlf
|
||||
/ext/standard/tests/strings/sprintf_f_2.phpt -crlf
|
||||
/ext/standard/tests/strings/sprintf_variation15.phpt -crlf
|
||||
/ext/standard/tests/strings/strcspn_variation6.phpt -crlf
|
||||
/ext/standard/tests/strings/strcspn_variation7.phpt -crlf
|
||||
/ext/standard/tests/strings/strcspn_variation8.phpt -crlf
|
||||
/ext/standard/tests/strings/stripos_variation1.phpt -crlf
|
||||
/ext/standard/tests/strings/stripos_variation3.phpt -crlf
|
||||
/ext/standard/tests/strings/stripos_variation4.phpt -crlf
|
||||
/ext/standard/tests/strings/stripos_variation5.phpt -crlf
|
||||
/ext/standard/tests/strings/stripos_variation6.phpt -crlf
|
||||
/ext/standard/tests/strings/stripslashes_variation2.phpt -crlf
|
||||
/ext/standard/tests/strings/stripslashes_variation3.phpt -crlf
|
||||
/ext/standard/tests/strings/stripslashes_variation4.phpt -crlf
|
||||
/ext/standard/tests/strings/stripslashes_variation5.phpt -crlf
|
||||
/ext/standard/tests/strings/str_ireplace.phpt -crlf
|
||||
/ext/standard/tests/strings/strnatcmp_basic.phpt -crlf
|
||||
/ext/standard/tests/strings/strncasecmp_variation9.phpt -crlf
|
||||
/ext/standard/tests/strings/strpos.phpt -crlf
|
||||
/ext/standard/tests/strings/strrchr_variation1.phpt -crlf
|
||||
/ext/standard/tests/strings/strrchr_variation2.phpt -crlf
|
||||
/ext/standard/tests/strings/strrchr_variation3.phpt -crlf
|
||||
/ext/standard/tests/strings/strrchr_variation4.phpt -crlf
|
||||
/ext/standard/tests/strings/strrchr_variation6.phpt -crlf
|
||||
/ext/standard/tests/strings/strrchr_variation7.phpt -crlf
|
||||
/ext/standard/tests/strings/str_replace.phpt -crlf
|
||||
/ext/standard/tests/strings/strrev_variation3.phpt -crlf
|
||||
/ext/standard/tests/strings/strrev_variation4.phpt -crlf
|
||||
/ext/standard/tests/strings/strripos_variation1.phpt -crlf
|
||||
/ext/standard/tests/strings/strripos_variation2.phpt -crlf
|
||||
/ext/standard/tests/strings/strripos_variation3.phpt -crlf
|
||||
/ext/standard/tests/strings/strripos_variation4.phpt -crlf
|
||||
/ext/standard/tests/strings/strripos_variation5.phpt -crlf
|
||||
/ext/standard/tests/strings/strrpos_variation1.phpt -crlf
|
||||
/ext/standard/tests/strings/strrpos_variation2.phpt -crlf
|
||||
/ext/standard/tests/strings/strrpos_variation3.phpt -crlf
|
||||
/ext/standard/tests/strings/strrpos_variation4.phpt -crlf
|
||||
/ext/standard/tests/strings/strrpos_variation5.phpt -crlf
|
||||
/ext/standard/tests/strings/strrpos_variation6.phpt -crlf
|
||||
/ext/standard/tests/strings/strspn_variation5.phpt -crlf
|
||||
/ext/standard/tests/strings/strspn_variation6.phpt -crlf
|
||||
/ext/standard/tests/strings/strspn_variation7.phpt -crlf
|
||||
/ext/standard/tests/strings/strspn_variation8.phpt -crlf
|
||||
/ext/standard/tests/strings/strstr.phpt -crlf
|
||||
/ext/standard/tests/strings/strtok_variation1.phpt -crlf
|
||||
/ext/standard/tests/strings/strtok_variation3.phpt -crlf
|
||||
/ext/standard/tests/strings/strtr_variation1.phpt -crlf
|
||||
/ext/standard/tests/strings/strtr_variation2.phpt -crlf
|
||||
/ext/standard/tests/strings/str_word_count.phpt -crlf
|
||||
/ext/standard/tests/strings/trim1.phpt -crlf
|
||||
/ext/standard/tests/strings/ucfirst.phpt -crlf
|
||||
/ext/standard/tests/strings/vfprintf_variation10.phpt -crlf
|
||||
/ext/standard/tests/strings/vfprintf_variation12.phpt -crlf
|
||||
/ext/standard/tests/strings/vfprintf_variation16.phpt -crlf
|
||||
/ext/standard/tests/strings/vfprintf_variation18.phpt -crlf
|
||||
/ext/standard/tests/strings/vfprintf_variation4.phpt -crlf
|
||||
/ext/standard/tests/strings/vfprintf_variation6.phpt -crlf
|
||||
/ext/standard/tests/strings/vfprintf_variation7.phpt -crlf
|
||||
/ext/standard/tests/strings/vfprintf_variation8.phpt -crlf
|
||||
/ext/standard/tests/strings/vprintf_variation10.phpt -crlf
|
||||
/ext/standard/tests/strings/vprintf_variation12.phpt -crlf
|
||||
/ext/standard/tests/strings/vprintf_variation14.phpt -crlf
|
||||
/ext/standard/tests/strings/vprintf_variation18.phpt -crlf
|
||||
/ext/standard/tests/strings/vprintf_variation4.phpt -crlf
|
||||
/ext/standard/tests/strings/vprintf_variation6.phpt -crlf
|
||||
/ext/standard/tests/strings/vprintf_variation7.phpt -crlf
|
||||
/ext/standard/tests/strings/vprintf_variation8.phpt -crlf
|
||||
/ext/standard/tests/strings/vsprintf_variation10.phpt -crlf
|
||||
/ext/standard/tests/strings/vsprintf_variation12.phpt -crlf
|
||||
/ext/standard/tests/strings/vsprintf_variation14.phpt -crlf
|
||||
/ext/standard/tests/strings/vsprintf_variation16.phpt -crlf
|
||||
/ext/standard/tests/strings/vsprintf_variation4.phpt -crlf
|
||||
/ext/standard/tests/strings/vsprintf_variation6.phpt -crlf
|
||||
/ext/standard/tests/strings/vsprintf_variation7.phpt -crlf
|
||||
/ext/standard/tests/strings/vsprintf_variation8.phpt -crlf
|
||||
/ext/standard/tests/strings/wordwrap.phpt -crlf
|
||||
/ext/tidy/tests/010.phpt -crlf
|
||||
/ext/tidy/tests/012.phpt -crlf
|
||||
/ext/tidy/tests/025.phpt -crlf
|
||||
/ext/tidy/tests/030.phpt -crlf
|
||||
/ext/tokenizer/tests/bug26463.phpt -crlf
|
||||
/ext/tokenizer/tests/token_get_all_variation12.phpt -crlf
|
||||
/ext/tokenizer/tests/token_get_all_variation13.phpt -crlf
|
||||
/ext/tokenizer/tests/token_get_all_variation14.phpt -crlf
|
||||
/ext/tokenizer/tests/token_get_all_variation15.phpt -crlf
|
||||
/ext/tokenizer/tests/token_get_all_variation16.phpt -crlf
|
||||
/ext/tokenizer/tests/token_get_all_variation17.phpt -crlf
|
||||
/ext/tokenizer/tests/token_get_all_variation18.phpt -crlf
|
||||
/ext/tokenizer/tests/token_get_all_variation19.phpt -crlf
|
||||
/ext/tokenizer/tests/token_get_all_variation4.phpt -crlf
|
||||
/ext/tokenizer/tests/token_get_all_variation5.phpt -crlf
|
||||
/ext/tokenizer/tests/token_get_all_variation6.phpt -crlf
|
||||
/ext/tokenizer/tests/token_get_all_variation7.phpt -crlf
|
||||
/ext/tokenizer/tests/token_get_all_variation8.phpt -crlf
|
||||
/ext/tokenizer/tests/token_get_all_variation9.phpt -crlf
|
||||
/ext/xml/tests/bug26614_libxml.phpt -crlf
|
||||
/ext/xmlwriter/tests/004.phpt -crlf
|
||||
/ext/xmlwriter/tests/OO_004.phpt -crlf
|
||||
/ext/zlib/tests/005.phpt -crlf
|
||||
/ext/zlib/tests/gzfile_basic2.phpt -crlf
|
||||
/ext/zlib/tests/gzfile_basic.phpt -crlf
|
||||
/ext/zlib/tests/gzfilegzreadfile.phpt -crlf
|
||||
/ext/zlib/tests/readgzfile_basic2.phpt -crlf
|
||||
/ext/zlib/tests/readgzfile_basic.phpt -crlf
|
||||
/sapi/cli/tests/014.phpt -crlf
|
||||
/tests/run-test/test010.phpt -crlf
|
||||
/Zend/tests/bug35655.phpt -crlf
|
||||
/Zend/tests/bug48930.phpt -crlf
|
||||
/Zend/tests/bug61095.phpt -crlf
|
||||
/Zend/tests/heredoc_017.phpt -crlf
|
||||
/Zend/tests/heredoc_018.phpt -crlf
|
||||
/Zend/tests/nowdoc_013.phpt -crlf
|
||||
/Zend/tests/nowdoc_014.phpt -crlf
|
||||
/Zend/tests/nowdoc_015.phpt -crlf
|
||||
-254
@@ -1,254 +0,0 @@
|
||||
# General Ignores
|
||||
*~
|
||||
.#*
|
||||
*.
|
||||
*.slo
|
||||
*.mk
|
||||
*.mem
|
||||
*.gcda
|
||||
*.gcno
|
||||
*.la
|
||||
*.lo
|
||||
*.o
|
||||
*.a
|
||||
*.ncb
|
||||
*.opt
|
||||
*.plg
|
||||
*swp
|
||||
*.patch
|
||||
*.tgz
|
||||
*.tar.gz
|
||||
*.tar.bz2
|
||||
.FBCIndex
|
||||
.FBCLockFolder
|
||||
.deps
|
||||
.libs
|
||||
phpt.*
|
||||
core
|
||||
dynlib.m4
|
||||
Debug
|
||||
Debug_TS
|
||||
Makefile
|
||||
Makefile.fragments
|
||||
Makefile.objects
|
||||
Release
|
||||
Release_TS
|
||||
Release_TSDbg
|
||||
Release_TS_inline
|
||||
Release_inline
|
||||
ZendEngine1
|
||||
_libs
|
||||
acconfig.h
|
||||
aclocal.m4
|
||||
autom4te.cache
|
||||
bsd_converted
|
||||
buildconf.stamp
|
||||
buildmk.stamp
|
||||
confdefs.h
|
||||
config.h
|
||||
config.guess
|
||||
config.cache
|
||||
config.h.in
|
||||
config.log
|
||||
config.nice
|
||||
config.nice.bat
|
||||
config.status
|
||||
config.sub
|
||||
config_vars.mk
|
||||
configuration-parser.c
|
||||
configuration-parser.h
|
||||
configuration-parser.output
|
||||
configuration-scanner.c
|
||||
configure
|
||||
configure.bat
|
||||
configure.js
|
||||
conftest
|
||||
conftest.c
|
||||
debug.log
|
||||
diff
|
||||
generated_lists
|
||||
include
|
||||
install-sh
|
||||
internal_functions.c
|
||||
lcov_data
|
||||
lcov_html
|
||||
libs
|
||||
libtool
|
||||
meta_cc
|
||||
meta_ccld
|
||||
missing
|
||||
mkinstalldirs
|
||||
modules
|
||||
php
|
||||
php-*.tar.gz
|
||||
php5.spec
|
||||
php_lcov.info
|
||||
php_test_results_*.txt
|
||||
php_version.h
|
||||
results.txt
|
||||
shlibtool
|
||||
stamp-h
|
||||
test.php3
|
||||
tmp-php.ini
|
||||
want_dependencies
|
||||
x64
|
||||
stamp-h.in
|
||||
scan_makefile_in.awk
|
||||
TSRM/tsrm_config.h
|
||||
Zend/zend_config.h
|
||||
Zend/zend_ini_parser.c
|
||||
Zend/zend_ini_parser.h
|
||||
Zend/zend_ini_parser.output
|
||||
Zend/zend_language_parser.c
|
||||
Zend/zend_language_parser.h
|
||||
Zend/zend_language_parser.output
|
||||
ext/date/lib/timelib_config.h
|
||||
ext/iconv/php_iconv_aliased_libiconv.h
|
||||
ext/phar/phar.php
|
||||
main/php_config.h
|
||||
main/php_config.h.in
|
||||
|
||||
# Test specific Ignores
|
||||
tests/*/*.diff
|
||||
tests/*/*.out
|
||||
tests/*/*.php
|
||||
tests/*/*.exp
|
||||
tests/*/*.log
|
||||
tests/*/*.sh
|
||||
*/tests/*.diff
|
||||
*/tests/*.out
|
||||
*/tests/*.php
|
||||
*/tests/*.exp
|
||||
*/tests/*.log
|
||||
*/tests/*.sh
|
||||
*/tests/*/*.diff
|
||||
*/tests/*/*.out
|
||||
*/tests/*/*.php
|
||||
*/tests/*/*.exp
|
||||
*/tests/*/*.log
|
||||
*/tests/*/*.sh
|
||||
*/*/tests/*.diff
|
||||
*/*/tests/*.out
|
||||
*/*/tests/*.php
|
||||
*/*/tests/*.exp
|
||||
*/*/tests/*.log
|
||||
*/*/tests/*.sh
|
||||
*/*/tests/*/*.diff
|
||||
*/*/tests/*/*.out
|
||||
*/*/tests/*/*.php
|
||||
*/*/tests/*/*.exp
|
||||
*/*/tests/*/*.log
|
||||
*/*/tests/*/*.sh
|
||||
|
||||
# Extension specifc ignores
|
||||
ext/*/configure.in
|
||||
ext/*/ltmain.sh
|
||||
ext/*/libs.mk
|
||||
ext/*/build
|
||||
ext/*/scan_makefile_in.awk
|
||||
ext/*/Makefile.global
|
||||
ext/*/acinclude.m4
|
||||
ext/*/config.sub
|
||||
|
||||
# Extension specific
|
||||
ext/iconv/scan_makefile_in.awk
|
||||
ext/iconv/php_have_bsd_iconv.h
|
||||
ext/iconv/php_have_ibm_iconv.h
|
||||
ext/iconv/php_have_libiconv.h
|
||||
ext/iconv/php_php_iconv_h_path.h
|
||||
ext/iconv/php_have_glibc_iconv.h
|
||||
ext/iconv/php_php_iconv_impl.h
|
||||
ext/iconv/php_have_iconv.h
|
||||
ext/iconv/php_iconv_supports_errno.h
|
||||
ext/mbstring/libmbfl/Makefile.in
|
||||
ext/mbstring/libmbfl/autoscan.log
|
||||
ext/mbstring/libmbfl/config.sub
|
||||
ext/mbstring/libmbfl/depcomp
|
||||
ext/mbstring/libmbfl/ltmain.sh
|
||||
ext/mbstring/libmbfl/stamp-h1
|
||||
ext/mbstring/libmbfl/*.dll
|
||||
ext/mbstring/libmbfl/*.lib
|
||||
ext/mbstring/libmbfl/*.RES
|
||||
ext/mbstring/libmbfl/*.res
|
||||
ext/mbstring/libmbfl/*.obj
|
||||
ext/mbstring/libmbfl/*.tds
|
||||
ext/mbstring/libmbfl/filters/Makefile.in
|
||||
ext/mbstring/libmbfl/mbfl/Makefile.in
|
||||
ext/mbstring/libmbfl/mbfl/EastAsianWidth.txt
|
||||
ext/mbstring/libmbfl/nls/Makefile.in
|
||||
ext/mssql/#*#
|
||||
ext/mssql/Makefile.global
|
||||
ext/mssql/acinclude.m4
|
||||
ext/mssql/config.sub
|
||||
ext/mssql/configure.in
|
||||
ext/mssql/ltmain.sh
|
||||
ext/mysql/weztest.sqlite
|
||||
ext/oci8/tests/*.tmp
|
||||
ext/oci8/tests/*.vglog
|
||||
ext/pdo/conftest*
|
||||
ext/pdo/tests/*.db
|
||||
ext/pdo/tests/*.tmp
|
||||
ext/pdo_firebird/conftest*
|
||||
ext/pdo_mysql/conftest*
|
||||
ext/pdo_mysql/tests/*.db
|
||||
ext/pdo_mysql/tests/*.tmp
|
||||
ext/pdo_oci/conftest*
|
||||
ext/pdo_odbc/tests/*.db
|
||||
ext/pdo_odbc/tests/*.tmp
|
||||
ext/pdo_odbc/tests/*.mdb
|
||||
ext/pdo_pgsql/conftest*
|
||||
ext/pdo_pgsql/tests/*.db
|
||||
ext/pdo_pgsql/tests/*.tmp
|
||||
ext/pdo_sqlite/conftest*
|
||||
ext/pdo_sqlite/sqlite3.h
|
||||
ext/pdo_sqlite/tests/*.db
|
||||
ext/pdo_sqlite/tests/*.tmp
|
||||
ext/phar/phar.phar
|
||||
ext/pspell/tests/*.tmp
|
||||
ext/reflection/xml
|
||||
ext/reflection/html
|
||||
ext/reflection/spl.chm
|
||||
ext/simplexml/examples/security.new.xml
|
||||
ext/spl/examples/.htaccess
|
||||
ext/spl/examples/*.phps
|
||||
ext/sqlite/weztest.sqlite
|
||||
ext/sqlite/libsqlite/src/sqlite.h
|
||||
ext/sqlite/libsqlite/src/parse.out
|
||||
ext/sqlite/libsqlite/src/libsqlite.dsw
|
||||
ext/sqlite3/tests/phpsql*
|
||||
ext/sqlite3/tests/*.db
|
||||
ext/sqlite3/tests/*.tmp
|
||||
ext/standard/tests/misc/*.txt
|
||||
ext/standard/tests/strings/*.txt
|
||||
main/build-defs.h
|
||||
main/internal_functions_cli.c
|
||||
main/config.w32.h
|
||||
main/stamp-h1
|
||||
main/streams/build-defs.h
|
||||
main/streams/stamp-h1
|
||||
pear/install-pear-nozlib.phar
|
||||
pear/phpize
|
||||
pear/run-tests
|
||||
pear/php-config
|
||||
pear/scripts
|
||||
sapi/apache/libphp5.module
|
||||
sapi/apache2handler/libphp5.module
|
||||
sapi/apache_hooks/libphp5.module
|
||||
sapi/cgi/php-cgi
|
||||
sapi/cli/php.1
|
||||
sapi/fpm/php-fpm
|
||||
sapi/fpm/php-fpm.1
|
||||
sapi/fpm/init.d.php-fpm
|
||||
sapi/fpm/php-fpm.conf
|
||||
sapi/fpm/fpm/php-cgi
|
||||
scripts/php-config
|
||||
scripts/phpize
|
||||
scripts/man1/*.1
|
||||
win32/*.suo
|
||||
win32/*.aps
|
||||
win32/*.positions
|
||||
win32/ext
|
||||
win32/phpts.def
|
||||
win32/wsyslog.h
|
||||
win32/win32.dsp
|
||||
win32/php.dsw
|
||||
+1
-1
@@ -337,7 +337,7 @@ MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: curl
|
||||
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>, Ilia Alshanetsky <iliaa@php.net>, Pierrick Charron <pierrick@php.net>
|
||||
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>,Ilia Alshanetsky <iliaa@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 4.0.2
|
||||
|
||||
+1
-2
@@ -12,8 +12,7 @@ php_lcov.info: lcov-test
|
||||
@rm -rf lcov_data/
|
||||
@$(mkinstalldirs) lcov_data/
|
||||
@echo
|
||||
-@files=`find . -name \*.gcda -o -name \*.gcno -o -name \*.da -o -name \*.h | sed -e 's/^\.\///' | sed -e 's/\.gcda//g' -e 's/\.gcno//g' -e 's/\.da//g' | uniq` ;\
|
||||
for x in $$files; do \
|
||||
-@find . -name \*.gcda -o -name \*.gcno -o -name \*.da -o -name \*.h | sed -e 's/^\.\///' | sed -e 's/\.gcda//g' -e 's/\.gcno//g' -e 's/\.da//g' | uniq | while read x; do \
|
||||
echo -n . ;\
|
||||
y=`echo $$x | sed -e 's!\.libs/!!'`; \
|
||||
dir=lcov_data/`dirname $$x`; \
|
||||
|
||||
@@ -1,124 +0,0 @@
|
||||
====================
|
||||
Git Commit Rules
|
||||
====================
|
||||
|
||||
This is the first file you should be reading when contributing code via Git.
|
||||
We'll assume you're basically familiar with Git, but feel free to post
|
||||
your questions on the mailing list. Please have a look at
|
||||
http://git-scm.com/ for more detailed information on Git.
|
||||
|
||||
PHP is developed through the efforts of a large number of people.
|
||||
Collaboration is a Good Thing(tm), and Git lets us do this. Thus, following
|
||||
some basic rules with regards to Git usage will::
|
||||
|
||||
a. Make everybody happier, especially those responsible for maintaining
|
||||
Git 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::
|
||||
|
||||
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.
|
||||
|
||||
3. Look at EXTENSIONS file to see who is the primary maintainer of
|
||||
the code you want to contribute to.
|
||||
|
||||
4. If you "strongly disagree" about something another person did, don't
|
||||
start fighting publicly - take it up in private email.
|
||||
|
||||
5. If you don't know how to do something, ask first!
|
||||
|
||||
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 those who need that.
|
||||
|
||||
Currently we have the following branches in use::
|
||||
|
||||
master The active development branch.
|
||||
|
||||
PHP-5.4 Is used to release the PHP 5.4.x series. It still allows for
|
||||
larger enhancements.
|
||||
|
||||
PHP-5.3 Is used to release the PHP 5.3.x series. This is current
|
||||
stable version and is open for bugfixes only.
|
||||
|
||||
PHP-5.2 Is used to release the PHP 5.2.x series. It is closed for
|
||||
changes now.
|
||||
|
||||
PHP-5.1 This branch is closed.
|
||||
|
||||
PHP-4.4 This branch is closed.
|
||||
|
||||
The next few rules are more of a technical nature::
|
||||
|
||||
1. All changes should first go to the lowest branch (i.e. 5.3) and then
|
||||
get merged up to all other branches. If a change is not needed for
|
||||
later branches (i.e. fixes for features which where dropped from later
|
||||
branches) an empty merge should be done.
|
||||
|
||||
2. 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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
6. If you modified a function that is callable from PHP, prepend PHP to
|
||||
the function name as shown below.
|
||||
|
||||
|
||||
The format of the commit messages is pretty simple.
|
||||
|
||||
<max 79 characters short description>\n
|
||||
\n
|
||||
<long description, 79 chars per line>
|
||||
\n
|
||||
|
||||
An Example from the git project (commit 2b34e486bc):
|
||||
|
||||
pack-objects: Fix compilation with NO_PTHREDS
|
||||
|
||||
It looks like commit 99fb6e04 (pack-objects: convert to use
|
||||
parse_options(), 2012-02-01) moved the #ifdef NO_PTHREDS around but
|
||||
hasn't noticed that the 'arg' variable no longer is available.
|
||||
|
||||
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::
|
||||
|
||||
Fixed bug #14016 (pgsql notice handler double free crash bug.)
|
||||
|
||||
When you change the NEWS file for a bug fix, then please keep the bugs
|
||||
sorted in decreasing order under the fixed version.
|
||||
|
||||
You can use OpenGrok (http://lxr.php.net/) and gitweb (http://git.php.net/)
|
||||
to look at PHP Git repository in various ways.
|
||||
|
||||
|
||||
For further information on the process and further details please refer to
|
||||
https://wiki.php.net/vcs/gitworkflow and https://wiki.php.net/vcs/gitfaq
|
||||
|
||||
Happy hacking,
|
||||
|
||||
PHP Team
|
||||
+7
-20
@@ -51,40 +51,27 @@ SUCH DAMAGE.
|
||||
|
||||
6. ext/standard crypt's blowfish implementation
|
||||
|
||||
The crypt_blowfish homepage is:
|
||||
|
||||
http://www.openwall.com/crypt/
|
||||
|
||||
This code comes from John the Ripper password cracker, with reentrant
|
||||
and crypt(3) interfaces added, but optimizations specific to password
|
||||
cracking removed.
|
||||
|
||||
Written by Solar Designer <solar at openwall.com> in 1998-2011.
|
||||
No copyright is claimed, and the software is hereby placed in the public
|
||||
domain. In case this attempt to disclaim copyright and place the software
|
||||
in the public domain is deemed null and void, then the software is
|
||||
Copyright (c) 1998-2011 Solar Designer and it is hereby released to the
|
||||
general public under the following terms:
|
||||
Written by Solar Designer <solar at openwall.com> in 1998-2002 and
|
||||
placed in the public domain.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted.
|
||||
|
||||
There's ABSOLUTELY NO WARRANTY, express or implied.
|
||||
There's absolutely no warranty.
|
||||
|
||||
It is my intent that you should be able to use this on your system,
|
||||
as part of a software package, or anywhere else to improve security,
|
||||
as a part of a software package, or anywhere else to improve security,
|
||||
ensure compatibility, or for any other purpose. I would appreciate
|
||||
it if you give credit where it is due and keep your modifications in
|
||||
the public domain as well, but I don't require that in order to let
|
||||
you place this code and any modifications you make under a license
|
||||
of your choice.
|
||||
|
||||
This implementation is mostly compatible with OpenBSD's bcrypt.c (prefix
|
||||
"$2a$") by Niels Provos <provos at citi.umich.edu>, and uses some of his
|
||||
This implementation is compatible with OpenBSD bcrypt.c (version 2a)
|
||||
by Niels Provos <provos at citi.umich.edu>, and uses some of his
|
||||
ideas. The password hashing algorithm was designed by David Mazieres
|
||||
<dm at lcs.mit.edu>. For more information on the level of compatibility,
|
||||
please refer to the comments in BF_set_key() and to the crypt(3) man page
|
||||
included in the crypt_blowfish tarball.
|
||||
<dm at lcs.mit.edu>.
|
||||
|
||||
There's a paper on the algorithm that explains its design decisions:
|
||||
|
||||
|
||||
+39
-38
@@ -20,18 +20,12 @@ php/QA/bug websites try to have someone from the webmaster team (Bjori) on hand.
|
||||
|
||||
5. Verify the tags to be extra sure everything was tagged properly.
|
||||
|
||||
6. Moving extensions from/to PECL requires write acces to the destination.
|
||||
Most developers should have this.
|
||||
6. Moving extensions from/to PECL requires root level access to the CVS server.
|
||||
Contact systems@php.net to get this taken care of.
|
||||
|
||||
Moving extensions from php-src to PECL
|
||||
- Checkout the pecl directory, most likely you want a sparse-root checkout
|
||||
svn co --depth=empty https://svn.php.net/repository/pecl
|
||||
- Create an directory for the extension incl. branch and tag structure,
|
||||
no trunk at this point and commit this to svn
|
||||
cd pecl; mkdir foo foo/tags foo/branches; svn add foo; svn commit
|
||||
- Move the extension from php-src to the new location
|
||||
svn mv https://svn.php.net/repository/php/php-src/trunk/ext/foo \
|
||||
https://svn.php.net/repository/pecl/foo/trunk
|
||||
- Filesystem: cp -r php-src/ext/foo pecl/foo
|
||||
- cvs rm php-src/ext/foo
|
||||
|
||||
If the extension is still usable or not dead, in cooperation with the extension
|
||||
maintainers if any:
|
||||
@@ -39,24 +33,26 @@ maintainers if any:
|
||||
- create the package.xml, commit
|
||||
- release the package
|
||||
|
||||
For Moving extensions from PECL to php-src the svn mv has to be tone the other
|
||||
way round.
|
||||
Moving extensions from PECL to php-src
|
||||
- Filesystem: cp -r pecl/foo php-src/ext/foo
|
||||
OR depending on the wishes from the PECL extension maintainer.
|
||||
- Filesystem: ln -s pecl/foo php-src/ext/foo
|
||||
|
||||
Rolling a non stable release (alpha/beta/RC)
|
||||
--------------------------------------------
|
||||
|
||||
1. Check windows snapshot builder logs (http://windows.php.net/downloads/snaps/ the last revision)
|
||||
1. Check windows snapshot builder logs (http://snaps.php.net/win32/snapshot-STABLE.log f.e.)
|
||||
|
||||
2. run the "scripts/dev/credits" script in php-src and commit the changes in the
|
||||
credits files in ext/standard.
|
||||
|
||||
3. Bump the version numbers in ``main/php_version.h``, ``configure.in`` and possibly ``NEWS``.
|
||||
2. Bump the version numbers in ``main/php_version.h``, ``configure.in`` and possibly ``NEWS``.
|
||||
Do not use abbreviations for alpha and beta.
|
||||
|
||||
4. Commit those changes and note the revision id.
|
||||
3. Commit those changes
|
||||
|
||||
5. tag the repository with the version. To do the tag in a fast way do a svn copy on the server using full URLs. You should use the revision id from the above commit to prevent mistakes in case there was a commit in between. f.e. "``svn cp https://svn.php.net/repository/php/php-src/branches/PHP_5_3@308399 https://svn.php.net/repository/php/php-src/tags/php_5_3_6RC1``"
|
||||
(of course, you need to change that to the version you're rolling an RC for). Mail php-internals to announce the tag so tests/validation/check can be done prior to package it. It is especially important for RCs.
|
||||
4. run the "scripts/dev/credits" script in php-src and commit the changes in the
|
||||
credits files in ext/standard.
|
||||
|
||||
5. tag the repository with the version f.e. "``cvs tag php_4_4_1RC1``"
|
||||
(of course, you need to change that to the version you're rolling an RC for).
|
||||
|
||||
6. Bump up the version numbers in ``main/php_version.h``, ``configure.in``
|
||||
and possibly ``NEWS`` again, to the **next** version. F.e. if the release
|
||||
@@ -69,7 +65,7 @@ correctly work.
|
||||
8. Log in onto the snaps box and go into the correct tree (f.e. the PHP_4_4
|
||||
branch if you're rolling 4.4.x releases).
|
||||
|
||||
9. You do not have to update the tree, but of course you can with "``svn up``".
|
||||
9. You do not have to update the tree, but of course you can with "``cvs up -dP``".
|
||||
|
||||
10. run: ``./makedist php 4.4.1RC1``, this will export the tree, create configure
|
||||
and build two tarballs (one gz and one bz2).
|
||||
@@ -104,30 +100,33 @@ Derick) run the following commands for you:
|
||||
|
||||
``sudo -u ezmlm ezmlm-sub ~ezmlm/primary-qa-tester/mod moderator-email-address``
|
||||
|
||||
3. Update ``qa.git/include/release-qa.php`` with the appropriate information.
|
||||
See the documentation within release-qa.php for more information, but all releases
|
||||
and RCs are configured here. Only $QA_RELEASES needs to be edited.
|
||||
3. Update the MD5 sums in ``web/qa/trunk/include/rc-md5sums.txt`` (no empty lines).
|
||||
|
||||
Example: When rolling an RC, set the 'rc' with appropriate information for the
|
||||
given version.
|
||||
4. Update in ``web/qa/trunk/include/release-qa.php`` constants with the new RC and
|
||||
commit this.
|
||||
|
||||
Note: Remember to update the MD5 checksum information.
|
||||
a. ``$BUILD_TEST_RELEASES`` = array("4.4.7RC1", "5.2.2RC1")
|
||||
|
||||
4. Update ``php.git/include/version.inc`` (x=major version number)
|
||||
b. ``$CURRENT_QA_RELEASE_4`` = "4.4.7RC1" (``$CURRENT_QA_RELEASE_5`` for PHP5)
|
||||
|
||||
c. ``$RELEASE_PROCESS`` = array(4 => true, 5 => true)
|
||||
|
||||
1. Update in ``php-bugs/trunk/include/functions.inc`` the ``show_version_option``
|
||||
function to include the new RC and commit.
|
||||
|
||||
2. Update ``phpweb/include/version.inc`` (x=major version number)
|
||||
|
||||
a. ``$PHP_x_RC`` = "5.3.0RC1"
|
||||
|
||||
b. ``$PHP_x_RC_DATE`` = "06 September 2007"
|
||||
|
||||
5. Commit and push those changes:
|
||||
3. Commit those changes:
|
||||
|
||||
a. ``git commit -a && git push origin master``
|
||||
a. ``cvs commit include/version.inc include/releases.inc``
|
||||
|
||||
6. For the first RC, write the doc team (phpdoc@lists.php.net) about updating the
|
||||
4. For the first RC, write the doc team (phpdoc@lists.php.net) about updating the
|
||||
INSTALL and win32/install.txt files which are generated from the PHP manual sources.
|
||||
|
||||
7. Publish the announce on www.php.net as well (for all releases, alpha, RCs or other)
|
||||
|
||||
Rolling a stable release
|
||||
------------------------
|
||||
|
||||
@@ -165,7 +164,7 @@ and build two tarballs (one gz and one bz2).
|
||||
|
||||
13. Once the release has been tagged, contact the PHP Windows development team
|
||||
(internals-win@lists.php.net) so that Windows binaries can be created. Once
|
||||
those are made, they should be committed to SVN too.
|
||||
those are made, they should be committed to CVS too.
|
||||
|
||||
14. Check if the pear files are updated (phar for 5.1+ or run pear/make-pear-bundle.php with 4.4)
|
||||
|
||||
@@ -245,11 +244,13 @@ number, and remove the RC from there.
|
||||
|
||||
11. Update ``qaweb/include/release-qa.php``
|
||||
|
||||
- Update $QA_RELEASES with the appropriate information, which means bumping
|
||||
the version number to an upcoming version.
|
||||
a. Update the $BUILD_TEST_RELEASES array with the release name
|
||||
|
||||
Example: If PHP 5.3.7 is being released, then PHP 5.3.8 is the next QA version,
|
||||
so replace 5.3.7 with 5.3.8 within $QA_RELEASES.
|
||||
b. Update $RELEASE_PROCESS array (set to false)
|
||||
|
||||
I. For PHP4: Set $CURRENT_QA_RELEASE_4 to false
|
||||
|
||||
II. For PHP5: Set $CURRENT_QA_RELEASE_5 to false
|
||||
|
||||
Re-releasing the same version (or -pl)
|
||||
--------------------------------------
|
||||
|
||||
@@ -0,0 +1,146 @@
|
||||
====================
|
||||
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.
|
||||
|
||||
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::
|
||||
|
||||
a. Make everybody happier, especially those responsible for maintaining
|
||||
the SVN 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::
|
||||
|
||||
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.
|
||||
|
||||
3. Look at EXTENSIONS file to see who is the primary maintainer of
|
||||
the code you want to contribute to.
|
||||
|
||||
4. If you "strongly disagree" about something another person did, don't
|
||||
start fighting publicly - take it up in private email.
|
||||
|
||||
5. If you don't know how to do something, ask first!
|
||||
|
||||
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::
|
||||
|
||||
trunk Will become PHP 6.0. This CVS branch is for active development.
|
||||
|
||||
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
|
||||
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.
|
||||
|
||||
NB! Lines, starting with @ will go automagically into NEWS file, but
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
the function name as shown below.
|
||||
|
||||
|
||||
The format of the commit messages is pretty simple.
|
||||
|
||||
Use a - to start a new item in your commit message.
|
||||
|
||||
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.
|
||||
|
||||
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
|
||||
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::
|
||||
|
||||
- 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!
|
||||
|
||||
The # lines will be omitted from the ChangeLog automagically.
|
||||
|
||||
Use the [DOC] tag in your log message whenever you feel that your changes
|
||||
imply a documentation modification. The php-doc team will automatically
|
||||
get notified about your commit through the php-doc mailing list.
|
||||
|
||||
If you fix some bugs, you should note the bug ID numbers in your
|
||||
commit message. Bug ID should be prefixed by "#" for easier access to
|
||||
bug report when developers are browsing CVS via LXR or Bonsai.
|
||||
|
||||
Example::
|
||||
|
||||
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.
|
||||
|
||||
You can use LXR (http://lxr.php.net/) and Bonsai (http://bonsai.php.net/)
|
||||
to look at PHP SVN repository in various ways.
|
||||
|
||||
To receive daily updates to ChangeLog and NEWS, send an empty message to
|
||||
php-cvs-daily-subscribe@lists.php.net.
|
||||
|
||||
Happy hacking,
|
||||
|
||||
PHP Team
|
||||
+112
@@ -0,0 +1,112 @@
|
||||
Using PHP 5 with the Zeus Web Server
|
||||
-----------------------------------
|
||||
|
||||
Zeus fully supports running PHP in combination with our
|
||||
webserver. There are three different interfaces that can be used to
|
||||
enable PHP:
|
||||
|
||||
* CGI
|
||||
* ISAPI
|
||||
* FastCGI
|
||||
|
||||
Of the three, we recommend using FastCGI, which has been tested and
|
||||
benchmarked as providing the best performance and reliability.
|
||||
|
||||
Full details of how to install PHP are available from our
|
||||
website, at:
|
||||
|
||||
http://support.zeus.com/products/php.html
|
||||
|
||||
If you have any problems, please check the support site for more
|
||||
up-to-date information and advice.
|
||||
|
||||
|
||||
Quick guide to installing CGI/FastCGI with Zeus
|
||||
-----------------------------------------------
|
||||
|
||||
Step 1 - Compile PHP as FastCGI.
|
||||
|
||||
Compile as follows:
|
||||
./configure --enable-fastcgi
|
||||
make
|
||||
|
||||
Note that PHP has many options to the configure script -
|
||||
e.g. --with-mysql. You will probably want to select your usual options
|
||||
before compiling; the above is just a bare minimum, for illustration.
|
||||
|
||||
After compilation finishes, you will be left with an executable
|
||||
program called 'php'. Copy this into your document root, under a
|
||||
dedicated FastCGI directory (e.g. $DOCROOT/fcgi-bin/php)
|
||||
|
||||
|
||||
Step 2 - configure Zeus
|
||||
|
||||
Four stages:
|
||||
- enable FastCGI
|
||||
- configure FastCGI
|
||||
- setup alias for FastCGI
|
||||
- setup alias for PHP
|
||||
|
||||
1) Using the admin server, go to the 'module configuration' page for
|
||||
your virtual server, and ensure that 'fastcgi' is enabled (select the
|
||||
tickbox to the left).
|
||||
|
||||
2) While we can run FastCGI's locally, there are known problems with
|
||||
some OS's (specifically, the communication between web server and
|
||||
FastCGI happens over a unix domain socket, and some OS's have trouble
|
||||
sustaining high connection rates over these sockets). So instead, we
|
||||
are going to set up the PHP FastCGI to run 'remotely' over localhost
|
||||
(this uses TCP sockets, which do not suffer this problem). Go to the
|
||||
'fastcgi configuration' page, and under 'add remote fastcgi':
|
||||
Add Remote FastCGI
|
||||
Docroot path /fcgi-bin/php
|
||||
Remote machine localhost:8002
|
||||
The first entry is where you saved PHP, above.
|
||||
The second entry is localhost:<any unused port>
|
||||
We will start the FastCGI listening on this port shortly.
|
||||
Click 'update' to commit these changes.
|
||||
|
||||
3) Go to the path mapping module and add an alias for FastCGI:
|
||||
Add Alias
|
||||
Docroot path /fcgi-bin
|
||||
Filesystem directory /path/to/docroot/fcgi-bin
|
||||
Alias type fastcgi
|
||||
Click 'update' to commit these changes
|
||||
|
||||
4) Also on the path mapping module, add a handler for PHP:
|
||||
Add handler
|
||||
File extension php
|
||||
Handler /fcgi-bin/php
|
||||
Click 'update' to commit these changes
|
||||
|
||||
Finally restart your virtual server for these changes to take effect.
|
||||
|
||||
|
||||
Step 3 - start PHP as a FastCGI runner
|
||||
|
||||
When you start PHP, it will pre-fork a given number of child processes
|
||||
to handle incoming PHP requests. Each process will handle a given
|
||||
number of requests before exiting (and being replaced by a newly
|
||||
forked process). You can control these two parameters by setting the
|
||||
following environment variables BEFORE starting the FastCGI runner:
|
||||
|
||||
PHP_FCGI_CHILDREN - the number of child processes to pre-fork. This
|
||||
variable MUST be set, if not then the PHP will not run as a FastCGI.
|
||||
We recommend a value of 8 for a fairly busy site. If you have many,
|
||||
long-running PHP scripts, then you may need to increase this further.
|
||||
|
||||
PHP_FCGI_MAX_REQUESTS - the number of requests each PHP child process
|
||||
handles before exiting. If not set, defaults to 500.
|
||||
|
||||
To start the FastCGI runner, execute '$ZEUSHOME/web/bin/fcgirunner
|
||||
8002 $DOCROOT/fcgi-bin/php'. Substitute the appropriate values for
|
||||
$ZEUSHOME and $DOCROOT; also substitute for 8002 the port you chose,
|
||||
above.
|
||||
|
||||
To stop the runner (e.g. to experiment with the above environment
|
||||
variables) you will need to manually stop and running PHP
|
||||
processes. (Use 'ps' and 'kill'). As it is PHP which is forking lots
|
||||
of children and not the runner, Zeus unfortunately cannot keep track
|
||||
of what processes are running, sorry. A typical command line may look
|
||||
like 'ps -efl | grep $DOCROOT/fcgi-bin/php | grep -v grep | awk
|
||||
'{print $4}' | xargs kill'
|
||||
+1
-1
@@ -88,7 +88,7 @@ PHP_MINFO_FUNCTION(my_input_filter)
|
||||
{
|
||||
php_info_print_table_start();
|
||||
php_info_print_table_row( 2, "My Input Filter Support", "enabled" );
|
||||
php_info_print_table_row( 2, "Revision", "$Id$");
|
||||
php_info_print_table_row( 2, "Revision", "$Revision$");
|
||||
php_info_print_table_end();
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Thread Safe Resource Manager |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1999-2011, Andi Gutmans, Sascha Schumann, Zeev Suraski |
|
||||
| Copyright (c) 1999-2010, 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-2011, Andi Gutmans, Sascha Schumann, Zeev Suraski |
|
||||
| Copyright (c) 1999-2010, 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-2012 The PHP Group |
|
||||
| Copyright (c) 1997-2010 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-2012 The PHP Group |
|
||||
| Copyright (c) 1997-2010 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 |
|
||||
|
||||
+9
-63
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 5 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2012 The PHP Group |
|
||||
| Copyright (c) 1997-2010 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 |
|
||||
@@ -509,9 +509,6 @@ CWD_API char *virtual_getcwd_ex(size_t *length TSRMLS_DC) /* {{{ */
|
||||
|
||||
*length = 1;
|
||||
retval = (char *) malloc(2);
|
||||
if (retval == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
retval[0] = DEFAULT_SLASH;
|
||||
retval[1] = '\0';
|
||||
return retval;
|
||||
@@ -524,9 +521,6 @@ CWD_API char *virtual_getcwd_ex(size_t *length TSRMLS_DC) /* {{{ */
|
||||
|
||||
*length = state->cwd_length+1;
|
||||
retval = (char *) malloc(*length+1);
|
||||
if (retval == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
memcpy(retval, state->cwd, *length);
|
||||
retval[0] = toupper(retval[0]);
|
||||
retval[*length-1] = DEFAULT_SLASH;
|
||||
@@ -629,14 +623,7 @@ CWD_API void realpath_cache_del(const char *path, int path_len TSRMLS_DC) /* {{{
|
||||
memcmp(path, (*bucket)->path, path_len) == 0) {
|
||||
realpath_cache_bucket *r = *bucket;
|
||||
*bucket = (*bucket)->next;
|
||||
|
||||
/* if the pointers match then only subtract the length of the path */
|
||||
if(r->path == r->realpath) {
|
||||
CWDG(realpath_cache_size) -= sizeof(realpath_cache_bucket) + r->path_len + 1;
|
||||
} else {
|
||||
CWDG(realpath_cache_size) -= sizeof(realpath_cache_bucket) + r->path_len + 1 + r->realpath_len + 1;
|
||||
}
|
||||
|
||||
CWDG(realpath_cache_size) -= sizeof(realpath_cache_bucket) + r->path_len + 1 + r->realpath_len + 1;
|
||||
free(r);
|
||||
return;
|
||||
} else {
|
||||
@@ -661,10 +648,6 @@ static inline void realpath_cache_add(const char *path, int path_len, const char
|
||||
realpath_cache_bucket *bucket = malloc(size);
|
||||
unsigned long n;
|
||||
|
||||
if (bucket == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef PHP_WIN32
|
||||
bucket->key = realpath_cache_key(path, path_len TSRMLS_CC);
|
||||
#else
|
||||
@@ -711,14 +694,7 @@ static inline realpath_cache_bucket* realpath_cache_find(const char *path, int p
|
||||
if (CWDG(realpath_cache_ttl) && (*bucket)->expires < t) {
|
||||
realpath_cache_bucket *r = *bucket;
|
||||
*bucket = (*bucket)->next;
|
||||
|
||||
/* if the pointers match then only subtract the length of the path */
|
||||
if(r->path == r->realpath) {
|
||||
CWDG(realpath_cache_size) -= sizeof(realpath_cache_bucket) + r->path_len + 1;
|
||||
} else {
|
||||
CWDG(realpath_cache_size) -= sizeof(realpath_cache_bucket) + r->path_len + 1 + r->realpath_len + 1;
|
||||
}
|
||||
|
||||
CWDG(realpath_cache_size) -= sizeof(realpath_cache_bucket) + r->path_len + 1 + r->realpath_len + 1;
|
||||
free(r);
|
||||
} else if (key == (*bucket)->key && path_len == (*bucket)->path_len &&
|
||||
memcmp(path, (*bucket)->path, path_len) == 0) {
|
||||
@@ -773,9 +749,6 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
|
||||
|
||||
while (1) {
|
||||
if (len <= start) {
|
||||
if (link_is_dir) {
|
||||
*link_is_dir = 1;
|
||||
}
|
||||
return start;
|
||||
}
|
||||
|
||||
@@ -792,10 +765,6 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
|
||||
continue;
|
||||
} else if (i == len - 2 && path[i] == '.' && path[i+1] == '.') {
|
||||
/* remove '..' and previous directory */
|
||||
is_dir = 1;
|
||||
if (link_is_dir) {
|
||||
*link_is_dir = 1;
|
||||
}
|
||||
if (i - 1 <= start) {
|
||||
return start ? start : len;
|
||||
}
|
||||
@@ -897,9 +866,6 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
|
||||
}
|
||||
|
||||
pbuffer = (REPARSE_DATA_BUFFER *)tsrm_do_alloca(MAXIMUM_REPARSE_DATA_BUFFER_SIZE, use_heap_large);
|
||||
if (pbuffer == NULL) {
|
||||
return -1;
|
||||
}
|
||||
if(!DeviceIoControl(hLink, FSCTL_GET_REPARSE_POINT, NULL, 0, pbuffer, MAXIMUM_REPARSE_DATA_BUFFER_SIZE, &retlength, NULL)) {
|
||||
tsrm_free_alloca(pbuffer, use_heap_large);
|
||||
CloseHandle(hLink);
|
||||
@@ -986,9 +952,9 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
|
||||
}
|
||||
|
||||
if (!isVolume) {
|
||||
char * tmp2 = substitutename + substitutename_off;
|
||||
char * tmp = substitutename + substitutename_off;
|
||||
for(bufindex = 0; bufindex < (substitutename_len - substitutename_off); bufindex++) {
|
||||
*(path + bufindex) = *(tmp2 + bufindex);
|
||||
*(path + bufindex) = *(tmp + bufindex);
|
||||
}
|
||||
|
||||
*(path + bufindex) = 0;
|
||||
@@ -1100,7 +1066,6 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
|
||||
}
|
||||
if (is_dir && !directory) {
|
||||
/* not a directory */
|
||||
tsrm_free_alloca(tmp, use_heap);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -1221,14 +1186,9 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
|
||||
return 1;
|
||||
}
|
||||
memcpy(resolved_path, state->cwd, state_cwd_length);
|
||||
if (resolved_path[state_cwd_length-1] == DEFAULT_SLASH) {
|
||||
memcpy(resolved_path + state_cwd_length, path, path_length + 1);
|
||||
path_length += state_cwd_length;
|
||||
} else {
|
||||
resolved_path[state_cwd_length] = DEFAULT_SLASH;
|
||||
memcpy(resolved_path + state_cwd_length + 1, path, path_length + 1);
|
||||
path_length += state_cwd_length + 1;
|
||||
}
|
||||
resolved_path[state_cwd_length] = DEFAULT_SLASH;
|
||||
memcpy(resolved_path + state_cwd_length + 1, path, path_length + 1);
|
||||
path_length += state_cwd_length + 1;
|
||||
}
|
||||
} else {
|
||||
#ifdef TSRM_WIN32
|
||||
@@ -1410,10 +1370,6 @@ CWD_API char *virtual_realpath(const char *path, char *real_path TSRMLS_DC) /* {
|
||||
/* realpath("") returns CWD */
|
||||
if (!*path) {
|
||||
new_state.cwd = (char*)malloc(1);
|
||||
if (new_state.cwd == NULL) {
|
||||
retval = NULL;
|
||||
goto end;
|
||||
}
|
||||
new_state.cwd[0] = '\0';
|
||||
new_state.cwd_length = 0;
|
||||
if (VCWD_GETCWD(cwd, MAXPATHLEN)) {
|
||||
@@ -1423,10 +1379,6 @@ CWD_API char *virtual_realpath(const char *path, char *real_path TSRMLS_DC) /* {
|
||||
CWD_STATE_COPY(&new_state, &CWDG(cwd));
|
||||
} else {
|
||||
new_state.cwd = (char*)malloc(1);
|
||||
if (new_state.cwd == NULL) {
|
||||
retval = NULL;
|
||||
goto end;
|
||||
}
|
||||
new_state.cwd[0] = '\0';
|
||||
new_state.cwd_length = 0;
|
||||
}
|
||||
@@ -1442,7 +1394,7 @@ CWD_API char *virtual_realpath(const char *path, char *real_path TSRMLS_DC) /* {
|
||||
}
|
||||
|
||||
CWD_STATE_FREE(&new_state);
|
||||
end:
|
||||
|
||||
return retval;
|
||||
}
|
||||
/* }}} */
|
||||
@@ -1935,9 +1887,6 @@ CWD_API char *tsrm_realpath(const char *path, char *real_path TSRMLS_DC) /* {{{
|
||||
/* realpath("") returns CWD */
|
||||
if (!*path) {
|
||||
new_state.cwd = (char*)malloc(1);
|
||||
if (new_state.cwd == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
new_state.cwd[0] = '\0';
|
||||
new_state.cwd_length = 0;
|
||||
if (VCWD_GETCWD(cwd, MAXPATHLEN)) {
|
||||
@@ -1949,9 +1898,6 @@ CWD_API char *tsrm_realpath(const char *path, char *real_path TSRMLS_DC) /* {{{
|
||||
new_state.cwd_length = strlen(cwd);
|
||||
} else {
|
||||
new_state.cwd = (char*)malloc(1);
|
||||
if (new_state.cwd == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
new_state.cwd[0] = '\0';
|
||||
new_state.cwd_length = 0;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 5 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2012 The PHP Group |
|
||||
| Copyright (c) 1997-2010 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
-5
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 5 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2012 The PHP Group |
|
||||
| Copyright (c) 1997-2010 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 |
|
||||
@@ -532,10 +532,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 ")+2);
|
||||
if (!cmd) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
sprintf(cmd, "%s /c \"%s\"", TWG(comspec), command);
|
||||
if (asuser) {
|
||||
res = CreateProcessAsUser(token_user, NULL, cmd, &security, &security, security.bInheritHandle, dwCreateFlags, env, cwd, &startup, &process);
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 5 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2012 The PHP Group |
|
||||
| Copyright (c) 1997-2010 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 |
|
||||
|
||||
@@ -153,20 +153,6 @@ UPGRADE NOTES - PHP 5.3
|
||||
|
||||
- SplObjectStorage now has ArrayAccess support. It is also now possible to
|
||||
store associative information with objects in SplObjectStorage.
|
||||
|
||||
=====================
|
||||
4.1 New in PHP 5.3.9
|
||||
=====================
|
||||
|
||||
- Write operations within XSLT (for example with the extension sax:output) are
|
||||
disabled by default. You can define what is forbidden with the INI option
|
||||
xsl.security_prefs. This option will be marked as deprecated in 5.4 again.
|
||||
Use the method XsltProcess::setSecurityPrefs($options) there.
|
||||
|
||||
- the following new directives were added
|
||||
|
||||
- max_input_vars - specifies how many GET/POST/COOKIE input variables may be
|
||||
accepted. default value 1000.
|
||||
|
||||
=============
|
||||
5. Deprecated
|
||||
@@ -348,9 +334,6 @@ UPGRADE NOTES - PHP 5.3
|
||||
|
||||
- A new directive, request_order, controls the behavior of $_REQUEST
|
||||
independently of variables_order.
|
||||
- A new directive, called windows.show_crt_warning, has been introduced.
|
||||
This directive shows the CRT warnings when enabled. These warnings were
|
||||
displayed by default until now. It is disabled by default.
|
||||
|
||||
- New INI directives:
|
||||
- mail.add_x_header
|
||||
@@ -687,9 +670,7 @@ UPGRADE NOTES - PHP 5.3
|
||||
ReflectionClass::inNamespace()
|
||||
ReflectionClass::getNamespaceName()
|
||||
ReflectionClass::getShortName()
|
||||
- SPL: DirectoryIterator::getExtension()
|
||||
SplFileInfo::getExtension()
|
||||
SplObjectStorage::addAll()
|
||||
- SPL SplObjectStorage::addAll()
|
||||
SplObjectStorage::removeAll()
|
||||
- XSL: XSLTProcessor::setProfiling()
|
||||
|
||||
|
||||
@@ -24,14 +24,6 @@ Zend MM disabled:
|
||||
|
||||
$ USE_ZEND_ALLOC=0 valgrind --leak-check=full sapi/cli/php -r 'leak();'
|
||||
|
||||
Shared extensions:
|
||||
------------------
|
||||
|
||||
Since PHP 5.3.11 it is possible to prevent shared extensions from unloading so
|
||||
that valgrind can correctly track the memory leaks in shared extensions. For
|
||||
this there is the ZEND_DONT_UNLOAD_MODULES environment variable. If set, then
|
||||
DL_UNLOAD() is skipped during the shutdown of shared extensions.
|
||||
|
||||
Tweaking:
|
||||
---------
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
Title: Zend 2.0 Namespaces
|
||||
Version: $Id$
|
||||
Version: $Revision$
|
||||
Status: declined
|
||||
Maintainer: Stig S. Bakken <ssb@php.net>
|
||||
Created: 2001-09-08
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
Title: Loose type requirements for functions
|
||||
Version: $Id$
|
||||
Version: $Revision$
|
||||
Status: draft
|
||||
Maintainer: Brian Moon <brianm@dealnews.com>
|
||||
Created: 2001-09-17
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2012 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2010 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 2.4.2 2.4.3 2.5"
|
||||
bison_version_list="1.28 1.35 1.75 1.875 2.0 2.1 2.2 2.3 2.4 2.4.1 2.4.2 2.4.3"
|
||||
|
||||
# for standalone build of Zend Engine
|
||||
test -z "$SED" && SED=sed
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
Bug #31683 (changes to $name in __get($name) override future parameters)
|
||||
--SKIPIF--
|
||||
<?php require_once('skipif.inc'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
Bug #34199 (if($obj)/if(!$obj) inconsistency because of cast handler)
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("simplexml")) print "skip SimpleXML extension required"; ?>
|
||||
<?php if (!extension_loaded("simplexml")) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$xml = "<root></root>";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
Bug #39602 (Invalid session.save_handler crashes PHP)
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("session")) die("skip session extension required"); ?>
|
||||
<?php if (!extension_loaded("session")) die("skip"); ?>
|
||||
--INI--
|
||||
session.save_handler=qwerty
|
||||
error_reporting=0
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
Bug #42819 (namespaces in indexes of constant arrays)
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("spl")) print "skip SPL extension required"; ?>
|
||||
<?php if (!extension_loaded("spl")) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
namespace foo\foo;
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
--TEST--
|
||||
Bug #43200 (Interface implementation / inheritence not possible in abstract classes)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
interface a {
|
||||
function foo();
|
||||
function bar();
|
||||
}
|
||||
interface b {
|
||||
function foo();
|
||||
}
|
||||
|
||||
abstract class c {
|
||||
function bar() { }
|
||||
}
|
||||
|
||||
class x extends c implements a, b {
|
||||
function foo() { }
|
||||
}
|
||||
|
||||
ReflectionClass::export('x');
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Class [ <user> class x extends c implements a, b ] {
|
||||
@@ %s 15-17
|
||||
|
||||
- Constants [0] {
|
||||
}
|
||||
|
||||
- Static properties [0] {
|
||||
}
|
||||
|
||||
- Static methods [0] {
|
||||
}
|
||||
|
||||
- Properties [0] {
|
||||
}
|
||||
|
||||
- Methods [2] {
|
||||
Method [ <user, prototype b> public method foo ] {
|
||||
@@ %s 16 - 16
|
||||
}
|
||||
|
||||
Method [ <user, inherits c, prototype a> public method bar ] {
|
||||
@@ %s 12 - 12
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
--TEST--
|
||||
Bug #43200.2 (Interface implementation / inheritence not possible in abstract classes)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
interface A {
|
||||
function foo();
|
||||
}
|
||||
|
||||
abstract class B implements A {
|
||||
abstract public function foo();
|
||||
}
|
||||
|
||||
class C extends B {
|
||||
public function foo() {
|
||||
echo 'works';
|
||||
}
|
||||
}
|
||||
|
||||
$o = new C();
|
||||
$o->foo();
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
works
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
Bug #43918 (Segmentation fault in garbage collector)
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("simplexml")) print "skip SimpleXML extension required"; ?>
|
||||
<?php if (!extension_loaded("simplexml")) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$xmlstr = <<<XML
|
||||
|
||||
@@ -20,5 +20,5 @@ var_dump( ArrayProperty::$array );
|
||||
--EXPECT--
|
||||
array(1) {
|
||||
[1]=>
|
||||
int(42)
|
||||
int(23)
|
||||
}
|
||||
@@ -18,9 +18,9 @@ var_dump(
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Parse error: %s in %s(%d) : runtime-created function on line 1
|
||||
Parse error: syntax error, unexpected '}' in %s(%d) : runtime-created function on line 1
|
||||
|
||||
Parse error: %s %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)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
Bug #50174 (Incorrectly matched docComment)
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded('reflection') || !extension_loaded('spl')) print "skip SPL and reflection extensions required"; ?>
|
||||
<?php if (!extension_loaded('reflection') || !extension_loaded('spl')) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
--TEST--
|
||||
Bug #50816 (Using class constants in array definition fails)
|
||||
--FILE--
|
||||
<?php
|
||||
define("ONE", 1);
|
||||
define("TWO", 1);
|
||||
|
||||
class Foo {
|
||||
const ONE = 1;
|
||||
const TWO = 1;
|
||||
|
||||
public static $mapWithConst = array(self::ONE => 'one', self::TWO => 'two',);
|
||||
|
||||
public static $mapWithConst1 = array(1 => 'one', self::TWO => 'two',);
|
||||
public static $mapWithConst2 = array(self::ONE => 'one', 1 => 'two',);
|
||||
|
||||
public static $mapWithoutConst = array(1 => 'one', 1 => 'two',);
|
||||
}
|
||||
|
||||
$mapWithConst = array(1 => 'one', 1 => 'two',);
|
||||
|
||||
$mapWithoutConst = array(Foo::ONE => 'one', Foo::TWO => 'two',);
|
||||
$mapWithoutConst0 = array(1 => 'one', 1 => 'two',);
|
||||
$mapWithoutConst1 = array(ONE => 'one', 1 => 'two',);
|
||||
$mapWithoutConst2 = array(1 => 'one', TWO => 'two',);
|
||||
$mapWithoutConst3 = array(ONE => 'one', TWO => 'two',);
|
||||
|
||||
var_dump(Foo::$mapWithConst[1]);
|
||||
var_dump(Foo::$mapWithConst1[1]);
|
||||
var_dump(Foo::$mapWithConst2[1]);
|
||||
var_dump(Foo::$mapWithoutConst[1]);
|
||||
var_dump($mapWithConst[1]);
|
||||
var_dump($mapWithoutConst[1]);
|
||||
var_dump($mapWithoutConst0[1]);
|
||||
var_dump($mapWithoutConst1[1]);
|
||||
var_dump($mapWithoutConst2[1]);
|
||||
var_dump($mapWithoutConst3[1]);
|
||||
--EXPECT--
|
||||
string(3) "two"
|
||||
string(3) "two"
|
||||
string(3) "two"
|
||||
string(3) "two"
|
||||
string(3) "two"
|
||||
string(3) "two"
|
||||
string(3) "two"
|
||||
string(3) "two"
|
||||
string(3) "two"
|
||||
string(3) "two"
|
||||
@@ -1,31 +0,0 @@
|
||||
--TEST--
|
||||
Bug #53629 (memory leak inside highlight_string())
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$str = '
|
||||
<?php
|
||||
class foo {
|
||||
public $bar = <<<EOT
|
||||
bar
|
||||
EOT;
|
||||
}
|
||||
?>
|
||||
';
|
||||
$str2 = '
|
||||
<?php
|
||||
var_dump(array(<<<EOD
|
||||
foobar!
|
||||
EOD
|
||||
));
|
||||
?>
|
||||
';
|
||||
|
||||
highlight_string($str, true);
|
||||
highlight_string($str2, true);
|
||||
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
Done
|
||||
@@ -1,22 +0,0 @@
|
||||
--TEST--
|
||||
Bug #53727 (Inconsistent behavior of is_subclass_of with interfaces)
|
||||
--FILE--
|
||||
<?php
|
||||
interface MyInterface {
|
||||
const TEST_CONSTANT = true;
|
||||
}
|
||||
|
||||
class ParentClass implements MyInterface { }
|
||||
|
||||
class ChildClass extends ParentClass { }
|
||||
|
||||
echo (is_subclass_of('ChildClass', 'MyInterface') ? 'true' : 'false') . "\n";
|
||||
echo (defined('ChildClass::TEST_CONSTANT') ? 'true' : 'false') . "\n";
|
||||
|
||||
echo (is_subclass_of('ParentClass', 'MyInterface') ? 'true' : 'false') . "\n";
|
||||
echo (defined('ParentClass::TEST_CONSTANT') ? 'true' : 'false') . "\n";
|
||||
--EXPECT--
|
||||
true
|
||||
true
|
||||
true
|
||||
true
|
||||
@@ -1,61 +0,0 @@
|
||||
--TEST--
|
||||
Bug #53958 (Closures can't 'use' shared variables by value and by reference)
|
||||
--FILE--
|
||||
<?php
|
||||
// TEST 1
|
||||
$a = 1;
|
||||
$fn1 = function() use ($a) {echo "$a\n"; $a++;};
|
||||
$fn2 = function() use ($a) {echo "$a\n"; $a++;};
|
||||
$a = 5;
|
||||
$fn1(); // 1
|
||||
$fn2(); // 1
|
||||
$fn1(); // 1
|
||||
$fn2(); // 1
|
||||
|
||||
// TEST 2
|
||||
$b = 1;
|
||||
$fn1 = function() use (&$b) {echo "$b\n"; $b++;};
|
||||
$fn2 = function() use (&$b) {echo "$b\n"; $b++;};
|
||||
$b = 5;
|
||||
$fn1(); // 5
|
||||
$fn2(); // 6
|
||||
$fn1(); // 7
|
||||
$fn2(); // 8
|
||||
|
||||
// TEST 3
|
||||
$c = 1;
|
||||
$fn1 = function() use (&$c) {echo "$c\n"; $c++;};
|
||||
$fn2 = function() use ($c) {echo "$c\n"; $c++;};
|
||||
$c = 5;
|
||||
$fn1(); // 5
|
||||
$fn2(); // 1
|
||||
$fn1(); // 6
|
||||
$fn2(); // 1
|
||||
|
||||
// TEST 4
|
||||
$d = 1;
|
||||
$fn1 = function() use ($d) {echo "$d\n"; $d++;};
|
||||
$fn2 = function() use (&$d) {echo "$d\n"; $d++;};
|
||||
$d = 5;
|
||||
$fn1(); // 1
|
||||
$fn2(); // 5
|
||||
$fn1(); // 1
|
||||
$fn2(); // 6
|
||||
?>
|
||||
--EXPECT--
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
5
|
||||
1
|
||||
6
|
||||
1
|
||||
1
|
||||
5
|
||||
1
|
||||
6
|
||||
@@ -1,11 +0,0 @@
|
||||
--TEST--
|
||||
Bug #53971 (isset() and empty() produce apparently spurious runtime error)
|
||||
--FILE--
|
||||
<?php
|
||||
$s = "";
|
||||
var_dump(isset($s[0][0]));
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(false)
|
||||
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
--TEST--
|
||||
Bug #54013 (ReflectionParam for duplicate parameter contains garbage)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class a
|
||||
{
|
||||
function b($aaaaaaaa, $aaaaaaaa)
|
||||
{
|
||||
$params = func_get_args();
|
||||
}
|
||||
}
|
||||
|
||||
$c = new a;
|
||||
$c->b('waa?', 'meukee!');
|
||||
|
||||
$reflectionClass = new ReflectionClass($c);
|
||||
$params = $reflectionClass->getMethod('b')->getParameters();
|
||||
|
||||
var_dump($params[0], $params[1]);
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
object(ReflectionParameter)#%d (1) {
|
||||
["name"]=>
|
||||
string(8) "aaaaaaaa"
|
||||
}
|
||||
object(ReflectionParameter)#%d (1) {
|
||||
["name"]=>
|
||||
string(8) "aaaaaaaa"
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
--TEST--
|
||||
Bug #54039 (use() of static variables in lambda functions can break staticness)
|
||||
--FILE--
|
||||
<?php
|
||||
function test_1() {
|
||||
static $v = 0;
|
||||
++$v;
|
||||
echo "Outer function increments \$v to $v\n";
|
||||
$f = function() use($v) {
|
||||
echo "Inner function reckons \$v is $v\n";
|
||||
};
|
||||
return $f;
|
||||
}
|
||||
|
||||
$f = test_1(); $f();
|
||||
$f = test_1(); $f();
|
||||
|
||||
function test_2() {
|
||||
static $v = 0;
|
||||
$f = function() use($v) {
|
||||
echo "Inner function reckons \$v is $v\n";
|
||||
};
|
||||
++$v;
|
||||
echo "Outer function increments \$v to $v\n";
|
||||
return $f;
|
||||
}
|
||||
|
||||
$f = test_2(); $f();
|
||||
$f = test_2(); $f();
|
||||
|
||||
function test_3() {
|
||||
static $v = "";
|
||||
$v .= 'b';
|
||||
echo "Outer function catenates 'b' onto \$v to give $v\n";
|
||||
$f = function() use($v) {
|
||||
echo "Inner function reckons \$v is $v\n";
|
||||
};
|
||||
$v .= 'a';
|
||||
echo "Outer function catenates 'a' onto \$v to give $v\n";
|
||||
return $f;
|
||||
}
|
||||
$f = test_3(); $f();
|
||||
$f = test_3(); $f();
|
||||
--EXPECT--
|
||||
Outer function increments $v to 1
|
||||
Inner function reckons $v is 1
|
||||
Outer function increments $v to 2
|
||||
Inner function reckons $v is 2
|
||||
Outer function increments $v to 1
|
||||
Inner function reckons $v is 0
|
||||
Outer function increments $v to 2
|
||||
Inner function reckons $v is 1
|
||||
Outer function catenates 'b' onto $v to give b
|
||||
Outer function catenates 'a' onto $v to give ba
|
||||
Inner function reckons $v is b
|
||||
Outer function catenates 'b' onto $v to give bab
|
||||
Outer function catenates 'a' onto $v to give baba
|
||||
Inner function reckons $v is bab
|
||||
@@ -1,17 +0,0 @@
|
||||
--TEST--
|
||||
Bug #54262 (Crash when assigning value to a dimension in a non-array)
|
||||
--FILE--
|
||||
<?php
|
||||
$a = '0';
|
||||
var_dump(isset($a['b']));
|
||||
$simpleString = preg_match('//', '', $a->a);
|
||||
$simpleString["wrong"] = "f";
|
||||
echo "ok\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
bool(true)
|
||||
|
||||
Warning: Attempt to modify property of non-object in %sbug54262.php on line 4
|
||||
|
||||
Warning: Cannot use a scalar value as an array in %sbug54262.php on line 5
|
||||
ok
|
||||
@@ -1,17 +0,0 @@
|
||||
--TEST--
|
||||
Bug #54265 (crash when variable gets reassigned in error handler)
|
||||
--FILE--
|
||||
<?php
|
||||
function my_errorhandler($errno,$errormsg) {
|
||||
global $my_var;
|
||||
$my_var = 0;
|
||||
echo "EROOR: $errormsg\n";
|
||||
}
|
||||
set_error_handler("my_errorhandler");
|
||||
$my_var = str_repeat("A",$my_var[0]->errormsg = "xyz");
|
||||
echo "ok\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
EROOR: Creating default object from empty value
|
||||
ok
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
--TEST--
|
||||
Bug #54268 (Double free when destroy_zend_class fails)
|
||||
--INI--
|
||||
memory_limit=8M
|
||||
--SKIPIF--
|
||||
<?php
|
||||
$zend_mm_enabled = getenv("USE_ZEND_ALLOC");
|
||||
if ($zend_mm_enabled === "0") {
|
||||
die("skip Zend MM disabled");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
class DestructableObject
|
||||
{
|
||||
public function __destruct()
|
||||
{
|
||||
DestructableObject::__destruct();
|
||||
}
|
||||
}
|
||||
class DestructorCreator
|
||||
{
|
||||
public function __destruct()
|
||||
{
|
||||
$this->test = new DestructableObject;
|
||||
}
|
||||
}
|
||||
class Test
|
||||
{
|
||||
public static $mystatic;
|
||||
}
|
||||
$x = new Test();
|
||||
Test::$mystatic = new DestructorCreator();
|
||||
--EXPECTF--
|
||||
Fatal error: Allowed memory size of %s bytes exhausted%s(tried to allocate %s bytes) in %s on line %d
|
||||
@@ -1,22 +0,0 @@
|
||||
--TEST--
|
||||
Bug #54305 (Crash in gc_remove_zval_from_buffer)
|
||||
--FILE--
|
||||
<?php
|
||||
class TestClass {
|
||||
public function methodWithArgs($a, $b) {
|
||||
}
|
||||
}
|
||||
abstract class AbstractClass {
|
||||
}
|
||||
$methodWithArgs = new ReflectionMethod('TestClass', 'methodWithArgs');
|
||||
echo $methodWithArgs++;
|
||||
?>
|
||||
--EXPECTF--
|
||||
Method [ <user> public method methodWithArgs ] {
|
||||
@@ %sbug54305.php %d - %d
|
||||
|
||||
- Parameters [2] {
|
||||
Parameter #0 [ <required> $a ]
|
||||
Parameter #1 [ <required> $b ]
|
||||
}
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
--TEST--
|
||||
Bug #54358 (Closure, use and reference)
|
||||
--FILE--
|
||||
<?php
|
||||
class asserter {
|
||||
public function call($function) {
|
||||
}
|
||||
}
|
||||
|
||||
$asserter = new asserter();
|
||||
|
||||
$closure = function() use ($asserter, &$function) {
|
||||
$asserter->call($function = 'md5');
|
||||
};
|
||||
|
||||
$closure();
|
||||
|
||||
var_dump($function);
|
||||
|
||||
$closure = function() use ($asserter, $function) {
|
||||
$asserter->call($function);
|
||||
};
|
||||
|
||||
$closure();
|
||||
|
||||
var_dump($function);
|
||||
|
||||
$closure = function() use ($asserter, $function) {
|
||||
$asserter->call($function);
|
||||
};
|
||||
|
||||
$closure();
|
||||
|
||||
var_dump($function);
|
||||
?>
|
||||
--EXPECT--
|
||||
string(3) "md5"
|
||||
string(3) "md5"
|
||||
string(3) "md5"
|
||||
@@ -1,24 +0,0 @@
|
||||
--TEST--
|
||||
Bug #54367 (Use of closure causes problem in ArrayAccess)
|
||||
--FILE--
|
||||
<?php
|
||||
class MyObjet implements ArrayAccess
|
||||
{
|
||||
public function offsetSet($offset, $value) { }
|
||||
public function offsetExists($offset) { }
|
||||
public function offsetUnset($offset) { }
|
||||
|
||||
public function offsetGet ($offset)
|
||||
{
|
||||
return function ($var) use ($offset) { // here is the problem
|
||||
var_dump($offset, $var);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
$a = new MyObjet();
|
||||
echo $a['p']('foo');
|
||||
?>
|
||||
--EXPECT--
|
||||
string(1) "p"
|
||||
string(3) "foo"
|
||||
@@ -1,23 +0,0 @@
|
||||
--TEST--
|
||||
Bug #54372 (Crash accessing global object itself returned from its __get() handle)
|
||||
--FILE--
|
||||
<?php
|
||||
class test_class
|
||||
{
|
||||
public function __get($name)
|
||||
{
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function b()
|
||||
{
|
||||
echo "ok\n";
|
||||
}
|
||||
}
|
||||
|
||||
global $test3;
|
||||
$test3 = new test_class();
|
||||
$test3->a->b();
|
||||
?>
|
||||
--EXPECT--
|
||||
ok
|
||||
@@ -1,15 +0,0 @@
|
||||
--TEST--
|
||||
Bug #54585 (track_errors causes segfault)
|
||||
--INI--
|
||||
track_errors=On
|
||||
--FILE--
|
||||
<?php
|
||||
function testing($source) {
|
||||
unset($source[$cos]);
|
||||
}
|
||||
testing($_GET);
|
||||
echo "ok\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Notice: Undefined variable: cos in %sbug54585.php on line 3
|
||||
ok
|
||||
@@ -1,26 +0,0 @@
|
||||
--TEST--
|
||||
Bug #54624 (class_alias and type hint)
|
||||
--FILE--
|
||||
<?php
|
||||
class A
|
||||
{
|
||||
function foo(A $param) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class_alias('A', 'AliasA');
|
||||
|
||||
eval('
|
||||
class B extends A
|
||||
{
|
||||
function foo(AliasA $param) {
|
||||
}
|
||||
|
||||
}
|
||||
');
|
||||
|
||||
echo "DONE\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
DONE
|
||||
@@ -1,3 +0,0 @@
|
||||
<?php
|
||||
namespace b\c {}
|
||||
namespace b\d {}
|
||||
@@ -1,11 +0,0 @@
|
||||
--TEST--
|
||||
Bug #54804 (__halt_compiler and imported namespaces)
|
||||
--FILE--
|
||||
<?php
|
||||
namespace a;
|
||||
require __DIR__ . '/bug54804.inc';
|
||||
echo 'DONE';
|
||||
__halt_compiler();
|
||||
?>
|
||||
--EXPECT--
|
||||
DONE
|
||||
@@ -1,28 +0,0 @@
|
||||
--TEST--
|
||||
Bug #54910 (Crash when calling call_user_func with unknown function name)
|
||||
--FILE--
|
||||
<?php
|
||||
class A {
|
||||
public function __call($method, $args) {
|
||||
if (stripos($method, 'get') === 0) {
|
||||
return $this->get();
|
||||
}
|
||||
die("No such method - '$method'\n");
|
||||
}
|
||||
|
||||
protected function get() {
|
||||
$class = get_class($this);
|
||||
$call = array($class, 'noSuchMethod');
|
||||
|
||||
if (is_callable($call)) {
|
||||
call_user_func($call);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class B extends A {}
|
||||
|
||||
$input = new B();
|
||||
echo $input->getEmail();
|
||||
--EXPECT--
|
||||
No such method - 'noSuchMethod'
|
||||
@@ -1,23 +0,0 @@
|
||||
--TEST--
|
||||
Bug #55007 (compiler fail after previous fail)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function __autoload($classname) {
|
||||
if ('CompileErrorClass'==$classname) eval('class CompileErrorClass { function foo() { $a[] } }');
|
||||
if ('MyErrorHandler'==$classname) eval('class MyErrorHandler { function __construct() { print "My error handler runs.\n"; } }');
|
||||
}
|
||||
|
||||
function shutdown() {
|
||||
new MyErrorHandler();
|
||||
}
|
||||
|
||||
|
||||
register_shutdown_function('shutdown');
|
||||
|
||||
new CompileErrorClass();
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Cannot use [] for reading in %s(%d) : eval()'d code on line %d
|
||||
My error handler runs.
|
||||
@@ -1,30 +0,0 @@
|
||||
--TEST--
|
||||
Bug #55156 (ReflectionClass::getDocComment() returns comment even though the class has none)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
/** test */
|
||||
namespace foo {
|
||||
function test() { }
|
||||
|
||||
$x = new \ReflectionFunction('foo\test');
|
||||
var_dump($x->getDocComment());
|
||||
|
||||
/** test1 */
|
||||
class bar { }
|
||||
|
||||
/** test2 */
|
||||
class foo extends namespace\bar { }
|
||||
|
||||
$x = new \ReflectionClass('foo\bar');
|
||||
var_dump($x->getDocComment());
|
||||
|
||||
$x = new \ReflectionClass('foo\foo');
|
||||
var_dump($x->getDocComment());
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
bool(false)
|
||||
string(12) "/** test1 */"
|
||||
string(12) "/** test2 */"
|
||||
@@ -1,31 +0,0 @@
|
||||
--TEST--
|
||||
Bug #55339 (Segfault with allow_call_time_pass_reference = Off)
|
||||
--INI--
|
||||
allow_call_time_pass_reference=off
|
||||
--FILE--
|
||||
<?php
|
||||
function error_handler($errno, $errstr, $errfile, $errline) {
|
||||
eval(';');
|
||||
}
|
||||
|
||||
set_error_handler('error_handler');
|
||||
|
||||
eval(<<<'EOF'
|
||||
function foo()
|
||||
{
|
||||
$array = array();
|
||||
foreach ($array as $key => $value) {
|
||||
bar($key, &$value);
|
||||
}
|
||||
}
|
||||
|
||||
function bar()
|
||||
{
|
||||
|
||||
}
|
||||
EOF
|
||||
);
|
||||
|
||||
echo "OK\n";
|
||||
--EXPECT--
|
||||
OK
|
||||
@@ -1,65 +0,0 @@
|
||||
--TEST--
|
||||
Bug #55509 (segfault on x86_64 using more than 2G memory)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (PHP_INT_SIZE == 4) {
|
||||
die('skip Not for 32-bits OS');
|
||||
}
|
||||
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
|
||||
// check the available memory
|
||||
if (PHP_OS == 'Linux') {
|
||||
$lines = file('/proc/meminfo');
|
||||
$infos = array();
|
||||
foreach ($lines as $line) {
|
||||
$tmp = explode(":", $line);
|
||||
$index = strtolower($tmp[0]);
|
||||
$value = (int)ltrim($tmp[1], " ")*1024;
|
||||
$infos[$index] = $value;
|
||||
}
|
||||
$freeMemory = $infos['memfree']+$infos['buffers']+$infos['cached'];
|
||||
if ($freeMemory < 2100*1024*1024) {
|
||||
die('skip Not enough memory.');
|
||||
}
|
||||
}
|
||||
elseif (PHP_OS == 'FreeBSD') {
|
||||
$lines = explode("\n",`sysctl -a`);
|
||||
$infos = array();
|
||||
foreach ($lines as $line) {
|
||||
if(!$line){
|
||||
continue;
|
||||
}
|
||||
$tmp = explode(":", $line);
|
||||
$index = strtolower($tmp[0]);
|
||||
$value = trim($tmp[1], " ");
|
||||
$infos[$index] = $value;
|
||||
}
|
||||
$freeMemory = ($infos['vm.stats.vm.v_inactive_count']*$infos['hw.pagesize'])
|
||||
+($infos['vm.stats.vm.v_cache_count']*$infos['hw.pagesize'])
|
||||
+($infos['vm.stats.vm.v_free_count']*$infos['hw.pagesize']);
|
||||
if ($freeMemory < 2100*1024*1024) {
|
||||
die('skip Not enough memory.');
|
||||
}
|
||||
}
|
||||
?>
|
||||
--INI--
|
||||
memory_limit=2100M
|
||||
--FILE--
|
||||
<?php
|
||||
$a1 = str_repeat("1", 1024 * 1024 * 1024 * 0.5);
|
||||
echo "1\n";
|
||||
$a2 = str_repeat("2", 1024 * 1024 * 1024 * 0.5);
|
||||
echo "2\n";
|
||||
$a3 = str_repeat("3", 1024 * 1024 * 1024 * 0.5);
|
||||
echo "3\n";
|
||||
$a4 = str_repeat("4", 1024 * 1024 * 1024 * 0.5);
|
||||
echo "4\n";
|
||||
$a5 = str_repeat("5", 1024 * 1024 * 1024 * 0.5);
|
||||
echo "5\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
|
||||
Fatal error: Allowed memory size of %d bytes exhausted%s(tried to allocate %d bytes) in %sbug55509.php on line %d
|
||||
@@ -1,10 +0,0 @@
|
||||
--TEST--
|
||||
Bug #60099 (__halt_compiler() works in braced namespaces)
|
||||
--FILE--
|
||||
<?php
|
||||
namespace foo {
|
||||
__halt_compiler();
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: __HALT_COMPILER() can only be used from the outermost scope in %s on line %d
|
||||
@@ -1,16 +0,0 @@
|
||||
--TEST--
|
||||
Bug #60138 (GC crash with referenced array in RecursiveArrayIterator)
|
||||
--FILE--
|
||||
<?php
|
||||
$tree = array(array("f"));
|
||||
$category =& $tree[0];
|
||||
|
||||
$iterator = new RecursiveIteratorIterator(
|
||||
new RecursiveArrayIterator($tree),
|
||||
RecursiveIteratorIterator::SELF_FIRST
|
||||
);
|
||||
foreach($iterator as $file);
|
||||
echo "ok\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
ok
|
||||
@@ -1,32 +0,0 @@
|
||||
--TEST--
|
||||
Bug #60139 (Anonymous functions create cycles not detected by the GC)
|
||||
--INI--
|
||||
zend.enable_gc=1
|
||||
--FILE--
|
||||
<?php
|
||||
class Foo {
|
||||
public $x;
|
||||
|
||||
public function __construct() {
|
||||
$this->x = function() {};
|
||||
}
|
||||
}
|
||||
|
||||
class Bar {
|
||||
public $x;
|
||||
|
||||
public function __construct() {
|
||||
$self = $this;
|
||||
$this->x = function() use ($self) {};
|
||||
}
|
||||
}
|
||||
|
||||
gc_collect_cycles();
|
||||
new Foo;
|
||||
var_dump(gc_collect_cycles());
|
||||
new Bar;
|
||||
var_dump(gc_collect_cycles());
|
||||
?>
|
||||
--EXPECT--
|
||||
int(0)
|
||||
int(2)
|
||||
Binary file not shown.
@@ -1,9 +0,0 @@
|
||||
--TEST--
|
||||
test of larger than 8kb text file being parsed by require statement
|
||||
--FILE--
|
||||
<?php
|
||||
file_put_contents('test.php',str_repeat('passed, ',1024));
|
||||
require('test.php');
|
||||
?>
|
||||
--EXPECT--
|
||||
passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed,Line truncated
|
||||
@@ -1,19 +0,0 @@
|
||||
--TEST--
|
||||
Bug #60825 (Segfault when running symfony 2 tests)
|
||||
--DESCRIPTION--
|
||||
run this with valgrind
|
||||
--FILE--
|
||||
<?php
|
||||
class test {
|
||||
public static $x;
|
||||
public function __toString() {
|
||||
self::$x = $this;
|
||||
return __FILE__;
|
||||
}
|
||||
}
|
||||
$a = new test;
|
||||
require_once $a;
|
||||
debug_zval_dump(test::$x);
|
||||
?>
|
||||
--EXPECTF--
|
||||
string(%d) "%sbug60825.php" refcount(2)
|
||||
@@ -1,10 +0,0 @@
|
||||
--TEST--
|
||||
Bug #61087 (Memory leak in parse_ini_file when specifying invalid scanner mode)
|
||||
--FILE--
|
||||
<?php
|
||||
// the used file is actually irrelevant, so just use this file
|
||||
// even though it's not an .ini
|
||||
parse_ini_file(__FILE__, false, 100);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: Invalid scanner mode in %s on line %d
|
||||
@@ -1,9 +0,0 @@
|
||||
--TEST--
|
||||
Bug #61095 (Lexing 0x00*+<NUM> incorectly)
|
||||
--FILE--
|
||||
<?php
|
||||
echo 0x00+2;
|
||||
echo "\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
2
|
||||
@@ -1,28 +0,0 @@
|
||||
--TEST--
|
||||
Bug #61165 (Segfault - strip_tags())
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$handler = NULL;
|
||||
class T {
|
||||
public $_this;
|
||||
|
||||
public function __toString() {
|
||||
global $handler;
|
||||
$handler = $this;
|
||||
$this->_this = $this; // <-- uncoment this
|
||||
return 'A';
|
||||
}
|
||||
}
|
||||
|
||||
$t = new T;
|
||||
for ($i = 0; $i < 3; $i++) {
|
||||
strip_tags($t);
|
||||
strip_tags(new T);
|
||||
}
|
||||
var_dump($handler);
|
||||
--EXPECTF--
|
||||
object(T)#%d (1) {
|
||||
["_this"]=>
|
||||
*RECURSION*
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
--TEST--
|
||||
Bug #61273 (call_user_func_array with more than 16333 arguments leaks / crashes)
|
||||
--FILE--
|
||||
<?php
|
||||
/**
|
||||
* for 5.3 #define ZEND_VM_STACK_PAGE_SIZE ((64 * 1024) - 64)
|
||||
* for 5.4 #define ZEND_VM_STACK_PAGE_SIZE ((16 * 1024) - 16)
|
||||
* we should trick EG(argument_stack) into growing
|
||||
*/
|
||||
$args = array_fill(0, 64 * 1024 - 64, 0);
|
||||
call_user_func_array(function(&$a) {}, $args);
|
||||
echo strval("okey");
|
||||
--EXPECTF--
|
||||
Warning: Parameter 1 to {closure}() expected to be a reference, value given in %sbug61273.php on line %d
|
||||
okey
|
||||
@@ -1,15 +0,0 @@
|
||||
--TEST--
|
||||
Bug #62005 (unexpected behavior when incrementally assigning to a member of a null object)
|
||||
--FILE--
|
||||
<?php
|
||||
function add_points($player, $points) {
|
||||
$player->energy += $points;
|
||||
print_r($player);
|
||||
}
|
||||
add_points(NULL, 2);
|
||||
--EXPECTF--
|
||||
Strict Standards: Creating default object from empty value in %sbug62005.php on line %d
|
||||
stdClass Object
|
||||
(
|
||||
[energy] => 2
|
||||
)
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
concat different types
|
||||
concat difffent types
|
||||
--INI--
|
||||
precision=14
|
||||
--FILE--
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Persistent case insensitive and user defined constants
|
||||
Persistent case insensetive and user defined constants
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(ZEND_THREAD_safe);
|
||||
|
||||
@@ -1,397 +0,0 @@
|
||||
--TEST--
|
||||
debug_backtrace options
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function backtrace_print($opt = null)
|
||||
{
|
||||
if(is_null($opt)) {
|
||||
print_r(debug_backtrace());
|
||||
} else {
|
||||
print_r(debug_backtrace($opt));
|
||||
}
|
||||
}
|
||||
|
||||
function doit($a, $b, $how)
|
||||
{
|
||||
echo "==default\n";
|
||||
$how();
|
||||
echo "==true\n";
|
||||
$how(true);
|
||||
echo "==false\n";
|
||||
$how(false);
|
||||
echo "==DEBUG_BACKTRACE_PROVIDE_OBJECT\n";
|
||||
$how(DEBUG_BACKTRACE_PROVIDE_OBJECT);
|
||||
echo "==DEBUG_BACKTRACE_IGNORE_ARGS\n";
|
||||
$how(DEBUG_BACKTRACE_IGNORE_ARGS);
|
||||
echo "==both\n";
|
||||
$how(DEBUG_BACKTRACE_PROVIDE_OBJECT|DEBUG_BACKTRACE_IGNORE_ARGS);
|
||||
}
|
||||
|
||||
class foo {
|
||||
protected function doCall($dowhat, $how)
|
||||
{
|
||||
$dowhat('a','b', $how);
|
||||
}
|
||||
static function statCall($dowhat, $how)
|
||||
{
|
||||
$obj = new self();
|
||||
$obj->doCall($dowhat, $how);
|
||||
}
|
||||
}
|
||||
foo::statCall("doit", "debug_print_backtrace");
|
||||
foo::statCall("doit", "backtrace_print");
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
==default
|
||||
#0 doit(a, b, debug_print_backtrace) called at [%sdebug_backtrace_options.php:%d]
|
||||
#1 foo->doCall(doit, debug_print_backtrace) called at [%sdebug_backtrace_options.php:%d]
|
||||
#2 foo::statCall(doit, debug_print_backtrace) called at [%sdebug_backtrace_options.php:%d]
|
||||
==true
|
||||
#0 doit(a, b, debug_print_backtrace) called at [%sdebug_backtrace_options.php:%d]
|
||||
#1 foo->doCall(doit, debug_print_backtrace) called at [%sdebug_backtrace_options.php:%d]
|
||||
#2 foo::statCall(doit, debug_print_backtrace) called at [%sdebug_backtrace_options.php:%d]
|
||||
==false
|
||||
#0 doit(a, b, debug_print_backtrace) called at [%sdebug_backtrace_options.php:%d]
|
||||
#1 foo->doCall(doit, debug_print_backtrace) called at [%sdebug_backtrace_options.php:%d]
|
||||
#2 foo::statCall(doit, debug_print_backtrace) called at [%sdebug_backtrace_options.php:%d]
|
||||
==DEBUG_BACKTRACE_PROVIDE_OBJECT
|
||||
#0 doit(a, b, debug_print_backtrace) called at [%sdebug_backtrace_options.php:%d]
|
||||
#1 foo->doCall(doit, debug_print_backtrace) called at [%sdebug_backtrace_options.php:%d]
|
||||
#2 foo::statCall(doit, debug_print_backtrace) called at [%sdebug_backtrace_options.php:%d]
|
||||
==DEBUG_BACKTRACE_IGNORE_ARGS
|
||||
#0 doit() called at [%sdebug_backtrace_options.php:%d]
|
||||
#1 foo->doCall() called at [%sdebug_backtrace_options.php:%d]
|
||||
#2 foo::statCall() called at [%sdebug_backtrace_options.php:%d]
|
||||
==both
|
||||
#0 doit() called at [%sdebug_backtrace_options.php:%d]
|
||||
#1 foo->doCall() called at [%sdebug_backtrace_options.php:%d]
|
||||
#2 foo::statCall() called at [%sdebug_backtrace_options.php:%d]
|
||||
==default
|
||||
Array
|
||||
(
|
||||
[0] => Array
|
||||
(
|
||||
[file] => %sdebug_backtrace_options.php
|
||||
[line] => %d
|
||||
[function] => backtrace_print
|
||||
[args] => Array
|
||||
(
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
[1] => Array
|
||||
(
|
||||
[file] => %sdebug_backtrace_options.php
|
||||
[line] => %d
|
||||
[function] => doit
|
||||
[args] => Array
|
||||
(
|
||||
[0] => a
|
||||
[1] => b
|
||||
[2] => backtrace_print
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
[2] => Array
|
||||
(
|
||||
[file] => %sdebug_backtrace_options.php
|
||||
[line] => %d
|
||||
[function] => doCall
|
||||
[class] => foo
|
||||
[object] => foo Object
|
||||
(
|
||||
)
|
||||
|
||||
[type] => ->
|
||||
[args] => Array
|
||||
(
|
||||
[0] => doit
|
||||
[1] => backtrace_print
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
[3] => Array
|
||||
(
|
||||
[file] => %sdebug_backtrace_options.php
|
||||
[line] => %d
|
||||
[function] => statCall
|
||||
[class] => foo
|
||||
[type] => ::
|
||||
[args] => Array
|
||||
(
|
||||
[0] => doit
|
||||
[1] => backtrace_print
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
==true
|
||||
Array
|
||||
(
|
||||
[0] => Array
|
||||
(
|
||||
[file] => %sdebug_backtrace_options.php
|
||||
[line] => 17
|
||||
[function] => backtrace_print
|
||||
[args] => Array
|
||||
(
|
||||
[0] => 1
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
[1] => Array
|
||||
(
|
||||
[file] => %sdebug_backtrace_options.php
|
||||
[line] => %d
|
||||
[function] => doit
|
||||
[args] => Array
|
||||
(
|
||||
[0] => a
|
||||
[1] => b
|
||||
[2] => backtrace_print
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
[2] => Array
|
||||
(
|
||||
[file] => %sdebug_backtrace_options.php
|
||||
[line] => %d
|
||||
[function] => doCall
|
||||
[class] => foo
|
||||
[object] => foo Object
|
||||
(
|
||||
)
|
||||
|
||||
[type] => ->
|
||||
[args] => Array
|
||||
(
|
||||
[0] => doit
|
||||
[1] => backtrace_print
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
[3] => Array
|
||||
(
|
||||
[file] => %sdebug_backtrace_options.php
|
||||
[line] => %d
|
||||
[function] => statCall
|
||||
[class] => foo
|
||||
[type] => ::
|
||||
[args] => Array
|
||||
(
|
||||
[0] => doit
|
||||
[1] => backtrace_print
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
==false
|
||||
Array
|
||||
(
|
||||
[0] => Array
|
||||
(
|
||||
[file] => %sdebug_backtrace_options.php
|
||||
[line] => 19
|
||||
[function] => backtrace_print
|
||||
[args] => Array
|
||||
(
|
||||
[0] =>
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
[1] => Array
|
||||
(
|
||||
[file] => %sdebug_backtrace_options.php
|
||||
[line] => %d
|
||||
[function] => doit
|
||||
[args] => Array
|
||||
(
|
||||
[0] => a
|
||||
[1] => b
|
||||
[2] => backtrace_print
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
[2] => Array
|
||||
(
|
||||
[file] => %sdebug_backtrace_options.php
|
||||
[line] => %d
|
||||
[function] => doCall
|
||||
[class] => foo
|
||||
[type] => ->
|
||||
[args] => Array
|
||||
(
|
||||
[0] => doit
|
||||
[1] => backtrace_print
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
[3] => Array
|
||||
(
|
||||
[file] => %sdebug_backtrace_options.php
|
||||
[line] => %d
|
||||
[function] => statCall
|
||||
[class] => foo
|
||||
[type] => ::
|
||||
[args] => Array
|
||||
(
|
||||
[0] => doit
|
||||
[1] => backtrace_print
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
==DEBUG_BACKTRACE_PROVIDE_OBJECT
|
||||
Array
|
||||
(
|
||||
[0] => Array
|
||||
(
|
||||
[file] => %sdebug_backtrace_options.php
|
||||
[line] => 21
|
||||
[function] => backtrace_print
|
||||
[args] => Array
|
||||
(
|
||||
[0] => 1
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
[1] => Array
|
||||
(
|
||||
[file] => %sdebug_backtrace_options.php
|
||||
[line] => %d
|
||||
[function] => doit
|
||||
[args] => Array
|
||||
(
|
||||
[0] => a
|
||||
[1] => b
|
||||
[2] => backtrace_print
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
[2] => Array
|
||||
(
|
||||
[file] => %sdebug_backtrace_options.php
|
||||
[line] => %d
|
||||
[function] => doCall
|
||||
[class] => foo
|
||||
[object] => foo Object
|
||||
(
|
||||
)
|
||||
|
||||
[type] => ->
|
||||
[args] => Array
|
||||
(
|
||||
[0] => doit
|
||||
[1] => backtrace_print
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
[3] => Array
|
||||
(
|
||||
[file] => %sdebug_backtrace_options.php
|
||||
[line] => %d
|
||||
[function] => statCall
|
||||
[class] => foo
|
||||
[type] => ::
|
||||
[args] => Array
|
||||
(
|
||||
[0] => doit
|
||||
[1] => backtrace_print
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
==DEBUG_BACKTRACE_IGNORE_ARGS
|
||||
Array
|
||||
(
|
||||
[0] => Array
|
||||
(
|
||||
[file] => %sdebug_backtrace_options.php
|
||||
[line] => 23
|
||||
[function] => backtrace_print
|
||||
)
|
||||
|
||||
[1] => Array
|
||||
(
|
||||
[file] => %sdebug_backtrace_options.php
|
||||
[line] => %d
|
||||
[function] => doit
|
||||
)
|
||||
|
||||
[2] => Array
|
||||
(
|
||||
[file] => %sdebug_backtrace_options.php
|
||||
[line] => %d
|
||||
[function] => doCall
|
||||
[class] => foo
|
||||
[type] => ->
|
||||
)
|
||||
|
||||
[3] => Array
|
||||
(
|
||||
[file] => %sdebug_backtrace_options.php
|
||||
[line] => %d
|
||||
[function] => statCall
|
||||
[class] => foo
|
||||
[type] => ::
|
||||
)
|
||||
|
||||
)
|
||||
==both
|
||||
Array
|
||||
(
|
||||
[0] => Array
|
||||
(
|
||||
[file] => %sdebug_backtrace_options.php
|
||||
[line] => 25
|
||||
[function] => backtrace_print
|
||||
)
|
||||
|
||||
[1] => Array
|
||||
(
|
||||
[file] => %sdebug_backtrace_options.php
|
||||
[line] => %d
|
||||
[function] => doit
|
||||
)
|
||||
|
||||
[2] => Array
|
||||
(
|
||||
[file] => %sdebug_backtrace_options.php
|
||||
[line] => %d
|
||||
[function] => doCall
|
||||
[class] => foo
|
||||
[object] => foo Object
|
||||
(
|
||||
)
|
||||
|
||||
[type] => ->
|
||||
)
|
||||
|
||||
[3] => Array
|
||||
(
|
||||
[file] => %sdebug_backtrace_options.php
|
||||
[line] => %d
|
||||
[function] => statCall
|
||||
[class] => foo
|
||||
[type] => ::
|
||||
)
|
||||
|
||||
)
|
||||
@@ -20,8 +20,4 @@ echo "Done\n";
|
||||
--EXPECTF--
|
||||
string(12) "test thrown!"
|
||||
|
||||
Fatal error: Uncaught exception 'Exception' in %sexception_handler_002.php:7
|
||||
Stack trace:
|
||||
#0 [internal function]: foo(Object(test))
|
||||
#1 {main}
|
||||
thrown in %sexception_handler_002.php on line %d
|
||||
Fatal error: Exception thrown without a stack frame in Unknown on line 0
|
||||
@@ -1,9 +0,0 @@
|
||||
--TEST--
|
||||
Argument parsing error #001
|
||||
--FILE--
|
||||
<?php
|
||||
function foo($arg1 string) {}
|
||||
?>
|
||||
--EXPECTF--
|
||||
Parse error: syntax error, unexpected T_STRING, expecting ')' in %sfunction_arguments_001.php on line %d
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
--TEST--
|
||||
Argument parsing error #002
|
||||
--FILE--
|
||||
<?php
|
||||
function foo($arg1/) {}
|
||||
?>
|
||||
--EXPECTF--
|
||||
Parse error: syntax error, unexpected '/', expecting ')' in %sfunction_arguments_002.php on line %d
|
||||
|
||||
@@ -3,7 +3,7 @@ GC 024: GC and objects with non-standard handlers
|
||||
--INI--
|
||||
zend.enable_gc=1
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("spl")) print "skip SPL extension required"; ?>
|
||||
<?php if (!extension_loaded("spl")) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$a = new ArrayObject();
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
--TEST--
|
||||
Indirect referenced $this
|
||||
--FILE--
|
||||
<?php
|
||||
class X {
|
||||
function f($x){var_dump($$x);}
|
||||
}
|
||||
$x = new X;
|
||||
$x->f("this");
|
||||
?>
|
||||
--EXPECTF--
|
||||
object(X)#%d (0) {
|
||||
}
|
||||
@@ -17,4 +17,4 @@ interface a extends d, w { }
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Cannot make non static method c::B() static in class d in %s on line %d
|
||||
Fatal error: Can't inherit abstract function c::B() (previously declared abstract in d) in %s on line %d
|
||||
@@ -14,8 +14,6 @@ interface b {
|
||||
interface c extends a, b {
|
||||
}
|
||||
|
||||
echo "done!\n";
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
done!
|
||||
Fatal error: Can't inherit abstract function b::b() (previously declared abstract in a) in %s on line %d
|
||||
@@ -38,6 +38,6 @@ bool(true)
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(false)
|
||||
AUTOLOAD 'X1'
|
||||
bool(false)
|
||||
Binary file not shown.
@@ -14,8 +14,6 @@ interface Itest2 {
|
||||
interface Itest3 extends Itest, Itest2 {
|
||||
}
|
||||
|
||||
echo "done!\n";
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
done!
|
||||
Fatal error: Can't inherit abstract function Itest2::a() (previously declared abstract in Itest) in %s on line %d
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
unset() CV 10 (unset() of global variable in ArrayObject::offsetUnset($GLOBALS))
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("spl")) print "skip SPL extension required"; ?>
|
||||
<?php if (!extension_loaded("spl")) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$a = new ArrayObject($GLOBALS);
|
||||
|
||||
+5
-47
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2012 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2010 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 |
|
||||
@@ -114,7 +114,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-2012 Zend Technologies\n"
|
||||
#define ZEND_CORE_VERSION_INFO "Zend Engine v" ZEND_VERSION ", Copyright (c) 1998-2010 Zend Technologies\n"
|
||||
#define PRINT_ZVAL_INDENT 4
|
||||
|
||||
static void print_hash(zend_write_func_t write_func, HashTable *ht, int indent, zend_bool is_object TSRMLS_DC) /* {{{ */
|
||||
@@ -808,7 +808,6 @@ ZEND_API void _zend_bailout(char *filename, uint lineno) /* {{{ */
|
||||
exit(-1);
|
||||
}
|
||||
CG(unclean_shutdown) = 1;
|
||||
CG(active_class_entry) = NULL;
|
||||
CG(in_compilation) = EG(in_execution) = 0;
|
||||
EG(current_execute_data) = NULL;
|
||||
LONGJMP(*EG(bailout), FAILURE);
|
||||
@@ -821,7 +820,7 @@ void zend_append_version_info(const zend_extension *extension) /* {{{ */
|
||||
char *new_info;
|
||||
uint new_info_length;
|
||||
|
||||
new_info_length = sizeof(" with v, , by \n")
|
||||
new_info_length = sizeof(" with v, by \n")
|
||||
+ strlen(extension->name)
|
||||
+ strlen(extension->version)
|
||||
+ strlen(extension->copyright)
|
||||
@@ -829,10 +828,10 @@ void zend_append_version_info(const zend_extension *extension) /* {{{ */
|
||||
|
||||
new_info = (char *) malloc(new_info_length + 1);
|
||||
|
||||
snprintf(new_info, new_info_length, " with %s v%s, %s, by %s\n", extension->name, extension->version, extension->copyright, extension->author);
|
||||
sprintf(new_info, " with %s v%s, %s, by %s\n", extension->name, extension->version, extension->copyright, extension->author);
|
||||
|
||||
zend_version_info = (char *) realloc(zend_version_info, zend_version_info_length+new_info_length + 1);
|
||||
strncat(zend_version_info, new_info, new_info_length);
|
||||
strcat(zend_version_info, new_info);
|
||||
zend_version_info_length += new_info_length;
|
||||
free(new_info);
|
||||
}
|
||||
@@ -958,23 +957,6 @@ ZEND_API int zend_get_configuration_directive(const char *name, uint name_length
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
#define SAVE_STACK(stack) do { \
|
||||
if (CG(stack).top) { \
|
||||
memcpy(&stack, &CG(stack), sizeof(zend_stack)); \
|
||||
CG(stack).top = CG(stack).max = 0; \
|
||||
CG(stack).elements = NULL; \
|
||||
} else { \
|
||||
stack.top = 0; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define RESTORE_STACK(stack) do { \
|
||||
if (stack.top) { \
|
||||
zend_stack_destroy(&CG(stack)); \
|
||||
memcpy(&CG(stack), &stack, sizeof(zend_stack)); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */
|
||||
{
|
||||
va_list args;
|
||||
@@ -987,14 +969,6 @@ ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */
|
||||
zval *orig_user_error_handler;
|
||||
zend_bool in_compilation;
|
||||
zend_class_entry *saved_class_entry;
|
||||
zend_stack bp_stack;
|
||||
zend_stack function_call_stack;
|
||||
zend_stack switch_cond_stack;
|
||||
zend_stack foreach_copy_stack;
|
||||
zend_stack object_stack;
|
||||
zend_stack declare_stack;
|
||||
zend_stack list_stack;
|
||||
zend_stack labels_stack;
|
||||
TSRMLS_FETCH();
|
||||
|
||||
/* Obtain relevant filename and lineno */
|
||||
@@ -1122,14 +1096,6 @@ ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */
|
||||
if (in_compilation) {
|
||||
saved_class_entry = CG(active_class_entry);
|
||||
CG(active_class_entry) = NULL;
|
||||
SAVE_STACK(bp_stack);
|
||||
SAVE_STACK(function_call_stack);
|
||||
SAVE_STACK(switch_cond_stack);
|
||||
SAVE_STACK(foreach_copy_stack);
|
||||
SAVE_STACK(object_stack);
|
||||
SAVE_STACK(declare_stack);
|
||||
SAVE_STACK(list_stack);
|
||||
SAVE_STACK(labels_stack);
|
||||
}
|
||||
|
||||
if (call_user_function_ex(CG(function_table), NULL, orig_user_error_handler, &retval, 5, params, 1, NULL TSRMLS_CC) == SUCCESS) {
|
||||
@@ -1146,14 +1112,6 @@ ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */
|
||||
|
||||
if (in_compilation) {
|
||||
CG(active_class_entry) = saved_class_entry;
|
||||
RESTORE_STACK(bp_stack);
|
||||
RESTORE_STACK(function_call_stack);
|
||||
RESTORE_STACK(switch_cond_stack);
|
||||
RESTORE_STACK(foreach_copy_stack);
|
||||
RESTORE_STACK(object_stack);
|
||||
RESTORE_STACK(declare_stack);
|
||||
RESTORE_STACK(list_stack);
|
||||
RESTORE_STACK(labels_stack);
|
||||
}
|
||||
|
||||
if (!EG(user_error_handler)) {
|
||||
|
||||
+1
-4
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2012 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2010 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 |
|
||||
@@ -771,9 +771,6 @@ ZEND_API void zend_save_error_handling(zend_error_handling *current TSRMLS_DC);
|
||||
ZEND_API void zend_replace_error_handling(zend_error_handling_t error_handling, zend_class_entry *exception_class, zend_error_handling *current TSRMLS_DC);
|
||||
ZEND_API void zend_restore_error_handling(zend_error_handling *saved TSRMLS_DC);
|
||||
|
||||
#define DEBUG_BACKTRACE_PROVIDE_OBJECT (1<<0)
|
||||
#define DEBUG_BACKTRACE_IGNORE_ARGS (1<<1)
|
||||
|
||||
#endif /* ZEND_H */
|
||||
|
||||
/*
|
||||
|
||||
+9
-35
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2012 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2010 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,6 +33,7 @@
|
||||
#endif
|
||||
|
||||
/* these variables are true statics/globals, and have to be mutex'ed on every access */
|
||||
static int module_count=0;
|
||||
ZEND_API HashTable module_registry;
|
||||
|
||||
/* this function doesn't check for too many parameters */
|
||||
@@ -253,14 +254,10 @@ ZEND_API int zend_get_object_classname(const zval *object, char **class_name, ze
|
||||
static int parse_arg_object_to_string(zval **arg TSRMLS_DC) /* {{{ */
|
||||
{
|
||||
if (Z_OBJ_HANDLER_PP(arg, cast_object)) {
|
||||
zval *obj;
|
||||
MAKE_STD_ZVAL(obj);
|
||||
if (Z_OBJ_HANDLER_P(*arg, cast_object)(*arg, obj, IS_STRING TSRMLS_CC) == SUCCESS) {
|
||||
zval_ptr_dtor(arg);
|
||||
*arg = obj;
|
||||
SEPARATE_ZVAL_IF_NOT_REF(arg);
|
||||
if (Z_OBJ_HANDLER_PP(arg, cast_object)(*arg, *arg, IS_STRING TSRMLS_CC) == SUCCESS) {
|
||||
return SUCCESS;
|
||||
}
|
||||
efree(obj);
|
||||
}
|
||||
/* Standard PHP objects */
|
||||
if (Z_OBJ_HT_PP(arg) == &std_object_handlers || !Z_OBJ_HANDLER_PP(arg, cast_object)) {
|
||||
@@ -931,7 +928,7 @@ ZEND_API int zend_parse_method_parameters_ex(int flags, int num_args TSRMLS_DC,
|
||||
va_end(va);
|
||||
} else {
|
||||
p++;
|
||||
RETURN_IF_ZERO_ARGS(num_args, p, quiet);
|
||||
RETURN_IF_ZERO_ARGS(num_args-1, p, quiet);
|
||||
|
||||
va_start(va, type_spec);
|
||||
|
||||
@@ -944,7 +941,6 @@ ZEND_API int zend_parse_method_parameters_ex(int flags, int num_args TSRMLS_DC,
|
||||
zend_error(E_CORE_ERROR, "%s::%s() must be derived from %s::%s",
|
||||
ce->name, get_active_function_name(TSRMLS_C), Z_OBJCE_P(this_ptr)->name, get_active_function_name(TSRMLS_C));
|
||||
}
|
||||
va_end(va);
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
@@ -2086,22 +2082,6 @@ ZEND_API int zend_get_module_started(const char *module_name) /* {{{ */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static int clean_module_class(const zend_class_entry **ce, int *module_number TSRMLS_DC) /* {{{ */
|
||||
{
|
||||
if ((*ce)->type == ZEND_INTERNAL_CLASS && (*ce)->module->module_number == *module_number) {
|
||||
return ZEND_HASH_APPLY_REMOVE;
|
||||
} else {
|
||||
return ZEND_HASH_APPLY_KEEP;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static void clean_module_classes(int module_number TSRMLS_DC) /* {{{ */
|
||||
{
|
||||
zend_hash_apply_with_argument(EG(class_table), (apply_func_arg_t) clean_module_class, (void *) &module_number TSRMLS_CC);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
void module_destructor(zend_module_entry *module) /* {{{ */
|
||||
{
|
||||
TSRMLS_FETCH();
|
||||
@@ -2109,7 +2089,6 @@ void module_destructor(zend_module_entry *module) /* {{{ */
|
||||
if (module->type == MODULE_TEMPORARY) {
|
||||
zend_clean_module_rsrc_dtors(module->module_number TSRMLS_CC);
|
||||
clean_module_constants(module->module_number TSRMLS_CC);
|
||||
clean_module_classes(module->module_number TSRMLS_CC);
|
||||
}
|
||||
|
||||
if (module->module_started && module->module_shutdown_func) {
|
||||
@@ -2137,7 +2116,7 @@ void module_destructor(zend_module_entry *module) /* {{{ */
|
||||
|
||||
#if HAVE_LIBDL
|
||||
#if !(defined(NETWARE) && defined(APACHE_1_BUILD))
|
||||
if (module->handle && !getenv("ZEND_DONT_UNLOAD_MODULES")) {
|
||||
if (module->handle) {
|
||||
DL_UNLOAD(module->handle);
|
||||
}
|
||||
#endif
|
||||
@@ -2183,7 +2162,7 @@ int module_registry_unload_temp(const zend_module_entry *module TSRMLS_DC) /* {{
|
||||
/* return the next free module number */
|
||||
int zend_next_free_module(void) /* {{{ */
|
||||
{
|
||||
return zend_hash_num_elements(&module_registry) + 1;
|
||||
return ++module_count;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -2311,7 +2290,7 @@ ZEND_API ZEND_FUNCTION(display_disabled_function)
|
||||
|
||||
static zend_function_entry disabled_function[] = {
|
||||
ZEND_FE(display_disabled_function, NULL)
|
||||
ZEND_FE_END
|
||||
{ NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
ZEND_API int zend_disable_function(char *function_name, uint function_name_length TSRMLS_DC) /* {{{ */
|
||||
@@ -2337,7 +2316,7 @@ static zend_object_value display_disabled_class(zend_class_entry *class_type TSR
|
||||
/* }}} */
|
||||
|
||||
static const zend_function_entry disabled_class_new[] = {
|
||||
ZEND_FE_END
|
||||
{ NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
ZEND_API int zend_disable_class(char *class_name, uint class_name_length TSRMLS_DC) /* {{{ */
|
||||
@@ -2594,11 +2573,6 @@ get_function_via_handler:
|
||||
if (fcc->function_handler) {
|
||||
retval = 1;
|
||||
call_via_handler = (fcc->function_handler->common.fn_flags & ZEND_ACC_CALL_VIA_HANDLER) != 0;
|
||||
if (call_via_handler && !fcc->object_ptr && EG(This) &&
|
||||
Z_OBJ_HT_P(EG(This))->get_class_entry &&
|
||||
instanceof_function(Z_OBJCE_P(EG(This)), fcc->calling_scope TSRMLS_CC)) {
|
||||
fcc->object_ptr = EG(This);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-3
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2012 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2010 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 |
|
||||
@@ -96,8 +96,6 @@ typedef struct _zend_fcall_info_cache {
|
||||
#define ZEND_NS_FALIAS(ns, name, alias, arg_info) ZEND_NS_FENTRY(ns, name, ZEND_FN(alias), arg_info, 0)
|
||||
#define ZEND_NS_DEP_FALIAS(ns, name, alias, arg_info) ZEND_NS_FENTRY(ns, name, ZEND_FN(alias), arg_info, ZEND_ACC_DEPRECATED)
|
||||
|
||||
#define ZEND_FE_END { NULL, NULL, NULL, 0, 0 }
|
||||
|
||||
#define ZEND_ARG_INFO(pass_by_ref, name) { #name, sizeof(#name)-1, NULL, 0, 0, 0, pass_by_ref, 0, 0 },
|
||||
#define ZEND_ARG_PASS_INFO(pass_by_ref) { NULL, 0, NULL, 0, 0, 0, pass_by_ref, 0, 0 },
|
||||
#define ZEND_ARG_OBJ_INFO(pass_by_ref, name, classname, allow_null) { #name, sizeof(#name)-1, #classname, sizeof(#classname)-1, 0, allow_null, pass_by_ref, 0, 0 },
|
||||
|
||||
+3
-13
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2012 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2010 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 |
|
||||
@@ -241,10 +241,6 @@ static zend_mm_storage* zend_mm_mem_win32_init(void *params)
|
||||
return NULL;
|
||||
}
|
||||
storage = (zend_mm_storage*)malloc(sizeof(zend_mm_storage));
|
||||
if (storage == NULL) {
|
||||
HeapDestroy(heap);
|
||||
return NULL;
|
||||
}
|
||||
storage->data = (void*) heap;
|
||||
return storage;
|
||||
}
|
||||
@@ -510,7 +506,7 @@ static unsigned int _zend_mm_cookie = 0;
|
||||
#define ZEND_MM_IS_GUARD_BLOCK(b) (((b)->info._size & ZEND_MM_TYPE_MASK) == ZEND_MM_GUARD_BLOCK)
|
||||
|
||||
#define ZEND_MM_NEXT_BLOCK(b) ZEND_MM_BLOCK_AT(b, ZEND_MM_BLOCK_SIZE(b))
|
||||
#define ZEND_MM_PREV_BLOCK(b) ZEND_MM_BLOCK_AT(b, -(ssize_t)((b)->info._prev & ~ZEND_MM_TYPE_MASK))
|
||||
#define ZEND_MM_PREV_BLOCK(b) ZEND_MM_BLOCK_AT(b, -(int)((b)->info._prev & ~ZEND_MM_TYPE_MASK))
|
||||
|
||||
#define ZEND_MM_PREV_BLOCK_IS_FREE(b) (!((b)->info._prev & ZEND_MM_USED_BLOCK))
|
||||
|
||||
@@ -1070,13 +1066,7 @@ ZEND_API zend_mm_heap *zend_mm_startup_ex(const zend_mm_mem_handlers *handlers,
|
||||
storage->handlers = handlers;
|
||||
|
||||
heap = malloc(sizeof(struct _zend_mm_heap));
|
||||
if (heap == NULL) {
|
||||
fprintf(stderr, "Cannot allocate heap for zend_mm storage [%s]\n", handlers->name);
|
||||
#ifdef PHP_WIN32
|
||||
fflush(stderr);
|
||||
#endif
|
||||
exit(255);
|
||||
}
|
||||
|
||||
heap->storage = storage;
|
||||
heap->block_size = block_size;
|
||||
heap->compact_size = 0;
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2012 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2010 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
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2012 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2010 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-2012 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2010 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 |
|
||||
@@ -211,7 +211,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_get_defined_constants, 0, 0, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_debug_backtrace, 0, 0, 0)
|
||||
ZEND_ARG_INFO(0, options)
|
||||
ZEND_ARG_INFO(0, provide_object)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_extension_loaded, 0, 0, 1)
|
||||
@@ -272,7 +272,7 @@ static const zend_function_entry builtin_functions[] = { /* {{{ */
|
||||
ZEND_FE(get_extension_funcs, arginfo_extension_loaded)
|
||||
ZEND_FE(get_defined_constants, arginfo_get_defined_constants)
|
||||
ZEND_FE(debug_backtrace, arginfo_debug_backtrace)
|
||||
ZEND_FE(debug_print_backtrace, arginfo_debug_backtrace)
|
||||
ZEND_FE(debug_print_backtrace, arginfo_zend__void)
|
||||
#if ZEND_DEBUG
|
||||
ZEND_FE(zend_test_func, NULL)
|
||||
#ifdef ZTS
|
||||
@@ -283,7 +283,7 @@ static const zend_function_entry builtin_functions[] = { /* {{{ */
|
||||
ZEND_FE(gc_enabled, arginfo_zend__void)
|
||||
ZEND_FE(gc_enable, arginfo_zend__void)
|
||||
ZEND_FE(gc_disable, arginfo_zend__void)
|
||||
ZEND_FE_END
|
||||
{ NULL, NULL, NULL }
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
@@ -816,37 +816,51 @@ static void is_a_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool only_subclass)
|
||||
int class_name_len;
|
||||
zend_class_entry *instance_ce;
|
||||
zend_class_entry **ce;
|
||||
zend_bool allow_string = only_subclass;
|
||||
zend_bool retval;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zs|b", &obj, &class_name, &class_name_len, &allow_string) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zs", &obj, &class_name, &class_name_len) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
/*
|
||||
allow_string - is_a default is no, is_subclass_of is yes.
|
||||
if it's allowed, then the autoloader will be called if the class does not exist.
|
||||
default behaviour is different, as 'is_a' usage is normally to test mixed return values
|
||||
*/
|
||||
|
||||
if (allow_string && Z_TYPE_P(obj) == IS_STRING) {
|
||||
|
||||
if (only_subclass && Z_TYPE_P(obj) == IS_STRING) {
|
||||
zend_class_entry **the_ce;
|
||||
if (zend_lookup_class(Z_STRVAL_P(obj), Z_STRLEN_P(obj), &the_ce TSRMLS_CC) == FAILURE) {
|
||||
zend_error(E_WARNING, "Unknown class passed as parameter");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
instance_ce = *the_ce;
|
||||
} else if (Z_TYPE_P(obj) == IS_OBJECT && HAS_CLASS_ENTRY(*obj)) {
|
||||
instance_ce = Z_OBJCE_P(obj);
|
||||
} else if (Z_TYPE_P(obj) != IS_OBJECT) {
|
||||
RETURN_FALSE;
|
||||
} else {
|
||||
instance_ce = NULL;
|
||||
}
|
||||
|
||||
/* TBI!! new object handlers */
|
||||
if (Z_TYPE_P(obj) == IS_OBJECT && !HAS_CLASS_ENTRY(*obj)) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (zend_lookup_class_ex(class_name, class_name_len, 0, &ce TSRMLS_CC) == FAILURE) {
|
||||
retval = 0;
|
||||
} else {
|
||||
if (only_subclass && instance_ce == *ce) {
|
||||
retval = 0;
|
||||
if (only_subclass) {
|
||||
if (!instance_ce) {
|
||||
instance_ce = Z_OBJCE_P(obj)->parent;
|
||||
} else {
|
||||
instance_ce = instance_ce->parent;
|
||||
}
|
||||
} else {
|
||||
retval = instanceof_function(instance_ce, *ce TSRMLS_CC);
|
||||
instance_ce = Z_OBJCE_P(obj);
|
||||
}
|
||||
|
||||
if (!instance_ce) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (instanceof_function(instance_ce, *ce TSRMLS_CC)) {
|
||||
retval = 1;
|
||||
} else {
|
||||
retval = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -854,7 +868,7 @@ static void is_a_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool only_subclass)
|
||||
}
|
||||
|
||||
|
||||
/* {{{ proto bool is_subclass_of(mixed object_or_string, string class_name [, bool allow_string=true])
|
||||
/* {{{ proto bool is_subclass_of(object object, string class_name)
|
||||
Returns true if the object has this class as one of its parents */
|
||||
ZEND_FUNCTION(is_subclass_of)
|
||||
{
|
||||
@@ -863,8 +877,8 @@ ZEND_FUNCTION(is_subclass_of)
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ proto bool is_a(mixed object_or_string, string class_name [, bool allow_string=false])
|
||||
Returns true if the first argument is an object and is this class or has this class as one of its parents, */
|
||||
/* {{{ proto bool is_a(object object, string class_name)
|
||||
Returns true if the object is of this class or has this class as one of its parents */
|
||||
ZEND_FUNCTION(is_a)
|
||||
{
|
||||
is_a_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
|
||||
@@ -1516,7 +1530,8 @@ ZEND_FUNCTION(set_exception_handler)
|
||||
RETURN_TRUE;
|
||||
}
|
||||
|
||||
MAKE_COPY_ZVAL(&exception_handler, EG(user_exception_handler))
|
||||
*EG(user_exception_handler) = *exception_handler;
|
||||
zval_copy_ctor(EG(user_exception_handler));
|
||||
|
||||
if (!had_orig_exception_handler) {
|
||||
RETURN_NULL();
|
||||
@@ -1718,7 +1733,7 @@ ZEND_FUNCTION(create_function)
|
||||
function_name[0] = '\0';
|
||||
|
||||
do {
|
||||
function_name_length = 1 + snprintf(function_name + 1, sizeof("lambda_")+MAX_LENGTH_OF_LONG, "lambda_%d", ++EG(lambda_count));
|
||||
function_name_length = 1 + sprintf(function_name + 1, "lambda_%d", ++EG(lambda_count));
|
||||
} while (zend_hash_add(EG(function_table), function_name, function_name_length+1, &new_function, sizeof(zend_function), NULL)==FAILURE);
|
||||
zend_hash_del(EG(function_table), LAMBDA_TEMP_FUNCNAME, sizeof(LAMBDA_TEMP_FUNCNAME));
|
||||
RETURN_STRINGL(function_name, function_name_length, 0);
|
||||
@@ -1929,7 +1944,7 @@ void debug_print_backtrace_args(zval *arg_array TSRMLS_DC)
|
||||
}
|
||||
}
|
||||
|
||||
/* {{{ proto void debug_print_backtrace([int options]) */
|
||||
/* {{{ proto void debug_print_backtrace(void) */
|
||||
ZEND_FUNCTION(debug_print_backtrace)
|
||||
{
|
||||
zend_execute_data *ptr, *skip;
|
||||
@@ -1941,9 +1956,8 @@ ZEND_FUNCTION(debug_print_backtrace)
|
||||
char *include_filename = NULL;
|
||||
zval *arg_array = NULL;
|
||||
int indent = 0;
|
||||
long options = 0;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &options) == FAILURE) {
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2002,7 +2016,7 @@ ZEND_FUNCTION(debug_print_backtrace)
|
||||
call_type = NULL;
|
||||
}
|
||||
if ((! ptr->opline) || ((ptr->opline->opcode == ZEND_DO_FCALL_BY_NAME) || (ptr->opline->opcode == ZEND_DO_FCALL))) {
|
||||
if (ptr->function_state.arguments && (options & DEBUG_BACKTRACE_IGNORE_ARGS) == 0) {
|
||||
if (ptr->function_state.arguments) {
|
||||
arg_array = debug_backtrace_get_args(ptr->function_state.arguments TSRMLS_CC);
|
||||
}
|
||||
}
|
||||
@@ -2052,7 +2066,7 @@ ZEND_FUNCTION(debug_print_backtrace)
|
||||
ZEND_PUTS(class_name);
|
||||
ZEND_PUTS(call_type);
|
||||
}
|
||||
zend_printf("%s(", function_name);
|
||||
zend_printf("%s(", function_name?function_name:"main");
|
||||
if (arg_array) {
|
||||
debug_print_backtrace_args(arg_array TSRMLS_CC);
|
||||
zval_ptr_dtor(&arg_array);
|
||||
@@ -2089,7 +2103,7 @@ ZEND_FUNCTION(debug_print_backtrace)
|
||||
|
||||
/* }}} */
|
||||
|
||||
ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int options TSRMLS_DC)
|
||||
ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int provide_object TSRMLS_DC)
|
||||
{
|
||||
zend_execute_data *ptr, *skip;
|
||||
int lineno;
|
||||
@@ -2173,7 +2187,7 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int
|
||||
add_assoc_string_ex(stack_frame, "class", sizeof("class"), class_name, dup);
|
||||
|
||||
}
|
||||
if ((options & DEBUG_BACKTRACE_PROVIDE_OBJECT) != 0) {
|
||||
if (provide_object) {
|
||||
add_assoc_zval_ex(stack_frame, "object", sizeof("object"), ptr->object);
|
||||
Z_ADDREF_P(ptr->object);
|
||||
}
|
||||
@@ -2184,8 +2198,7 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int
|
||||
add_assoc_string_ex(stack_frame, "type", sizeof("type"), "::", 1);
|
||||
}
|
||||
|
||||
if ((options & DEBUG_BACKTRACE_IGNORE_ARGS) == 0 &&
|
||||
((! ptr->opline) || ((ptr->opline->opcode == ZEND_DO_FCALL_BY_NAME) || (ptr->opline->opcode == ZEND_DO_FCALL)))) {
|
||||
if ((! ptr->opline) || ((ptr->opline->opcode == ZEND_DO_FCALL_BY_NAME) || (ptr->opline->opcode == ZEND_DO_FCALL))) {
|
||||
if (ptr->function_state.arguments) {
|
||||
add_assoc_zval_ex(stack_frame, "args", sizeof("args"), debug_backtrace_get_args(ptr->function_state.arguments TSRMLS_CC));
|
||||
}
|
||||
@@ -2251,17 +2264,17 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ proto array debug_backtrace([int options])
|
||||
/* {{{ proto array debug_backtrace([bool provide_object])
|
||||
Return backtrace as array */
|
||||
ZEND_FUNCTION(debug_backtrace)
|
||||
{
|
||||
long options = DEBUG_BACKTRACE_PROVIDE_OBJECT;
|
||||
zend_bool provide_object = 1;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &options) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|b", &provide_object) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
zend_fetch_debug_backtrace(return_value, 1, options TSRMLS_CC);
|
||||
zend_fetch_debug_backtrace(return_value, 1, provide_object TSRMLS_CC);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2012 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2010 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 |
|
||||
@@ -25,7 +25,7 @@
|
||||
int zend_startup_builtin_functions(TSRMLS_D);
|
||||
|
||||
BEGIN_EXTERN_C()
|
||||
ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int options TSRMLS_DC);
|
||||
ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int provide_object TSRMLS_DC);
|
||||
END_EXTERN_C()
|
||||
|
||||
#endif /* ZEND_BUILTIN_FUNCTIONS_H */
|
||||
|
||||
+7
-29
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2012 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2010 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 |
|
||||
@@ -280,18 +280,6 @@ static HashTable *zend_closure_get_debug_info(zval *object, int *is_temp TSRMLS_
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static HashTable *zend_closure_get_properties(zval *obj TSRMLS_DC) /* {{{ */
|
||||
{
|
||||
zend_closure *closure = (zend_closure *)zend_object_store_get_object(obj TSRMLS_CC);
|
||||
|
||||
if (GC_G(gc_active)) {
|
||||
return (closure->func.type == ZEND_USER_FUNCTION) ? closure->func.op_array.static_variables : NULL;
|
||||
}
|
||||
|
||||
return closure->std.properties;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto Closure::__construct()
|
||||
Private constructor preventing instantiation */
|
||||
ZEND_METHOD(Closure, __construct)
|
||||
@@ -328,7 +316,6 @@ void zend_register_closure_ce(TSRMLS_D) /* {{{ */
|
||||
closure_handlers.clone_obj = NULL;
|
||||
closure_handlers.get_debug_info = zend_closure_get_debug_info;
|
||||
closure_handlers.get_closure = zend_closure_get_closure;
|
||||
closure_handlers.get_properties = zend_closure_get_properties;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -336,7 +323,6 @@ static int zval_copy_static_var(zval **p TSRMLS_DC, int num_args, va_list args,
|
||||
{
|
||||
HashTable *target = va_arg(args, HashTable*);
|
||||
zend_bool is_ref;
|
||||
zval *tmp;
|
||||
|
||||
if (Z_TYPE_PP(p) & (IS_LEXICAL_VAR|IS_LEXICAL_REF)) {
|
||||
is_ref = Z_TYPE_PP(p) & IS_LEXICAL_REF;
|
||||
@@ -346,32 +332,25 @@ static int zval_copy_static_var(zval **p TSRMLS_DC, int num_args, va_list args,
|
||||
}
|
||||
if (zend_hash_quick_find(EG(active_symbol_table), key->arKey, key->nKeyLength, key->h, (void **) &p) == FAILURE) {
|
||||
if (is_ref) {
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_INIT_ZVAL(tmp);
|
||||
Z_SET_ISREF_P(tmp);
|
||||
zend_hash_quick_add(EG(active_symbol_table), key->arKey, key->nKeyLength, key->h, &tmp, sizeof(zval*), (void**)&p);
|
||||
} else {
|
||||
tmp = EG(uninitialized_zval_ptr);
|
||||
p = &EG(uninitialized_zval_ptr);
|
||||
zend_error(E_NOTICE,"Undefined variable: %s", key->arKey);
|
||||
}
|
||||
} else {
|
||||
if (is_ref) {
|
||||
SEPARATE_ZVAL_TO_MAKE_IS_REF(p);
|
||||
tmp = *p;
|
||||
} else if (Z_ISREF_PP(p)) {
|
||||
ALLOC_INIT_ZVAL(tmp);
|
||||
*tmp = **p;
|
||||
zval_copy_ctor(tmp);
|
||||
Z_SET_REFCOUNT_P(tmp, 0);
|
||||
Z_UNSET_ISREF_P(tmp);
|
||||
} else {
|
||||
tmp = *p;
|
||||
SEPARATE_ZVAL(p);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
tmp = *p;
|
||||
}
|
||||
if (zend_hash_quick_add(target, key->arKey, key->nKeyLength, key->h, &tmp, sizeof(zval*), NULL) == SUCCESS) {
|
||||
Z_ADDREF_P(tmp);
|
||||
if (zend_hash_quick_add(target, key->arKey, key->nKeyLength, key->h, p, sizeof(zval*), NULL) == SUCCESS) {
|
||||
Z_ADDREF_PP(p);
|
||||
}
|
||||
return ZEND_HASH_APPLY_KEEP;
|
||||
}
|
||||
@@ -386,7 +365,6 @@ ZEND_API void zend_create_closure(zval *res, zend_function *func TSRMLS_DC) /* {
|
||||
closure = (zend_closure *)zend_object_store_get_object(res TSRMLS_CC);
|
||||
|
||||
closure->func = *func;
|
||||
closure->func.common.prototype = NULL;
|
||||
|
||||
if (closure->func.type == ZEND_USER_FUNCTION) {
|
||||
if (closure->func.op_array.static_variables) {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2012 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2010 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 |
|
||||
|
||||
+64
-102
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2012 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2010 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 |
|
||||
@@ -387,7 +387,6 @@ void fetch_simple_variable_ex(znode *result, znode *varname, int bp, zend_uchar
|
||||
result->op_type = IS_CV;
|
||||
result->u.var = lookup_cv(CG(active_op_array), varname->u.constant.value.str.val, varname->u.constant.value.str.len);
|
||||
result->u.EA.type = 0;
|
||||
varname->u.constant.value.str.val = CG(active_op_array)->vars[result->u.var].name;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -626,7 +625,7 @@ void zend_do_assign(znode *result, znode *variable, const znode *value TSRMLS_DC
|
||||
if (variable->op_type == IS_CV) {
|
||||
if (variable->u.var == CG(active_op_array)->this_var) {
|
||||
zend_error(E_COMPILE_ERROR, "Cannot re-assign $this");
|
||||
}
|
||||
}
|
||||
} else if (variable->op_type == IS_VAR) {
|
||||
int n = 0;
|
||||
|
||||
@@ -706,7 +705,7 @@ void zend_do_assign_ref(znode *result, const znode *lvar, const znode *rvar TSRM
|
||||
if (lvar->op_type == IS_CV) {
|
||||
if (lvar->u.var == CG(active_op_array)->this_var) {
|
||||
zend_error(E_COMPILE_ERROR, "Cannot re-assign $this");
|
||||
}
|
||||
}
|
||||
} else if (lvar->op_type == IS_VAR) {
|
||||
int last_op_number = get_next_op_number(CG(active_op_array));
|
||||
|
||||
@@ -1009,7 +1008,7 @@ void zend_do_end_variable_parse(znode *variable, int type, int arg_offset TSRMLS
|
||||
variable->op_type = IS_CV;
|
||||
variable->u.var = CG(active_op_array)->this_var;
|
||||
}
|
||||
} else if (CG(active_op_array)->this_var == -1) {
|
||||
} else if (CG(active_op_array)->this_var == -1) {
|
||||
CG(active_op_array)->this_var = lookup_cv(CG(active_op_array), estrndup("this", sizeof("this")-1), sizeof("this")-1);
|
||||
}
|
||||
}
|
||||
@@ -1895,14 +1894,14 @@ void zend_resolve_goto_label(zend_op_array *op_array, zend_op *opline, int pass2
|
||||
long current, distance;
|
||||
|
||||
if (CG(labels) == NULL ||
|
||||
zend_hash_find(CG(labels), Z_STRVAL(opline->op2.u.constant), Z_STRLEN(opline->op2.u.constant)+1, (void**)&dest) == FAILURE) {
|
||||
zend_hash_find(CG(labels), Z_STRVAL(opline->op2.u.constant), Z_STRLEN(opline->op2.u.constant)+1, (void**)&dest) == FAILURE) {
|
||||
|
||||
if (pass2) {
|
||||
CG(in_compilation) = 1;
|
||||
CG(active_op_array) = op_array;
|
||||
CG(zend_lineno) = opline->lineno;
|
||||
if (pass2) {
|
||||
CG(in_compilation) = 1;
|
||||
CG(active_op_array) = op_array;
|
||||
CG(zend_lineno) = opline->lineno;
|
||||
zend_error(E_COMPILE_ERROR, "'goto' to undefined label '%s'", Z_STRVAL(opline->op2.u.constant));
|
||||
} else {
|
||||
} else {
|
||||
/* Label is not defined. Delay to pass 2. */
|
||||
INC_BPC(op_array);
|
||||
return;
|
||||
@@ -1916,11 +1915,11 @@ void zend_resolve_goto_label(zend_op_array *op_array, zend_op *opline, int pass2
|
||||
current = opline->extended_value;
|
||||
for (distance = 0; current != dest->brk_cont; distance++) {
|
||||
if (current == -1) {
|
||||
if (pass2) {
|
||||
CG(in_compilation) = 1;
|
||||
CG(active_op_array) = op_array;
|
||||
CG(zend_lineno) = opline->lineno;
|
||||
}
|
||||
if (pass2) {
|
||||
CG(in_compilation) = 1;
|
||||
CG(active_op_array) = op_array;
|
||||
CG(zend_lineno) = opline->lineno;
|
||||
}
|
||||
zend_error(E_COMPILE_ERROR, "'goto' into loop or switch statement is disallowed");
|
||||
}
|
||||
current = op_array->brk_cont_array[current].parent;
|
||||
@@ -1936,9 +1935,9 @@ void zend_resolve_goto_label(zend_op_array *op_array, zend_op *opline, int pass2
|
||||
ZVAL_LONG(&opline->op2.u.constant, distance);
|
||||
}
|
||||
|
||||
if (pass2) {
|
||||
if (pass2) {
|
||||
DEC_BPC(op_array);
|
||||
}
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -2010,7 +2009,7 @@ int zend_do_begin_class_member_function_call(znode *class_name, znode *method_na
|
||||
if (method_name->op_type == IS_CONST) {
|
||||
char *lcname = zend_str_tolower_dup(Z_STRVAL(method_name->u.constant), Z_STRLEN(method_name->u.constant));
|
||||
if ((sizeof(ZEND_CONSTRUCTOR_FUNC_NAME)-1) == Z_STRLEN(method_name->u.constant) &&
|
||||
memcmp(lcname, ZEND_CONSTRUCTOR_FUNC_NAME, sizeof(ZEND_CONSTRUCTOR_FUNC_NAME)-1) == 0) {
|
||||
memcmp(lcname, ZEND_CONSTRUCTOR_FUNC_NAME, sizeof(ZEND_CONSTRUCTOR_FUNC_NAME)-1) == 0) {
|
||||
zval_dtor(&method_name->u.constant);
|
||||
SET_UNUSED(*method_name);
|
||||
}
|
||||
@@ -2018,7 +2017,7 @@ int zend_do_begin_class_member_function_call(znode *class_name, znode *method_na
|
||||
}
|
||||
|
||||
if (class_name->op_type == IS_CONST &&
|
||||
ZEND_FETCH_CLASS_DEFAULT == zend_get_class_fetch_type(Z_STRVAL(class_name->u.constant), Z_STRLEN(class_name->u.constant))) {
|
||||
ZEND_FETCH_CLASS_DEFAULT == zend_get_class_fetch_type(Z_STRVAL(class_name->u.constant), Z_STRLEN(class_name->u.constant))) {
|
||||
fetch_type = ZEND_FETCH_CLASS_GLOBAL;
|
||||
zend_resolve_class_name(class_name, &fetch_type, 1 TSRMLS_CC);
|
||||
class_node = *class_name;
|
||||
@@ -2081,9 +2080,9 @@ void zend_do_pass_param(znode *param, zend_uchar op, int offset TSRMLS_DC) /* {{
|
||||
|
||||
if (original_op == ZEND_SEND_REF && !CG(allow_call_time_pass_reference)) {
|
||||
if (function_ptr &&
|
||||
function_ptr->common.function_name &&
|
||||
function_ptr->common.type == ZEND_USER_FUNCTION &&
|
||||
!ARG_SHOULD_BE_SENT_BY_REF(function_ptr, (zend_uint) offset)) {
|
||||
function_ptr->common.function_name &&
|
||||
function_ptr->common.type == ZEND_USER_FUNCTION &&
|
||||
!ARG_SHOULD_BE_SENT_BY_REF(function_ptr, (zend_uint) offset)) {
|
||||
zend_error(E_DEPRECATED,
|
||||
"Call-time pass-by-reference has been deprecated; "
|
||||
"If you would like to pass it by reference, modify the declaration of %s(). "
|
||||
@@ -2529,7 +2528,7 @@ static void do_inherit_method(zend_function *function) /* {{{ */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static zend_bool zend_do_perform_implementation_check(const zend_function *fe, const zend_function *proto TSRMLS_DC) /* {{{ */
|
||||
static zend_bool zend_do_perform_implementation_check(const zend_function *fe, const zend_function *proto) /* {{{ */
|
||||
{
|
||||
zend_uint i;
|
||||
|
||||
@@ -2572,24 +2571,11 @@ static zend_bool zend_do_perform_implementation_check(const zend_function *fe, c
|
||||
&& strcasecmp(fe->common.arg_info[i].class_name, proto->common.arg_info[i].class_name)!=0) {
|
||||
char *colon;
|
||||
|
||||
if (fe->common.type != ZEND_USER_FUNCTION) {
|
||||
return 0;
|
||||
} else if (strchr(proto->common.arg_info[i].class_name, '\\') != NULL ||
|
||||
if (fe->common.type != ZEND_USER_FUNCTION ||
|
||||
strchr(proto->common.arg_info[i].class_name, '\\') != NULL ||
|
||||
(colon = zend_memrchr(fe->common.arg_info[i].class_name, '\\', fe->common.arg_info[i].class_name_len)) == NULL ||
|
||||
strcasecmp(colon+1, proto->common.arg_info[i].class_name) != 0) {
|
||||
zend_class_entry **fe_ce, **proto_ce;
|
||||
int found, found2;
|
||||
|
||||
found = zend_lookup_class(fe->common.arg_info[i].class_name, fe->common.arg_info[i].class_name_len, &fe_ce TSRMLS_CC);
|
||||
found2 = zend_lookup_class(proto->common.arg_info[i].class_name, proto->common.arg_info[i].class_name_len, &proto_ce TSRMLS_CC);
|
||||
|
||||
/* Check for class alias */
|
||||
if (found != SUCCESS || found2 != SUCCESS ||
|
||||
(*fe_ce)->type == ZEND_INTERNAL_CLASS ||
|
||||
(*proto_ce)->type == ZEND_INTERNAL_CLASS ||
|
||||
*fe_ce != *proto_ce) {
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
if (fe->common.arg_info[i].array_type_hint != proto->common.arg_info[i].array_type_hint) {
|
||||
@@ -2628,8 +2614,7 @@ static zend_bool do_inherit_method_check(HashTable *child_function_table, zend_f
|
||||
return 1; /* method doesn't exist in child, copy from parent */
|
||||
}
|
||||
|
||||
if ((parent->common.scope->ce_flags & ZEND_ACC_INTERFACE) == 0
|
||||
&& parent->common.fn_flags & ZEND_ACC_ABSTRACT
|
||||
if (parent->common.fn_flags & ZEND_ACC_ABSTRACT
|
||||
&& parent->common.scope != (child->common.prototype ? child->common.prototype->common.scope : child->common.scope)
|
||||
&& child->common.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_IMPLEMENTED_ABSTRACT)) {
|
||||
zend_error(E_COMPILE_ERROR, "Can't inherit abstract function %s::%s() (previously declared abstract in %s)",
|
||||
@@ -2682,11 +2667,11 @@ static zend_bool do_inherit_method_check(HashTable *child_function_table, zend_f
|
||||
}
|
||||
|
||||
if (child->common.prototype && (child->common.prototype->common.fn_flags & ZEND_ACC_ABSTRACT)) {
|
||||
if (!zend_do_perform_implementation_check(child, child->common.prototype TSRMLS_CC)) {
|
||||
if (!zend_do_perform_implementation_check(child, child->common.prototype)) {
|
||||
zend_error(E_COMPILE_ERROR, "Declaration of %s::%s() must be compatible with that of %s::%s()", ZEND_FN_SCOPE_NAME(child), child->common.function_name, ZEND_FN_SCOPE_NAME(child->common.prototype), child->common.prototype->common.function_name);
|
||||
}
|
||||
} else if (EG(error_reporting) & E_STRICT || EG(user_error_handler)) { /* Check E_STRICT (or custom error handler) before the check so that we save some time */
|
||||
if (!zend_do_perform_implementation_check(child, parent TSRMLS_CC)) {
|
||||
if (!zend_do_perform_implementation_check(child, parent)) {
|
||||
zend_error(E_STRICT, "Declaration of %s::%s() should be compatible with that of %s::%s()", ZEND_FN_SCOPE_NAME(child), child->common.function_name, ZEND_FN_SCOPE_NAME(parent), parent->common.function_name);
|
||||
}
|
||||
}
|
||||
@@ -3074,9 +3059,9 @@ void zend_do_early_binding(TSRMLS_D) /* {{{ */
|
||||
zend_class_entry **pce;
|
||||
|
||||
if ((zend_lookup_class(Z_STRVAL_P(parent_name), Z_STRLEN_P(parent_name), &pce TSRMLS_CC) == FAILURE) ||
|
||||
((CG(compiler_options) & ZEND_COMPILE_IGNORE_INTERNAL_CLASSES) &&
|
||||
((*pce)->type == ZEND_INTERNAL_CLASS))) {
|
||||
if (CG(compiler_options) & ZEND_COMPILE_DELAYED_BINDING) {
|
||||
((CG(compiler_options) & ZEND_COMPILE_IGNORE_INTERNAL_CLASSES) &&
|
||||
((*pce)->type == ZEND_INTERNAL_CLASS))) {
|
||||
if (CG(compiler_options) & ZEND_COMPILE_DELAYED_BINDING) {
|
||||
zend_uint *opline_num = &CG(active_op_array)->early_binding;
|
||||
|
||||
while (*opline_num != -1) {
|
||||
@@ -3406,7 +3391,7 @@ void zend_do_begin_class_declaration(const znode *class_token, znode *class_name
|
||||
|
||||
/* Class name must not conflict with import names */
|
||||
if (CG(current_import) &&
|
||||
zend_hash_find(CG(current_import), lcname, Z_STRLEN(class_name->u.constant)+1, (void**)&ns_name) == SUCCESS) {
|
||||
zend_hash_find(CG(current_import), lcname, Z_STRLEN(class_name->u.constant)+1, (void**)&ns_name) == SUCCESS) {
|
||||
error = 1;
|
||||
}
|
||||
|
||||
@@ -3641,7 +3626,7 @@ void zend_do_declare_property(const znode *var_name, const znode *value, zend_ui
|
||||
|
||||
if (access_type & ZEND_ACC_FINAL) {
|
||||
zend_error(E_COMPILE_ERROR, "Cannot declare property %s::$%s final, the final modifier is allowed only for methods and classes",
|
||||
CG(active_class_entry)->name, var_name->u.constant.value.str.val);
|
||||
CG(active_class_entry)->name, var_name->u.constant.value.str.val);
|
||||
}
|
||||
|
||||
if (zend_hash_find(&CG(active_class_entry)->properties_info, var_name->u.constant.value.str.val, var_name->u.constant.value.str.len+1, (void **) &existing_property_info)==SUCCESS) {
|
||||
@@ -3704,8 +3689,8 @@ void zend_do_fetch_property(znode *result, znode *object, const znode *property
|
||||
|
||||
if (object->op_type == IS_CV) {
|
||||
if (object->u.var == CG(active_op_array)->this_var) {
|
||||
SET_UNUSED(*object); /* this means $this for objects */
|
||||
}
|
||||
SET_UNUSED(*object); /* this means $this for objects */
|
||||
}
|
||||
} else if (fetch_list_ptr->count == 1) {
|
||||
zend_llist_element *le = fetch_list_ptr->head;
|
||||
zend_op *opline_ptr = (zend_op *) le->data;
|
||||
@@ -3758,20 +3743,11 @@ void zend_do_halt_compiler_register(TSRMLS_D) /* {{{ */
|
||||
char *name, *cfilename;
|
||||
char haltoff[] = "__COMPILER_HALT_OFFSET__";
|
||||
int len, clen;
|
||||
|
||||
if (CG(has_bracketed_namespaces) && CG(in_namespace)) {
|
||||
zend_error(E_COMPILE_ERROR, "__HALT_COMPILER() can only be used from the outermost scope");
|
||||
}
|
||||
|
||||
cfilename = zend_get_compiled_filename(TSRMLS_C);
|
||||
clen = strlen(cfilename);
|
||||
zend_mangle_property_name(&name, &len, haltoff, sizeof(haltoff) - 1, cfilename, clen, 0);
|
||||
zend_register_long_constant(name, len+1, zend_get_scanned_file_offset(TSRMLS_C), CONST_CS, 0 TSRMLS_CC);
|
||||
pefree(name, 0);
|
||||
|
||||
if (CG(in_namespace)) {
|
||||
zend_do_end_namespace(TSRMLS_C);
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -3889,10 +3865,10 @@ static zend_constant* zend_get_ct_const(const zval *const_name, int all_internal
|
||||
return c;
|
||||
}
|
||||
if (all_internal_constants_substitution &&
|
||||
(c->flags & CONST_PERSISTENT) &&
|
||||
!(CG(compiler_options) & ZEND_COMPILE_NO_CONSTANT_SUBSTITUTION) &&
|
||||
Z_TYPE(c->value) != IS_CONSTANT &&
|
||||
Z_TYPE(c->value) != IS_CONSTANT_ARRAY) {
|
||||
(c->flags & CONST_PERSISTENT) &&
|
||||
!(CG(compiler_options) & ZEND_COMPILE_NO_CONSTANT_SUBSTITUTION) &&
|
||||
Z_TYPE(c->value) != IS_CONSTANT &&
|
||||
Z_TYPE(c->value) != IS_CONSTANT_ARRAY) {
|
||||
return c;
|
||||
}
|
||||
return NULL;
|
||||
@@ -4285,7 +4261,7 @@ void zend_do_fetch_lexical_variable(znode *varname, zend_bool is_ref TSRMLS_DC)
|
||||
znode value;
|
||||
|
||||
if (Z_STRLEN(varname->u.constant) == sizeof("this") - 1 &&
|
||||
memcmp(Z_STRVAL(varname->u.constant), "this", sizeof("this") - 1) == 0) {
|
||||
memcmp(Z_STRVAL(varname->u.constant), "this", sizeof("this") - 1) == 0) {
|
||||
zend_error(E_COMPILE_ERROR, "Cannot use $this as lexical variable");
|
||||
return;
|
||||
}
|
||||
@@ -4375,10 +4351,6 @@ void zend_do_indirect_references(znode *result, const znode *num_references, zno
|
||||
}
|
||||
zend_do_begin_variable_parse(TSRMLS_C);
|
||||
fetch_simple_variable(result, variable, 1 TSRMLS_CC);
|
||||
/* there is a chance someone is accessing $this */
|
||||
if (CG(active_op_array)->scope && CG(active_op_array)->this_var == -1) {
|
||||
CG(active_op_array)->this_var = lookup_cv(CG(active_op_array), estrndup("this", sizeof("this")-1), sizeof("this")-1);
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -4499,7 +4471,7 @@ void zend_do_foreach_begin(znode *foreach_token, znode *open_brackets_token, zno
|
||||
open_brackets_token->u.opline_num = get_next_op_number(CG(active_op_array));
|
||||
zend_do_end_variable_parse(array, BP_VAR_W, 0 TSRMLS_CC);
|
||||
if (CG(active_op_array)->last > 0 &&
|
||||
CG(active_op_array)->opcodes[CG(active_op_array)->last-1].opcode == ZEND_FETCH_OBJ_W) {
|
||||
CG(active_op_array)->opcodes[CG(active_op_array)->last-1].opcode == ZEND_FETCH_OBJ_W) {
|
||||
/* Only lock the container if we are fetching from a real container and not $this */
|
||||
if (CG(active_op_array)->opcodes[CG(active_op_array)->last-1].op1.op_type == IS_VAR) {
|
||||
CG(active_op_array)->opcodes[CG(active_op_array)->last-1].extended_value |= ZEND_FETCH_ADD_LOCK;
|
||||
@@ -4686,8 +4658,8 @@ void zend_do_declare_stmt(znode *var, znode *val TSRMLS_DC) /* {{{ */
|
||||
int num = CG(active_op_array)->last;
|
||||
/* ignore ZEND_EXT_STMT and ZEND_TICKS */
|
||||
while (num > 0 &&
|
||||
(CG(active_op_array)->opcodes[num-1].opcode == ZEND_EXT_STMT ||
|
||||
CG(active_op_array)->opcodes[num-1].opcode == ZEND_TICKS)) {
|
||||
(CG(active_op_array)->opcodes[num-1].opcode == ZEND_EXT_STMT ||
|
||||
CG(active_op_array)->opcodes[num-1].opcode == ZEND_TICKS)) {
|
||||
--num;
|
||||
}
|
||||
|
||||
@@ -4920,12 +4892,14 @@ void zend_do_extended_fcall_end(TSRMLS_D) /* {{{ */
|
||||
|
||||
void zend_do_ticks(TSRMLS_D) /* {{{ */
|
||||
{
|
||||
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
|
||||
if (Z_LVAL(CG(declarables).ticks)) {
|
||||
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
|
||||
|
||||
opline->opcode = ZEND_TICKS;
|
||||
opline->op1.u.constant = CG(declarables).ticks;
|
||||
opline->op1.op_type = IS_CONST;
|
||||
SET_UNUSED(opline->op2);
|
||||
opline->opcode = ZEND_TICKS;
|
||||
opline->op1.u.constant = CG(declarables).ticks;
|
||||
opline->op1.op_type = IS_CONST;
|
||||
SET_UNUSED(opline->op2);
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -5099,7 +5073,7 @@ void zend_do_build_namespace_name(znode *result, znode *prefix, znode *name TSRM
|
||||
if (prefix) {
|
||||
*result = *prefix;
|
||||
if (Z_TYPE(result->u.constant) == IS_STRING &&
|
||||
Z_STRLEN(result->u.constant) == 0) {
|
||||
Z_STRLEN(result->u.constant) == 0) {
|
||||
/* namespace\ */
|
||||
if (CG(current_namespace)) {
|
||||
znode tmp;
|
||||
@@ -5147,8 +5121,8 @@ void zend_do_begin_namespace(const znode *name, zend_bool with_bracket TSRMLS_DC
|
||||
/* ignore ZEND_EXT_STMT and ZEND_TICKS */
|
||||
int num = CG(active_op_array)->last;
|
||||
while (num > 0 &&
|
||||
(CG(active_op_array)->opcodes[num-1].opcode == ZEND_EXT_STMT ||
|
||||
CG(active_op_array)->opcodes[num-1].opcode == ZEND_TICKS)) {
|
||||
(CG(active_op_array)->opcodes[num-1].opcode == ZEND_EXT_STMT ||
|
||||
CG(active_op_array)->opcodes[num-1].opcode == ZEND_TICKS)) {
|
||||
--num;
|
||||
}
|
||||
if (num > 0) {
|
||||
@@ -5164,9 +5138,9 @@ void zend_do_begin_namespace(const znode *name, zend_bool with_bracket TSRMLS_DC
|
||||
if (name) {
|
||||
lcname = zend_str_tolower_dup(Z_STRVAL(name->u.constant), Z_STRLEN(name->u.constant));
|
||||
if (((Z_STRLEN(name->u.constant) == sizeof("self")-1) &&
|
||||
!memcmp(lcname, "self", sizeof("self")-1)) ||
|
||||
((Z_STRLEN(name->u.constant) == sizeof("parent")-1) &&
|
||||
!memcmp(lcname, "parent", sizeof("parent")-1))) {
|
||||
!memcmp(lcname, "self", sizeof("self")-1)) ||
|
||||
((Z_STRLEN(name->u.constant) == sizeof("parent")-1) &&
|
||||
!memcmp(lcname, "parent", sizeof("parent")-1))) {
|
||||
zend_error(E_COMPILE_ERROR, "Cannot use '%s' as namespace name", Z_STRVAL(name->u.constant));
|
||||
}
|
||||
efree(lcname);
|
||||
@@ -5190,12 +5164,6 @@ void zend_do_begin_namespace(const znode *name, zend_bool with_bracket TSRMLS_DC
|
||||
efree(CG(current_import));
|
||||
CG(current_import) = NULL;
|
||||
}
|
||||
|
||||
if (CG(doc_comment)) {
|
||||
efree(CG(doc_comment));
|
||||
CG(doc_comment) = NULL;
|
||||
CG(doc_comment_len) = 0;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -5234,9 +5202,9 @@ void zend_do_use(znode *ns_name, znode *new_name, int is_global TSRMLS_DC) /* {{
|
||||
lcname = zend_str_tolower_dup(Z_STRVAL_P(name), Z_STRLEN_P(name));
|
||||
|
||||
if (((Z_STRLEN_P(name) == sizeof("self")-1) &&
|
||||
!memcmp(lcname, "self", sizeof("self")-1)) ||
|
||||
((Z_STRLEN_P(name) == sizeof("parent")-1) &&
|
||||
!memcmp(lcname, "parent", sizeof("parent")-1))) {
|
||||
!memcmp(lcname, "self", sizeof("self")-1)) ||
|
||||
((Z_STRLEN_P(name) == sizeof("parent")-1) &&
|
||||
!memcmp(lcname, "parent", sizeof("parent")-1))) {
|
||||
zend_error(E_COMPILE_ERROR, "Cannot use %s as %s because '%s' is a special class name", Z_STRVAL_P(ns), Z_STRVAL_P(name), Z_STRVAL_P(name));
|
||||
}
|
||||
|
||||
@@ -5248,13 +5216,13 @@ void zend_do_use(znode *ns_name, znode *new_name, int is_global TSRMLS_DC) /* {{
|
||||
c_ns_name[Z_STRLEN_P(CG(current_namespace))] = '\\';
|
||||
memcpy(c_ns_name+Z_STRLEN_P(CG(current_namespace))+1, lcname, Z_STRLEN_P(name)+1);
|
||||
if (zend_hash_exists(CG(class_table), c_ns_name, Z_STRLEN_P(CG(current_namespace)) + 1 + Z_STRLEN_P(name)+1)) {
|
||||
char *tmp2 = zend_str_tolower_dup(Z_STRVAL_P(ns), Z_STRLEN_P(ns));
|
||||
char *tmp = zend_str_tolower_dup(Z_STRVAL_P(ns), Z_STRLEN_P(ns));
|
||||
|
||||
if (Z_STRLEN_P(ns) != Z_STRLEN_P(CG(current_namespace)) + 1 + Z_STRLEN_P(name) ||
|
||||
memcmp(tmp2, c_ns_name, Z_STRLEN_P(ns))) {
|
||||
memcmp(tmp, c_ns_name, Z_STRLEN_P(ns))) {
|
||||
zend_error(E_COMPILE_ERROR, "Cannot use %s as %s because the name is already in use", Z_STRVAL_P(ns), Z_STRVAL_P(name));
|
||||
}
|
||||
efree(tmp2);
|
||||
efree(tmp);
|
||||
}
|
||||
efree(c_ns_name);
|
||||
} else if (zend_hash_find(CG(class_table), lcname, Z_STRLEN_P(name)+1, (void**)&pce) == SUCCESS &&
|
||||
@@ -5332,12 +5300,6 @@ void zend_do_end_namespace(TSRMLS_D) /* {{{ */
|
||||
efree(CG(current_import));
|
||||
CG(current_import) = NULL;
|
||||
}
|
||||
|
||||
if (CG(doc_comment)) {
|
||||
efree(CG(doc_comment));
|
||||
CG(doc_comment) = NULL;
|
||||
CG(doc_comment_len) = 0;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -5386,7 +5348,7 @@ ZEND_API size_t zend_dirname(char *path, size_t len)
|
||||
if (len_adjust == len) {
|
||||
return len;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (len == 0) {
|
||||
|
||||
+1
-2
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2012 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2010 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 |
|
||||
@@ -39,7 +39,6 @@
|
||||
#define INC_BPC(op_array) if (op_array->fn_flags & ZEND_ACC_INTERACTIVE) { ((op_array)->backpatch_count++); }
|
||||
#define DEC_BPC(op_array) if (op_array->fn_flags & ZEND_ACC_INTERACTIVE) { ((op_array)->backpatch_count--); }
|
||||
#define HANDLE_INTERACTIVE() if (CG(active_op_array)->fn_flags & ZEND_ACC_INTERACTIVE) { execute_new_code(TSRMLS_C); }
|
||||
#define DO_TICKS() if (Z_LVAL(CG(declarables).ticks)) { zend_do_ticks(TSRMLS_C); }
|
||||
|
||||
#define RESET_DOC_COMMENT() \
|
||||
{ \
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2012 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2010 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-2012 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2010 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 |
|
||||
|
||||
Loaded 100 of 2308 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user