mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-08 09:47:30 +00:00
Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
62129f31a7 | ||
|
|
793b52b576 | ||
|
|
8b9d23c0cf | ||
|
|
0f679b926c | ||
|
|
99e7d1dca2 | ||
|
|
21d7efef92 | ||
|
|
9657591e35 |
No files matched your search
@@ -48,88 +48,110 @@ define print_cvs
|
||||
end
|
||||
|
||||
define dump_bt
|
||||
set $ex = $arg0
|
||||
while $ex
|
||||
printf "[%p] ", $ex
|
||||
set $func = $ex->func
|
||||
if $func
|
||||
if $ex->This->value.obj
|
||||
if $func->common.scope
|
||||
printf "%s->", $func->common.scope->name->val
|
||||
set $t = $arg0
|
||||
while $t
|
||||
printf "[%p] ", $t
|
||||
set $fst = $t->function_state
|
||||
if $fst.function->common.function_name
|
||||
if $fst.arguments
|
||||
set $count = (int)*($fst.arguments)
|
||||
|
||||
if $t->object
|
||||
if $fst.function.common.scope
|
||||
printf "%s->", $fst.function.common.scope->name
|
||||
else
|
||||
if !$eg
|
||||
____executor_globals
|
||||
end
|
||||
|
||||
set $known_class = 0
|
||||
if $eg
|
||||
set $handle = $t->object.value.obj.handle
|
||||
set $handlers = $t->object.value.obj.handlers
|
||||
set $zobj = (zend_object *)$eg.objects_store.object_buckets[$handle].bucket.obj.object
|
||||
|
||||
if $handlers->get_class_entry == &zend_std_object_get_class
|
||||
set $known_class = 1
|
||||
|
||||
if $handlers.get_class_name
|
||||
if $handlers.get_class_name != &zend_std_object_get_class_name
|
||||
set $known_class = 0
|
||||
end
|
||||
end
|
||||
|
||||
if $known_class
|
||||
printf "%s->", $zobj->ce.name
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if !$known_class
|
||||
printf "(Unknown)->"
|
||||
end
|
||||
end
|
||||
else
|
||||
printf "%s->", $ex->This->value.obj->ce.name->val
|
||||
if $fst.function.common.scope
|
||||
printf "%s::", $fst.function.common.scope->name
|
||||
end
|
||||
end
|
||||
|
||||
printf "%s(", $fst.function->common.function_name
|
||||
while $count > 0
|
||||
set $zvalue = *(zval **)($fst.arguments - $count)
|
||||
set $type = $zvalue->type
|
||||
if $type == 0
|
||||
printf "NULL"
|
||||
end
|
||||
if $type == 1
|
||||
printf "%ld", $zvalue->value.lval
|
||||
end
|
||||
if $type == 2
|
||||
printf "%lf", $zvalue->value.dval
|
||||
end
|
||||
if $type == 3
|
||||
if $zvalue->value.lval
|
||||
printf "true"
|
||||
else
|
||||
printf "false"
|
||||
end
|
||||
end
|
||||
if $type == 4
|
||||
printf "array(%d)[%p]", $zvalue->value.ht->nNumOfElements, $zvalue
|
||||
end
|
||||
if $type == 5
|
||||
printf "object[%p]", $zvalue
|
||||
end
|
||||
if $type == 6
|
||||
____print_str $zvalue->value.str.val $zvalue->value.str.len
|
||||
end
|
||||
if $type == 7
|
||||
printf "resource(#%d)", $zvalue->value.lval
|
||||
end
|
||||
if $type == 8
|
||||
printf "constant"
|
||||
end
|
||||
if $type == 9
|
||||
printf "const_array"
|
||||
end
|
||||
if $type > 9
|
||||
printf "unknown type %d", $type
|
||||
end
|
||||
set $count = $count -1
|
||||
if $count > 0
|
||||
printf ", "
|
||||
end
|
||||
end
|
||||
printf ") "
|
||||
else
|
||||
if $func->common.scope
|
||||
printf "%s::", $func->common.scope->name->val
|
||||
end
|
||||
printf "%s() ", $fst.function->common.function_name
|
||||
end
|
||||
|
||||
if $func->common.function_name
|
||||
printf "%s(", $func->common.function_name->val
|
||||
else
|
||||
printf "(main"
|
||||
end
|
||||
|
||||
set $callFrameSize = (sizeof(zend_execute_data) + sizeof(zval) - 1) / sizeof(zval)
|
||||
|
||||
set $count = $ex->This.u2.num_args
|
||||
set $arg = 0
|
||||
while $arg < $count
|
||||
if $arg > 0
|
||||
printf ", "
|
||||
end
|
||||
|
||||
set $zvalue = (zval *) $ex + $callFrameSize + $arg
|
||||
set $type = $zvalue->u1.v.type
|
||||
if $type == 1
|
||||
printf "NULL"
|
||||
end
|
||||
if $type == 2
|
||||
printf "false"
|
||||
end
|
||||
if $type == 3
|
||||
printf "true"
|
||||
end
|
||||
if $type == 4
|
||||
printf "%ld", $zvalue->value.lval
|
||||
end
|
||||
if $type == 5
|
||||
printf "%f", $zvalue->value.dval
|
||||
end
|
||||
if $type == 6
|
||||
____print_str $zvalue->value.str->val $zvalue->value.str->len
|
||||
end
|
||||
if $type == 7
|
||||
printf "array(%d)[%p]", $zvalue->value.arr->ht->nNumOfElements, $zvalue
|
||||
end
|
||||
if $type == 8
|
||||
printf "object[%p]", $zvalue
|
||||
end
|
||||
if $type == 9
|
||||
printf "resource(#%d)", $zvalue->value.lval
|
||||
end
|
||||
if $type == 10
|
||||
printf "reference"
|
||||
end
|
||||
if $type > 10
|
||||
printf "unknown type %d", $type
|
||||
end
|
||||
set $arg = $arg + 1
|
||||
end
|
||||
|
||||
printf ") "
|
||||
else
|
||||
printf "??? "
|
||||
end
|
||||
if $func != 0
|
||||
if $func->type == 2
|
||||
printf "%s:%d ", $func->op_array.filename->val, $ex->opline->lineno
|
||||
else
|
||||
printf "[internal function]"
|
||||
end
|
||||
if $t->op_array != 0
|
||||
printf "%s:%d ", $t->op_array->filename, $t->opline->lineno
|
||||
end
|
||||
set $ex = $ex->prev_execute_data
|
||||
set $t = $t->prev_execute_data
|
||||
printf "\n"
|
||||
end
|
||||
end
|
||||
@@ -149,60 +171,68 @@ end
|
||||
|
||||
define ____printzv_contents
|
||||
set $zvalue = $arg0
|
||||
set $type = $zvalue->u1.v.type
|
||||
set $type = $zvalue->type
|
||||
|
||||
# 15 == IS_INDIRECT
|
||||
if $type >= 5 && $type != 15
|
||||
printf "(refcount=%d) ", $zvalue->value.counted->refcount
|
||||
printf "(refcount=%d", $zvalue->refcount__gc
|
||||
if $zvalue->is_ref__gc
|
||||
printf ",is_ref"
|
||||
end
|
||||
|
||||
printf ") "
|
||||
if $type == 0
|
||||
printf "UNDEF"
|
||||
printf "NULL"
|
||||
end
|
||||
if $type == 1
|
||||
printf "NULL"
|
||||
printf "long: %ld", $zvalue->value.lval
|
||||
end
|
||||
if $type == 2
|
||||
printf "bool: false"
|
||||
printf "double: %lf", $zvalue->value.dval
|
||||
end
|
||||
if $type == 3
|
||||
printf "bool: true"
|
||||
printf "bool: "
|
||||
if $zvalue->value.lval
|
||||
printf "true"
|
||||
else
|
||||
printf "false"
|
||||
end
|
||||
end
|
||||
if $type == 4
|
||||
printf "long: %ld", $zvalue->value.lval
|
||||
end
|
||||
if $type == 5
|
||||
printf "double: %f", $zvalue->value.dval
|
||||
end
|
||||
if $type == 6
|
||||
printf "string: %s", $zvalue->value.str->val
|
||||
end
|
||||
if $type == 7
|
||||
printf "array: "
|
||||
if $type == 4
|
||||
printf "array(%d): ", $zvalue->value.ht->nNumOfElements
|
||||
if ! $arg1
|
||||
printf "{\n"
|
||||
set $ind = $ind + 1
|
||||
____print_ht $zvalue->value.arr
|
||||
____print_ht $zvalue->value.ht 1
|
||||
set $ind = $ind - 1
|
||||
set $i = $ind
|
||||
while $i > 0
|
||||
printf " "
|
||||
set $i = $i - 1
|
||||
end
|
||||
printf "}"
|
||||
end
|
||||
set $type = 0
|
||||
end
|
||||
if $type == 8
|
||||
if $type == 5
|
||||
printf "object"
|
||||
____executor_globals
|
||||
set $handle = $zvalue->value.obj.handle
|
||||
set $handlers = $zvalue->value.obj.handlers
|
||||
set $zobj = $zvalue->value.obj
|
||||
set $cname = $zobj->ce->name->val
|
||||
if basic_functions_module.zts
|
||||
set $zobj = zend_objects_get_address($zvalue, $tsrm_ls)
|
||||
else
|
||||
set $zobj = zend_objects_get_address($zvalue)
|
||||
end
|
||||
if $handlers->get_class_entry == &zend_std_object_get_class
|
||||
set $cname = $zobj->ce.name
|
||||
else
|
||||
set $cname = "Unknown"
|
||||
end
|
||||
printf "(%s) #%d", $cname, $handle
|
||||
if ! $arg1
|
||||
if $handlers->get_properties == &zend_std_get_properties
|
||||
set $ht = $zobj->properties
|
||||
if $ht
|
||||
printf "(%d): ", $ht->nNumOfElements
|
||||
printf "{\n"
|
||||
set $ind = $ind + 1
|
||||
____print_ht $ht 1
|
||||
set $ind = $ind - 1
|
||||
@@ -211,6 +241,7 @@ define ____printzv_contents
|
||||
printf " "
|
||||
set $i = $i - 1
|
||||
end
|
||||
printf "}"
|
||||
else
|
||||
echo "no properties found"
|
||||
end
|
||||
@@ -218,36 +249,20 @@ define ____printzv_contents
|
||||
end
|
||||
set $type = 0
|
||||
end
|
||||
if $type == 6
|
||||
printf "string(%d): ", $zvalue->value.str.len
|
||||
____print_str $zvalue->value.str.val $zvalue->value.str.len
|
||||
end
|
||||
if $type == 7
|
||||
printf "resource: #%d", $zvalue->value.lval
|
||||
end
|
||||
if $type == 8
|
||||
printf "constant"
|
||||
end
|
||||
if $type == 9
|
||||
printf "resource: #%d", $zvalue->value.res->handle
|
||||
printf "const_array"
|
||||
end
|
||||
if $type == 10
|
||||
printf "reference: "
|
||||
____printzv &$zvalue->value.ref->val $arg1
|
||||
end
|
||||
if $type == 11
|
||||
printf "const: %s", $zvalue->value.str->val
|
||||
end
|
||||
if $type == 12
|
||||
printf "const_ast"
|
||||
end
|
||||
if $type == 13
|
||||
printf "_IS_BOOL"
|
||||
end
|
||||
if $type == 14
|
||||
printf "IS_CALLABLE"
|
||||
end
|
||||
if $type == 15
|
||||
printf "indirect: "
|
||||
____printzv $zvalue->value.zv $arg1
|
||||
end
|
||||
if $type == 16
|
||||
printf "string_offset"
|
||||
end
|
||||
if $type == 17
|
||||
printf "pointer: %p", $zvalue->value.ptr
|
||||
end
|
||||
if $type > 17
|
||||
if $type > 9
|
||||
printf "unknown type %d", $type
|
||||
end
|
||||
printf "\n"
|
||||
@@ -259,6 +274,10 @@ define ____printzv
|
||||
|
||||
printf "[%p] ", $zvalue
|
||||
|
||||
if $zvalue == $eg.uninitialized_zval_ptr
|
||||
printf "*uninitialized* "
|
||||
end
|
||||
|
||||
set $zcontents = (zval*) $zvalue
|
||||
if $arg1
|
||||
____printzv_contents $zcontents $arg1
|
||||
@@ -301,60 +320,42 @@ end
|
||||
|
||||
define ____print_ht
|
||||
set $ht = (HashTable*)$arg0
|
||||
set $n = $ind
|
||||
while $n > 0
|
||||
printf " "
|
||||
set $n = $n - 1
|
||||
end
|
||||
set $p = $ht->pListHead
|
||||
|
||||
if $ht->u.v.flags & 4
|
||||
printf "Packed"
|
||||
else
|
||||
printf "Hash"
|
||||
end
|
||||
printf "(%d)[%p]: {\n", $ht->nNumOfElements, $ht
|
||||
|
||||
set $num = $ht->nNumUsed
|
||||
set $i = 0
|
||||
set $ind = $ind + 1
|
||||
while $i < $num
|
||||
set $p = (Bucket*)($ht->arData + $i)
|
||||
set $n = $ind
|
||||
if $p->val.u1.v.type > 0
|
||||
while $n > 0
|
||||
printf " "
|
||||
set $n = $n - 1
|
||||
end
|
||||
printf "[%d] ", $i
|
||||
if $p->key
|
||||
printf "%s => ", $p->key->val
|
||||
else
|
||||
printf "%d => ", $p->h
|
||||
end
|
||||
if $arg1 == 0
|
||||
printf "%p\n", (zval *)&$p->val
|
||||
end
|
||||
if $arg1 == 1
|
||||
set $zval = (zval *)&$p->val
|
||||
____printzv $zval 1
|
||||
end
|
||||
if $arg1 == 2
|
||||
printf "%s\n", (char*)$p->val.value.ptr
|
||||
end
|
||||
if $arg1 == 3
|
||||
set $func = (zend_function*)$p->val.value.ptr
|
||||
printf "\"%s\"\n", $func->common.function_name->val
|
||||
end
|
||||
while $p != 0
|
||||
set $i = $ind
|
||||
while $i > 0
|
||||
printf " "
|
||||
set $i = $i - 1
|
||||
end
|
||||
set $i = $i + 1
|
||||
|
||||
if $p->nKeyLength > 0
|
||||
____print_str $p->arKey $p->nKeyLength
|
||||
printf " => "
|
||||
else
|
||||
printf "%d => ", $p->h
|
||||
end
|
||||
|
||||
if $arg1 == 0
|
||||
printf "%p\n", (void*)$p->pData
|
||||
end
|
||||
if $arg1 == 1
|
||||
set $zval = *(zval **)$p->pData
|
||||
____printzv $zval 1
|
||||
end
|
||||
if $arg1 == 2
|
||||
printf "%s\n", (char*)$p->pData
|
||||
end
|
||||
|
||||
set $p = $p->pListNext
|
||||
end
|
||||
set $ind = $ind - 1
|
||||
printf "}\n"
|
||||
end
|
||||
|
||||
define print_ht
|
||||
set $ind = 0
|
||||
set $ind = 1
|
||||
printf "[%p] {\n", $arg0
|
||||
____print_ht $arg0 1
|
||||
printf "}\n"
|
||||
end
|
||||
|
||||
document print_ht
|
||||
@@ -362,8 +363,10 @@ document print_ht
|
||||
end
|
||||
|
||||
define print_htptr
|
||||
set $ind = 0
|
||||
set $ind = 1
|
||||
printf "[%p] {\n", $arg0
|
||||
____print_ht $arg0 0
|
||||
printf "}\n"
|
||||
end
|
||||
|
||||
document print_htptr
|
||||
@@ -371,17 +374,46 @@ document print_htptr
|
||||
end
|
||||
|
||||
define print_htstr
|
||||
set $ind = 0
|
||||
set $ind = 1
|
||||
printf "[%p] {\n", $arg0
|
||||
____print_ht $arg0 2
|
||||
printf "}\n"
|
||||
end
|
||||
|
||||
document print_htstr
|
||||
dumps elements of HashTable made of strings
|
||||
end
|
||||
|
||||
define ____print_ft
|
||||
set $ht = $arg0
|
||||
set $p = $ht->pListHead
|
||||
|
||||
while $p != 0
|
||||
set $func = (zend_function*)$p->pData
|
||||
|
||||
set $i = $ind
|
||||
while $i > 0
|
||||
printf " "
|
||||
set $i = $i - 1
|
||||
end
|
||||
|
||||
if $p->nKeyLength > 0
|
||||
____print_str $p->arKey $p->nKeyLength
|
||||
printf " => "
|
||||
else
|
||||
printf "%d => ", $p->h
|
||||
end
|
||||
|
||||
printf "\"%s\"\n", $func->common.function_name
|
||||
set $p = $p->pListNext
|
||||
end
|
||||
end
|
||||
|
||||
define print_ft
|
||||
set $ind = 0
|
||||
____print_ht $arg0 3
|
||||
set $ind = 1
|
||||
printf "[%p] {\n", $arg0
|
||||
____print_ft $arg0
|
||||
printf "}\n"
|
||||
end
|
||||
|
||||
document print_ft
|
||||
@@ -397,15 +429,15 @@ define ____print_inh_class
|
||||
printf "final "
|
||||
end
|
||||
end
|
||||
printf "class %s", $ce->name->val
|
||||
printf "class %s", $ce->name
|
||||
if $ce->parent != 0
|
||||
printf " extends %s", $ce->parent->name->val
|
||||
printf " extends %s", $ce->parent->name
|
||||
end
|
||||
if $ce->num_interfaces != 0
|
||||
printf " implements"
|
||||
set $tmp = 0
|
||||
while $tmp < $ce->num_interfaces
|
||||
printf " %s", $ce->interfaces[$tmp]->name->val
|
||||
printf " %s", $ce->interfaces[$tmp]->name
|
||||
set $tmp = $tmp + 1
|
||||
if $tmp < $ce->num_interfaces
|
||||
printf ","
|
||||
@@ -417,10 +449,10 @@ end
|
||||
|
||||
define ____print_inh_iface
|
||||
set $ce = $arg0
|
||||
printf "interface %s", $ce->name->val
|
||||
printf "interface %s", $ce->name
|
||||
if $ce->num_interfaces != 0
|
||||
set $ce = $ce->interfaces[0]
|
||||
printf " extends %s", $ce->name->val
|
||||
printf " extends %s", $ce->name
|
||||
else
|
||||
set $ce = 0
|
||||
end
|
||||
@@ -484,7 +516,7 @@ define ____print_str
|
||||
set $tmp = 0
|
||||
set $str = $arg0
|
||||
printf "\""
|
||||
while $tmp < $arg1 && $tmp < 256
|
||||
while $tmp < $arg1
|
||||
if $str[$tmp] > 32 && $str[$tmp] < 127
|
||||
printf "%c", $str[$tmp]
|
||||
else
|
||||
@@ -492,9 +524,6 @@ define ____print_str
|
||||
end
|
||||
set $tmp = $tmp + 1
|
||||
end
|
||||
if $tmp != $arg1
|
||||
printf "..."
|
||||
end
|
||||
printf "\""
|
||||
end
|
||||
|
||||
@@ -589,9 +618,9 @@ define zmemcheck
|
||||
if $p->magic == 0xfb8277dc
|
||||
set $stat = "CACHED"
|
||||
end
|
||||
set $filename = strrchr($p->filename->val, '/')
|
||||
set $filename = strrchr($p->filename, '/')
|
||||
if !$filename
|
||||
set $filename = $p->filename->val
|
||||
set $filename = $p->filename
|
||||
else
|
||||
set $filename = $filename + 1
|
||||
end
|
||||
@@ -638,28 +667,3 @@ document zmemcheck
|
||||
usage: zmemcheck [ptr].
|
||||
if ptr is 0, all blocks will be listed.
|
||||
end
|
||||
|
||||
define lookup_root
|
||||
set $found = 0
|
||||
if gc_globals->roots
|
||||
set $current = gc_globals->roots->next
|
||||
printf "looking ref %p in roots\n", $arg0
|
||||
while $current != &gc_globals->roots
|
||||
if $current->ref == $arg0
|
||||
set $found = $current
|
||||
break
|
||||
end
|
||||
set $current = $current->next
|
||||
end
|
||||
if $found != 0
|
||||
printf "found root %p\n", $found
|
||||
else
|
||||
printf "not found\n"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
document lookup_root
|
||||
lookup a refcounted in root
|
||||
usage: lookup_root [ptr].
|
||||
end
|
||||
+1
-6
@@ -22,13 +22,7 @@ sapi/nsapi/nsapi.c ident
|
||||
sapi/continuity/capi.c ident
|
||||
Zend/RFCs/002.txt ident
|
||||
Zend/RFCs/003.txt ident
|
||||
ext/exif/exif.c ident
|
||||
ext/ldap/ldap.c ident
|
||||
ext/pdo_pgsql/pdo_pgsql.c ident
|
||||
ext/tidy/tidy.c ident
|
||||
NEWS merge=NEWS
|
||||
UPGRADING merge=NEWS
|
||||
UPGRADING.INTERNALS merge=NEWS
|
||||
/ext/bz2/tests/with_strings.phpt -crlf
|
||||
/ext/dom/tests/bug40836.phpt -crlf
|
||||
/ext/dom/tests/domelement.phpt -crlf
|
||||
@@ -49,6 +43,7 @@ UPGRADING.INTERNALS merge=NEWS
|
||||
/ext/spl/tests/SplArray_fromArray.phpt -crlf
|
||||
/ext/standard/tests/dir/scandir_variation3.phpt -crlf
|
||||
/ext/standard/tests/general_functions/escapeshellcmd-win32.phpt -crlf
|
||||
/ext/standard/tests/general_functions/set_magic_quotes_runtime_error.phpt -crlf
|
||||
/ext/standard/tests/strings/bug26817.phpt -crlf
|
||||
/ext/standard/tests/strings/bug26973.phpt -crlf
|
||||
/ext/standard/tests/strings/bug27457.phpt -crlf
|
||||
|
||||
+7
-38
@@ -9,7 +9,6 @@
|
||||
*.gcno
|
||||
*.la
|
||||
*.lo
|
||||
*.loT
|
||||
*.o
|
||||
*.a
|
||||
*.ncb
|
||||
@@ -20,7 +19,6 @@
|
||||
*.tgz
|
||||
*.tar.gz
|
||||
*.tar.bz2
|
||||
*.tar.xz
|
||||
.FBCIndex
|
||||
.FBCLockFolder
|
||||
.deps
|
||||
@@ -83,7 +81,7 @@ mkinstalldirs
|
||||
modules
|
||||
php
|
||||
php-*.tar.gz
|
||||
php7.spec
|
||||
php5.spec
|
||||
php_lcov.info
|
||||
php_test_results_*.txt
|
||||
php_version.h
|
||||
@@ -119,12 +117,6 @@ 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
|
||||
@@ -137,12 +129,6 @@ tests/*/*/*.sh
|
||||
*/tests/*/*.exp
|
||||
*/tests/*/*.log
|
||||
*/tests/*/*.sh
|
||||
*/tests/*/*/*.diff
|
||||
*/tests/*/*/*.out
|
||||
*/tests/*/*/*.php
|
||||
*/tests/*/*/*.exp
|
||||
*/tests/*/*/*.log
|
||||
*/tests/*/*/*.sh
|
||||
*/*/tests/*.diff
|
||||
*/*/tests/*.out
|
||||
*/*/tests/*.php
|
||||
@@ -155,18 +141,6 @@ tests/*/*/*.sh
|
||||
*/*/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
|
||||
@@ -188,7 +162,6 @@ 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/iconv/php_iconv_broken_ignore.h
|
||||
ext/mbstring/libmbfl/Makefile.in
|
||||
ext/mbstring/libmbfl/autoscan.log
|
||||
ext/mbstring/libmbfl/config.sub
|
||||
@@ -233,8 +206,6 @@ ext/pdo_sqlite/sqlite3.h
|
||||
ext/pdo_sqlite/tests/*.db
|
||||
ext/pdo_sqlite/tests/*.tmp
|
||||
ext/phar/phar.phar
|
||||
ext/phar/phar.1
|
||||
ext/phar/phar.phar.1
|
||||
ext/pspell/tests/*.tmp
|
||||
ext/reflection/xml
|
||||
ext/reflection/html
|
||||
@@ -257,25 +228,21 @@ main/config.w32.h
|
||||
main/stamp-h1
|
||||
main/streams/build-defs.h
|
||||
main/streams/stamp-h1
|
||||
#pear/install-pear-nozlib.phar
|
||||
pear/install-pear-nozlib.phar
|
||||
pear/phpize
|
||||
pear/run-tests
|
||||
pear/php-config
|
||||
pear/scripts
|
||||
sapi/apache/libphp7.module
|
||||
sapi/apache2handler/libphp7.module
|
||||
sapi/apache_hooks/libphp7.module
|
||||
sapi/apache/libphp5.module
|
||||
sapi/apache2handler/libphp5.module
|
||||
sapi/apache_hooks/libphp5.module
|
||||
sapi/cgi/php-cgi
|
||||
sapi/cgi/php-cgi.1
|
||||
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
|
||||
sapi/phpdbg/phpdbg_parser.c
|
||||
sapi/phpdbg/phpdbg_parser.h
|
||||
sapi/phpdbg/phpdbg
|
||||
scripts/php-config
|
||||
scripts/phpize
|
||||
scripts/man1/*.1
|
||||
@@ -285,3 +252,5 @@ win32/*.positions
|
||||
win32/ext
|
||||
win32/phpts.def
|
||||
win32/wsyslog.h
|
||||
win32/win32.dsp
|
||||
win32/php.dsw
|
||||
+7
-36
@@ -1,40 +1,14 @@
|
||||
language: c
|
||||
language: php
|
||||
|
||||
branches:
|
||||
except:
|
||||
- phpng
|
||||
php:
|
||||
# We only specify one version so we only get one worker
|
||||
- 5.4
|
||||
|
||||
notifications:
|
||||
email:
|
||||
on_failure: change
|
||||
irc:
|
||||
channels:
|
||||
- "irc.efnet.org#php.pecl"
|
||||
on_success: change
|
||||
on_failure: always
|
||||
|
||||
cache:
|
||||
- apt
|
||||
email: false
|
||||
|
||||
env:
|
||||
global:
|
||||
- MYSQL_TEST_HOST=127.0.0.1
|
||||
- MYSQL_TEST_USER=travis
|
||||
- PDO_MYSQL_TEST_DSN="mysql:host=127.0.0.1;dbname=test"
|
||||
- PDO_MYSQL_TEST_USER=travis
|
||||
- PDO_MYSQL_TEST_PASS=
|
||||
- PDO_MYSQL_TEST_HOST=127.0.0.1
|
||||
- REPORT_EXIT_STATUS=1
|
||||
matrix:
|
||||
- ENABLE_MAINTAINER_ZTS=0 ENABLE_DEBUG=0
|
||||
- ENABLE_MAINTAINER_ZTS=1 ENABLE_DEBUG=1
|
||||
|
||||
before_install:
|
||||
- sudo apt-get update -qq
|
||||
- sudo apt-get install -y libenchant-dev libaspell-dev libpspell-dev librecode-dev libsasl2-dev libxpm-dev libt1-dev libc-client2007e-dev
|
||||
- sudo cp ./travis/de /var/lib/locales/supported.d/de
|
||||
- sudo dpkg-reconfigure locales
|
||||
- ./travis/install.sh
|
||||
- REPORT_EXIT_STATUS=1 TEST_PHP_EXECUTABLE=./sapi/cli/php
|
||||
|
||||
before_script:
|
||||
# Compile PHP
|
||||
@@ -45,9 +19,6 @@ before_script:
|
||||
- . ./travis/ext/pdo_mysql/setup.sh
|
||||
- . ./travis/ext/pgsql/setup.sh
|
||||
- . ./travis/ext/pdo_pgsql/setup.sh
|
||||
- . ./travis/ext/imap/setup.sh
|
||||
|
||||
# Run PHPs run-tests.php
|
||||
script:
|
||||
- ./sapi/cli/php run-tests.php -p `pwd`/sapi/cli/php $(if [ $ENABLE_DEBUG == 1 ]; then echo "-d opcache.enable_cli=1 -d zend_extension=`pwd`/modules/opcache.so"; fi) -g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP" --offline --show-diff --set-timeout 120
|
||||
- ./sapi/cli/php sapi/phpdbg/tests/run-tests.php -diff2stdout --phpdbg sapi/phpdbg/phpdbg
|
||||
script: ./sapi/cli/php run-tests.php -g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP"
|
||||
+8
-33
@@ -18,7 +18,6 @@ Code Implementation
|
||||
|
||||
For instance, ``function int mail(char *to, char *from)`` should NOT free
|
||||
to and/or from.
|
||||
|
||||
Exceptions:
|
||||
|
||||
- The function's designated behavior is freeing that resource. E.g. efree()
|
||||
@@ -43,7 +42,7 @@ Exceptions:
|
||||
|
||||
4. When writing functions that deal with strings, be sure to remember
|
||||
that PHP holds the length property of each string, and that it
|
||||
shouldn't be calculated with strlen(). Write your functions in such
|
||||
shouldn't be calculated with strlen(). Write your functions in a such
|
||||
a way so that they'll take advantage of the length property, both
|
||||
for efficiency and in order for them to be binary-safe.
|
||||
Functions that change strings and obtain their new lengths while
|
||||
@@ -60,8 +59,8 @@ Exceptions:
|
||||
you're calling.
|
||||
|
||||
7. When commenting out code using a #if statement, do NOT use 0 only. Instead
|
||||
use "<git username here>_0". For example, #if FOO_0, where FOO is your
|
||||
git user foo. This allows easier tracking of why code was commented out,
|
||||
use "<svn username here>_0". For example, #if FOO_0, where FOO is your
|
||||
svn user foo. This allows easier tracking of why code was commented out,
|
||||
especially in bundled libraries.
|
||||
|
||||
8. Do not define functions that are not available. For instance, if a
|
||||
@@ -83,7 +82,7 @@ Exceptions:
|
||||
library may need to control or free the memory, or when the memory in
|
||||
question needs to survive between multiple requests.
|
||||
|
||||
User Functions/Methods Naming Conventions
|
||||
Naming Conventions
|
||||
------------------
|
||||
|
||||
1. Function names for user-level functions should be enclosed with in
|
||||
@@ -113,7 +112,6 @@ User Functions/Methods Naming Conventions
|
||||
of ``parent_*``::
|
||||
|
||||
A family of 'foo' functions, for example:
|
||||
|
||||
Good:
|
||||
'foo_select_bar'
|
||||
'foo_insert_baz'
|
||||
@@ -153,7 +151,7 @@ User Functions/Methods Naming Conventions
|
||||
|
||||
7. Classes should be given descriptive names. Avoid using abbreviations where
|
||||
possible. Each word in the class name should start with a capital letter,
|
||||
without underscore delimiters (CamelCaps starting with a capital letter).
|
||||
without underscore delimiters (CampelCaps starting with a capital letter).
|
||||
The class name should be prefixed with the name of the 'parent set' (e.g.
|
||||
the name of the extension)::
|
||||
|
||||
@@ -165,26 +163,6 @@ User Functions/Methods Naming Conventions
|
||||
'foobar'
|
||||
'foo_bar'
|
||||
|
||||
Internal Function Naming Convensions
|
||||
----------------------
|
||||
|
||||
1. Functions that are part of the external API should be named
|
||||
'php_modulename_function()' to avoid symbol collision. They should be in
|
||||
lowercase, with words underscore delimited. Exposed API must be defined
|
||||
in 'php_modulename.h'.
|
||||
|
||||
PHPAPI char *php_session_create_id(PS_CREATE_SID_ARGS);
|
||||
|
||||
Unexposed module function should be static and should not be defined in
|
||||
'php_modulename.h'.
|
||||
|
||||
static int php_session_destroy(TSRMLS_D)
|
||||
|
||||
2. Main module source file must be named 'modulename.c'.
|
||||
|
||||
3. Header file that is used by other sources must be named 'php_modulename.h'.
|
||||
|
||||
|
||||
Syntax and indentation
|
||||
----------------------
|
||||
|
||||
@@ -203,9 +181,9 @@ Syntax and indentation
|
||||
of PHP or one of its standard modules, please maintain the K&R
|
||||
style. This applies to just about everything, starting with
|
||||
indentation and comment styles and up to function declaration
|
||||
syntax. Also see Indentstyle.
|
||||
syntax. Also see Indentstyle_.
|
||||
|
||||
Indentstyle: http://www.catb.org/~esr/jargon/html/I/indent-style.html
|
||||
.. _Indentstyle: http://www.catb.org/~esr/jargon/html/I/indent-style.html
|
||||
|
||||
3. Be generous with whitespace and braces. Keep one empty line between the
|
||||
variable declaration section and the statements in a block, as well as
|
||||
@@ -281,10 +259,7 @@ The file labelled 'EXPERIMENTAL' should include the following
|
||||
information::
|
||||
|
||||
Any authoring information (known bugs, future directions of the module).
|
||||
Ongoing status notes which may not be appropriate for Git comments.
|
||||
|
||||
In general new features should go to PECL or experimental branches until
|
||||
there are specific reasons for directly adding it to the core distribution.
|
||||
Ongoing status notes which may not be appropriate for SVN comments.
|
||||
|
||||
Aliases & Legacy Documentation
|
||||
-----------------------------------
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
# Contributing to PHP
|
||||
|
||||
Anybody who programs in PHP can be a contributing member of the community that
|
||||
develops and deploys it; the task of deploying PHP, documentation and
|
||||
associated websites is a never ending one. With every release, or release
|
||||
candidate comes a wave of work, which takes a lot of organization and
|
||||
co-ordination.
|
||||
|
||||
## Pull requests
|
||||
|
||||
PHP welcomes pull requests to [add tests](#writing-tests), fix bugs and to
|
||||
implement RFCs. Please be sure to include tests as appropriate!
|
||||
|
||||
If you are fixing a bug, then please submit your PR against the lowest branch
|
||||
of PHP that the bug affects, or the oldest fully supported version (the first
|
||||
green branch on
|
||||
[the supported version page](http://php.net/supported-versions.php). For
|
||||
example, at the time of writing in mid-2015, this is PHP 5.5, which corresponds
|
||||
to the `PHP-5.5` branch in Git. Please also make sure you add a link to the PR
|
||||
in the bug on [the bug tracker](https://bugs.php.net/).
|
||||
|
||||
Pull requests to implement RFCs should be submitted against `master`.
|
||||
|
||||
## Filing bugs
|
||||
|
||||
Bugs can be filed on the [PHP bug tracker](https://bugs.php.net/). If this is
|
||||
the first time you've filed a bug, we suggest reading the
|
||||
[guide to reporting a bug](https://bugs.php.net/how-to-report.php).
|
||||
|
||||
Where possible, please include a self-contained reproduction case!
|
||||
|
||||
## Feature requests
|
||||
|
||||
Feature requests are generally submitted in the form of
|
||||
[Requests for Comment](https://wiki.php.net/rfc/howto), ideally accompanied by
|
||||
[pull requests](#pull-requests). You can find the extremely large list of RFCs
|
||||
that have been previously considered on the
|
||||
[PHP Wiki](https://wiki.php.net/rfc).
|
||||
|
||||
You may want to read
|
||||
[The Mysterious PHP RFC Process](https://blogs.oracle.com/opal/entry/the_mysterious_php_rfc_process)
|
||||
for additional notes on the best way to approach submitting an RFC.
|
||||
|
||||
## Writing tests
|
||||
|
||||
We love getting new tests! PHP is a huge project and improving code coverage is
|
||||
a huge win for every PHP user.
|
||||
|
||||
[Our QA site includes a page detailing how to write test cases.](http://qa.php.net/write-test.php)
|
||||
Please note that the section on submitting pull requests is outdated: in
|
||||
addition to the process listed there, you can also
|
||||
[submit pull requests](#pull-requests).
|
||||
|
||||
## Writing documentation
|
||||
|
||||
There are two ways to contribute to the PHP manual. You can edit the manual and
|
||||
send patches anonymously via [the online editor](https://edit.php.net/), or you
|
||||
can check the XML source out from Subversion and edit that and build it
|
||||
[per the instructions on the documentation site](http://doc.php.net/tutorial/).
|
||||
Patches created that way should be sent to the
|
||||
[documentation mailing list](mailto:phpdoc@lists.php.net).
|
||||
|
||||
## Getting help
|
||||
|
||||
If you are having trouble contributing to PHP, or just want to talk to a human
|
||||
about what you're working on, you can contact us via the
|
||||
[internals mailing list](mailto:internals@lists.php.net), or the
|
||||
[documentation mailing list](mailto:phpdoc@lists.php.net) for documentation
|
||||
issues.
|
||||
|
||||
Although not a formal channel, you can also find a number of core developers on
|
||||
the #php.pecl channel on [EFnet](http://www.efnet.org/). Similarly, many
|
||||
documentation writers can be found on #php.doc.
|
||||
+107
-18
@@ -26,12 +26,34 @@ Status legend
|
||||
|
||||
== Server APIs ==
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: aolserver
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: apache
|
||||
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: apache_hooks
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: apache2filter
|
||||
PRIMARY MAINTAINER: Aaron Bannert <aaron@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: apache2handler
|
||||
PRIMARY MAINTAINER: Aaron Bannert <aaron@php.net>, Ilia Alshanetsky <iliaa@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: caudium
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: cgi
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
@@ -41,6 +63,11 @@ MAINTENANCE: Marcus Boerger <helly@php.net>, Edin Kadribasic <edink@php.
|
||||
STATUS: Working
|
||||
SINCE: 4.3.0
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: continuity
|
||||
PRIMARY MAINTAINER: Alex Leigh <aleigh@php.net>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: embed
|
||||
PRIMARY MAINTAINER: Edin Kadribasic <edink@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
@@ -52,15 +79,50 @@ MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 5.3.3
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: isapi
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: litespeed
|
||||
PRIMARY MAINTAINER: George Wang <gwang@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 5.3
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: phpdbg
|
||||
MAINTENANCE: Joe Watkins <krakjoe@php.net>, Bob Weinand <bwoebi@php.net>
|
||||
STATUS: 5.6
|
||||
EXTENSION: milter
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: nsapi
|
||||
PRIMARY MAINTAINER: Uwe Schindler <thetaphi@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: phttpd
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pi3web
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: roxen
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: thttpd
|
||||
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
|
||||
MAINTENANCE: Odd fixes
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: tux
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Unknown
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: webjames
|
||||
PRIMARY MAINTAINER: Alex Waugh <alex@alexwaugh.com>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -74,10 +136,21 @@ STATUS: Working
|
||||
COMMENT: DBM abstraction for db2, db3, db4, dbm, ndbm, gdbm, ini
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: interbase
|
||||
PRIMARY MAINTAINER: Ard Biesheuvel <ard@ard.nu>
|
||||
PRIMARY MAINTAINER: Ard Biesheuvel <ard@ard.nu>, Jouni Ahto <jouni.ahto@exdec.fi>
|
||||
MAINTENANCE: Odd fixes
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mssql
|
||||
PRIMARY MAINTAINER: Frank M. Kromann <fmk@swwwing.com>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
COMMENT: Tested on phpts and isapi versions
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mysql
|
||||
PRIMARY MAINTAINER: Zak Greant <zak@mysql.com>, Georg Richter <georg@php.net>, Johannes Schlüter <johannes@php.net>, Ulf Wendel <uw@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mysqli
|
||||
PRIMARY MAINTAINER: Georg Richter <georg@php.net>, Andrey Hristov <andrey@php.net>, Johannes Schlüter <johannes@php.net>, Ulf Wendel <uw@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
@@ -85,7 +158,7 @@ STATUS: Working
|
||||
SINCE: 5.0
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mysqlnd
|
||||
PRIMARY MAINTAINER: Andrey Hristov <andrey@php.net>, Johannes Schlüter <johannes@php.net>, Ulf Wendel <uw@php.net>
|
||||
PRIMARY MAINTAINER: Georg Richter <georg@php.net>, Andrey Hristov <andrey@php.net>, Johannes Schlüter <johannes@php.net>, Ulf Wendel <uw@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 5.3
|
||||
@@ -155,6 +228,13 @@ MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
COMMENT: Use PostgreSQL 7.0.x or later. PostgreSQL 6.5.3 or less have fatal bug.
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: sqlite
|
||||
PRIMARY MAINTAINER: Marcus Boerger <helly@php.net>, Wez Furlong <wez@php.net>, Ilia Alshanetsky <iliaa@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 5.0 (Since 4.3.2 in PECL)
|
||||
COMMENT: Integrates SQLite 2 embeddable SQL database engine.
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: sqlite3
|
||||
PRIMARY MAINTAINER: Scott MacVicar <scottmac@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
@@ -162,6 +242,11 @@ STATUS: Working
|
||||
SINCE: 5.3
|
||||
COMMENT: Integrates SQLite 3 embeddable SQL database engine.
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: sybase_ct
|
||||
PRIMARY MAINTAINER: Timm Friebe <thekid@thekid.de>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
|
||||
== XML extensions ==
|
||||
@@ -300,12 +385,6 @@ MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 4.0.4
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: hash
|
||||
PRIMARY MAINTAINER: Sara Golemon <pollita@php.net>, Mike Wallner <mike@php.net>, Anatol Belski <ab@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 5.1.2
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: iconv
|
||||
PRIMARY MAINTAINER: Moriyoshi Koizumi <moriyoshi@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
@@ -323,13 +402,13 @@ MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: json
|
||||
PRIMARY MAINTAINER: Jakub Zelenka <bukka@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
PRIMARY MAINTAINER: Unknown
|
||||
MAINTENANCE: Odd fixes
|
||||
STATUS: Working
|
||||
SINCE: 5.2
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: ldap
|
||||
PRIMARY MAINTAINER: Stig Venaas <venaas@php.net>, Douglas Goldstein <cardoe@php.net>, Pierre-Alain Joye <pajoye@php.net>, Côme Bernigaud <mcmic@php.net>
|
||||
PRIMARY MAINTAINER: Stig Venaas <venaas@php.net>, Douglas Goldstein <cardoe@php.net>, Pierre-Alain Joye <pajoye@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -343,11 +422,21 @@ PRIMARY MAINTAINER: Derick Rethans <derick@derickrethans.nl>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: opcache
|
||||
PRIMARY MAINTAINER: Dmitry Stogov <dmitry@zend.com>, Xinchen Hui <laruence@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
EXTENSION: mhash
|
||||
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>, Scott MacVicar <scottmac@php.net>
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Working
|
||||
SINCE: 5.5.0
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mime_magic
|
||||
PRIMARY MAINTAINER: Unknown
|
||||
MAINTENANCE: Deprecated
|
||||
STATUS: Experimental
|
||||
COMMENT: Use the fileinfo extension instead
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: ming
|
||||
PRIMARY MAINTAINER: Frank M. Kromann
|
||||
MAINTENANCE: Unknown
|
||||
STATUS: Experimental
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: openssl
|
||||
PRIMARY MAINTAINER: Wez Furlong <wez@php.net>, Pierre-Alain Joye <pajoye@php.net>
|
||||
|
||||
@@ -155,7 +155,7 @@ Table of Contents
|
||||
a list of all available options along with short explanations running
|
||||
./configure --help. Our manual documents the different options
|
||||
separately. You will find the core options in the appendix, while the
|
||||
different extension specific options are described on the reference
|
||||
different extension specific options are descibed on the reference
|
||||
pages.
|
||||
|
||||
When PHP is configured, you are ready to build the module and/or
|
||||
@@ -223,12 +223,12 @@ Apache 1.3.x on Unix systems
|
||||
module on your system. The make install from above may have already
|
||||
added this for you, but be sure to check.
|
||||
|
||||
LoadModule php7_module libexec/libphp7.so
|
||||
LoadModule php5_module libexec/libphp5.so
|
||||
|
||||
15. And in the AddModule section of httpd.conf, somewhere under the
|
||||
ClearModuleList, add this:
|
||||
|
||||
AddModule mod_php7.c
|
||||
AddModule mod_php5.c
|
||||
|
||||
16. Tell Apache to parse certain extensions as PHP. For example,
|
||||
let's have Apache parse the .php extension as PHP. You could
|
||||
@@ -263,8 +263,8 @@ Apache 1.3.x on Unix systems
|
||||
|
||||
10. cd ../apache_1.3.x
|
||||
|
||||
11. ./configure --prefix=/www --activate-module=src/modules/php7/libphp7.a
|
||||
(The above line is correct! Yes, we know libphp7.a does not exist at this
|
||||
11. ./configure --prefix=/www --activate-module=src/modules/php5/libphp5.a
|
||||
(The above line is correct! Yes, we know libphp5.a does not exist at this
|
||||
stage. It isn't supposed to. It will be created.)
|
||||
|
||||
12. make
|
||||
@@ -309,24 +309,24 @@ stop and start:
|
||||
Different examples of compiling PHP for apache are as follows:
|
||||
./configure --with-apxs --with-pgsql
|
||||
|
||||
This will create a libphp7.so shared library that is loaded into Apache
|
||||
This will create a libphp5.so shared library that is loaded into Apache
|
||||
using a LoadModule line in Apache's httpd.conf file. The PostgreSQL
|
||||
support is embedded into this library.
|
||||
|
||||
./configure --with-apxs --with-pgsql=shared
|
||||
|
||||
This will create a libphp7.so shared library for Apache, but it will
|
||||
This will create a libphp5.so shared library for Apache, but it will
|
||||
also create a pgsql.so shared library that is loaded into PHP either by
|
||||
using the extension directive in php.ini file or by loading it
|
||||
explicitly in a script using the dl() function.
|
||||
|
||||
./configure --with-apache=/path/to/apache_source --with-pgsql
|
||||
|
||||
This will create a libmodphp7.a library, a mod_php7.c and some
|
||||
accompanying files and copy this into the src/modules/php7 directory in
|
||||
This will create a libmodphp5.a library, a mod_php5.c and some
|
||||
accompanying files and copy this into the src/modules/php5 directory in
|
||||
the Apache source tree. Then you compile Apache using
|
||||
--activate-module=src/modules/php7/libphp7.a and the Apache build
|
||||
system will create libphp7.a and link it statically into the httpd
|
||||
--activate-module=src/modules/php5/libphp5.a and the Apache build
|
||||
system will create libphp5.a and link it statically into the httpd
|
||||
binary. The PostgreSQL support is included directly into this httpd
|
||||
binary, so the final result here is a single httpd binary that includes
|
||||
all of Apache and all of PHP.
|
||||
@@ -450,7 +450,7 @@ cp php.ini-development /usr/local/lib/php.ini
|
||||
hand side of the LoadModule statement must point to the path of the
|
||||
PHP module on your system. The make install from above may have
|
||||
already added this for you, but be sure to check.
|
||||
LoadModule php7_module modules/libphp7.so
|
||||
LoadModule php5_module modules/libphp5.so
|
||||
8. Tell Apache to parse certain extensions as PHP. For example, let's
|
||||
have Apache parse .php files as PHP. Instead of only using the
|
||||
Apache AddType directive, we want to avoid potentially dangerous
|
||||
@@ -461,10 +461,10 @@ LoadModule php7_module modules/libphp7.so
|
||||
<FilesMatch \.php$>
|
||||
SetHandler application/x-httpd-php
|
||||
</FilesMatch>
|
||||
Or, if we wanted to allow .php, .php2, .php3, .php4, .php5, .php7,
|
||||
Or, if we wanted to allow .php, .php2, .php3, .php4, .php5, .php6,
|
||||
and .phtml files to be executed as PHP, but nothing else, we'd use
|
||||
this:
|
||||
<FilesMatch "\.ph(p[2-7]?|tml)$">
|
||||
<FilesMatch "\.ph(p[2-6]?|tml)$">
|
||||
SetHandler application/x-httpd-php
|
||||
</FilesMatch>
|
||||
And to allow .phps files to be handled by the php source filter,
|
||||
@@ -1004,16 +1004,16 @@ Debian GNU/Linux installation notes
|
||||
Using APT
|
||||
|
||||
First, note that other related packages may be desired like
|
||||
libapache2-mod-php7 to integrate with Apache 2, and php-pear for PEAR.
|
||||
libapache2-mod-php5 to integrate with Apache 2, and php-pear for PEAR.
|
||||
|
||||
Second, before installing a package, it's wise to ensure the package
|
||||
list is up to date. Typically, this is done by running the command
|
||||
apt-get update.
|
||||
|
||||
Example #1 Debian Install Example with Apache 2
|
||||
# apt-get install php7-common libapache2-mod-php7 php7-cli
|
||||
# apt-get install php5-common libapache2-mod-php5 php5-cli
|
||||
|
||||
APT will automatically install the PHP 7 module for Apache 2 and all of
|
||||
APT will automatically install the PHP 5 module for Apache 2 and all of
|
||||
its dependencies, and then activate it. Apache should be restarted in
|
||||
order for the changes take place. For example:
|
||||
|
||||
@@ -1027,23 +1027,23 @@ Better control of configuration
|
||||
very likely that additional modules will be desired, such as MySQL,
|
||||
cURL, GD, etc. These may also be installed via the apt-get command.
|
||||
|
||||
Example #3 Methods for listing additional PHP 7 packages
|
||||
# apt-cache search php7
|
||||
# aptitude search php7
|
||||
# aptitude search php7 |grep -i mysql
|
||||
Example #3 Methods for listing additional PHP 5 packages
|
||||
# apt-cache search php5
|
||||
# aptitude search php5
|
||||
# aptitude search php5 |grep -i mysql
|
||||
|
||||
The examples will show a lot of packages including several PHP specific
|
||||
ones like php7-cgi, php7-cli and php7-dev. Determine which are needed
|
||||
ones like php5-cgi, php5-cli and php5-dev. Determine which are needed
|
||||
and install them like any other with either apt-get or aptitude. And
|
||||
because Debian performs dependency checks, it'll prompt for those so
|
||||
for example to install MySQL and cURL:
|
||||
|
||||
Example #4 Install PHP with MySQL, cURL
|
||||
# apt-get install php7-mysql php7-curl
|
||||
# apt-get install php5-mysql php5-curl
|
||||
|
||||
APT will automatically add the appropriate lines to the different
|
||||
php.ini related files like /etc/php7/apache2/php.ini,
|
||||
/etc/php7/conf.d/pdo.ini, etc. and depending on the extension will add
|
||||
php.ini related files like /etc/php5/apache2/php.ini,
|
||||
/etc/php5/conf.d/pdo.ini, etc. and depending on the extension will add
|
||||
entries similar to extension=foo.so. However, restarting the web server
|
||||
(like Apache) is required before these changes take affect.
|
||||
|
||||
@@ -1137,9 +1137,9 @@ Using the bundled PHP
|
||||
2. With a text editor, uncomment the lines (by removing the #) that
|
||||
look similar to the following (these two lines are often not
|
||||
together, locate them both in the file):
|
||||
# LoadModule php7_module libexec/httpd/libphp7.so
|
||||
# LoadModule php5_module libexec/httpd/libphp5.so
|
||||
|
||||
# AddModule mod_php7.c
|
||||
# AddModule mod_php5.c
|
||||
|
||||
Notice the location/path. When building PHP in the future, the
|
||||
above files should be replaced or commented out.
|
||||
@@ -1148,7 +1148,7 @@ Using the bundled PHP
|
||||
Due to the following statement already existing in httpd.conf (as
|
||||
of Mac Panther), once PHP is enabled the .php files will
|
||||
automatically parse as PHP.
|
||||
<IfModule mod_php7.c>
|
||||
<IfModule mod_php5.c>
|
||||
# If php is turned on, we respect .php and .phps files.
|
||||
AddType application/x-httpd-php .php
|
||||
AddType application/x-httpd-php-source .phps
|
||||
@@ -1740,7 +1740,7 @@ Running PHP as an Apache module
|
||||
php_admin_flag can not be overridden by .htaccess or ini_set().
|
||||
|
||||
Example #1 Apache configuration example
|
||||
<IfModule mod_php7.c>
|
||||
<IfModule mod_php5.c>
|
||||
php_value include_path ".:/usr/local/lib/php"
|
||||
php_admin_flag engine on
|
||||
</IfModule>
|
||||
@@ -1810,7 +1810,7 @@ Installation
|
||||
script file via my browser, I get a server 500 error.
|
||||
8. Some operating systems: I have installed PHP without errors, but
|
||||
when I try to start Apache I get undefined symbol errors:
|
||||
[mybox:user /src/php7] root# apachectl configtest apachectl:
|
||||
[mybox:user /src/php5] root# apachectl configtest apachectl:
|
||||
/usr/local/apache/bin/httpd Undefined symbols: _compress
|
||||
_uncompress
|
||||
9. Windows: I have installed PHP, but when I try to access a PHP
|
||||
@@ -1819,7 +1819,7 @@ Installation
|
||||
set of HTTP headers. The headers it did return are:
|
||||
10. Windows: I've followed all the instructions, but still can't get
|
||||
PHP and IIS to work together!
|
||||
11. When running PHP as CGI with IIS, OmniHTTPD or Xitami, I get
|
||||
11. When running PHP as CGI with IIS, PWS, OmniHTTPD or Xitami, I get
|
||||
the following error: Security Alert! PHP CGI cannot be accessed
|
||||
directly..
|
||||
12. How do I know if my php.ini is being found and read? It seems like
|
||||
@@ -1912,7 +1912,7 @@ AddModule mod_perl.c
|
||||
|
||||
# Extra Modules
|
||||
LoadModule php_module modules/mod_php.so
|
||||
LoadModule php7_module modules/libphp7.so
|
||||
LoadModule php5_module modules/libphp5.so
|
||||
LoadModule perl_module modules/libperl.so
|
||||
|
||||
And add:
|
||||
@@ -1954,7 +1954,7 @@ AddType application/x-httpd-php .php
|
||||
Some operating systems: I have installed PHP without errors, but when I
|
||||
try to start Apache I get undefined symbol errors:
|
||||
|
||||
[mybox:user /src/php7] root# apachectl configtest
|
||||
[mybox:user /src/php5] root# apachectl configtest
|
||||
apachectl: /usr/local/apache/bin/httpd Undefined symbols:
|
||||
_compress
|
||||
_uncompress
|
||||
@@ -1984,7 +1984,7 @@ cgi error:
|
||||
script via the browser again. If it still fails then it could be
|
||||
one of the following:
|
||||
|
||||
+ File permissions on your PHP script, php.exe, php7ts.dll,
|
||||
+ File permissions on your PHP script, php.exe, php5ts.dll,
|
||||
php.ini or any PHP extensions you are trying to load are such
|
||||
that the anonymous internet user ISUR_<machinename> cannot
|
||||
access them.
|
||||
@@ -2007,7 +2007,7 @@ cgi error:
|
||||
And for IIS4 you need to tell it that PHP is a script engine.
|
||||
Also, you will want to read this faq.
|
||||
|
||||
When running PHP as CGI with IIS, OmniHTTPD or Xitami, I get the
|
||||
When running PHP as CGI with IIS, PWS, OmniHTTPD or Xitami, I get the
|
||||
following error: Security Alert! PHP CGI cannot be accessed
|
||||
directly..
|
||||
You must set the cgi.force_redirect directive to 0. It defaults
|
||||
@@ -2103,7 +2103,7 @@ cgi error:
|
||||
to choose PHP files from URL with no extension. In this case,
|
||||
replace the line AddType application/x-httpd-php .php with:
|
||||
|
||||
AddHandler php7-script php
|
||||
AddHandler php5-script php
|
||||
AddType text/html php
|
||||
|
||||
This solution doesn't work for Apache 1 as PHP module doesn't
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--------------------------------------------------------------------
|
||||
The PHP License, version 3.01
|
||||
Copyright (c) 1999 - 2015 The PHP Group. All rights reserved.
|
||||
Copyright (c) 1999 - 2012 The PHP Group. All rights reserved.
|
||||
--------------------------------------------------------------------
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
||||
+1
-1
@@ -20,4 +20,4 @@ $(srcdir)/zend_ini_parser.c: $(srcdir)/zend_ini_parser.y
|
||||
$(srcdir)/zend_ini_scanner.c: $(srcdir)/zend_ini_scanner.l
|
||||
@(cd $(top_srcdir); $(RE2C) $(RE2C_FLAGS) --no-generation-date --case-inverted -cbdFt Zend/zend_ini_scanner_defs.h -oZend/zend_ini_scanner.c Zend/zend_ini_scanner.l)
|
||||
|
||||
$(builddir)/zend_highlight.lo $(builddir)/zend_compile.lo: $(srcdir)/zend_language_parser.h
|
||||
$(builddir)/zend_indent.lo $(builddir)/zend_highlight.lo $(builddir)/zend_compile.lo: $(srcdir)/zend_language_parser.h
|
||||
+1
-1
@@ -14,7 +14,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 \*.c -o -name \*.h | sed -e 's/^\.\///' | sed -e 's/\.gcda//g' -e 's/\.gcno//g' -e 's/\.da//g' | $(EGREP) $(LCOV_INCLUDE) | sed -e 's/.libs/zzzz/g' | sort | sed -e 's/zzzz/.libs/g' | uniq` ;\
|
||||
-@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' | $(EGREP) $(LCOV_INCLUDE) | uniq` ;\
|
||||
for x in $$files; do \
|
||||
echo -n . ;\
|
||||
y=`echo $$x | sed -e 's!\.libs/!!'`; \
|
||||
|
||||
+4
-26
@@ -10,7 +10,7 @@ all: $(all_targets)
|
||||
@echo "Build complete."
|
||||
@echo "Don't forget to run 'make test'."
|
||||
@echo
|
||||
|
||||
|
||||
build-modules: $(PHP_MODULES) $(PHP_ZEND_EX)
|
||||
|
||||
build-binaries: $(PHP_BINARIES)
|
||||
@@ -115,33 +115,11 @@ clean:
|
||||
find . -name \*.la -o -name \*.a | xargs rm -f
|
||||
find . -name \*.so | xargs rm -f
|
||||
find . -name .libs -a -type d|xargs rm -rf
|
||||
rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(SAPI_CGI_PATH) $(SAPI_MILTER_PATH) $(SAPI_LITESPEED_PATH) $(SAPI_FPM_PATH) $(OVERALL_TARGET) modules/* libs/*
|
||||
rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(OVERALL_TARGET) modules/* libs/*
|
||||
|
||||
distclean: clean
|
||||
rm -f Makefile config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h main/internal_functions_cli.c main/internal_functions.c stamp-h sapi/apache/libphp$(PHP_MAJOR_VERSION).module sapi/apache_hooks/libphp$(PHP_MAJOR_VERSION).module buildmk.stamp Zend/zend_dtrace_gen.h Zend/zend_dtrace_gen.h.bak Zend/zend_config.h TSRM/tsrm_config.h
|
||||
rm -f php7.spec main/build-defs.h scripts/phpize
|
||||
rm -f ext/date/lib/timelib_config.h ext/mbstring/oniguruma/config.h ext/mbstring/libmbfl/config.h ext/oci8/oci8_dtrace_gen.h ext/oci8/oci8_dtrace_gen.h.bak
|
||||
rm -f scripts/man1/phpize.1 scripts/php-config scripts/man1/php-config.1 sapi/cli/php.1 sapi/cgi/php-cgi.1 ext/phar/phar.1 ext/phar/phar.phar.1
|
||||
rm -f sapi/fpm/php-fpm.conf sapi/fpm/init.d.php-fpm sapi/fpm/php-fpm.service sapi/fpm/php-fpm.8 sapi/fpm/status.html
|
||||
rm -f ext/iconv/php_have_bsd_iconv.h ext/iconv/php_have_glibc_iconv.h ext/iconv/php_have_ibm_iconv.h ext/iconv/php_have_iconv.h ext/iconv/php_have_libiconv.h ext/iconv/php_iconv_aliased_libiconv.h ext/iconv/php_iconv_supports_errno.h ext/iconv/php_php_iconv_h_path.h ext/iconv/php_php_iconv_impl.h
|
||||
rm -f ext/phar/phar.phar ext/phar/phar.php
|
||||
if test "$(srcdir)" != "$(builddir)"; then \
|
||||
rm -f ext/phar/phar/phar.inc; \
|
||||
fi
|
||||
rm -f Makefile config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h stamp-h sapi/apache/libphp$(PHP_MAJOR_VERSION).module buildmk.stamp
|
||||
$(EGREP) define'.*include/php' $(top_srcdir)/configure | $(SED) 's/.*>//'|xargs rm -f
|
||||
|
||||
prof-gen:
|
||||
CCACHE_DISABLE=1 $(MAKE) PROF_FLAGS=-fprofile-generate all
|
||||
|
||||
prof-clean:
|
||||
find . -name \*.lo -o -name \*.o | xargs rm -f
|
||||
find . -name \*.la -o -name \*.a | xargs rm -f
|
||||
find . -name \*.so | xargs rm -f
|
||||
rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(SAPI_CGI_PATH) $(SAPI_MILTER_PATH) $(SAPI_LITESPEED_PATH) $(SAPI_FPM_PATH) $(OVERALL_TARGET) modules/* libs/*
|
||||
|
||||
prof-use:
|
||||
CCACHE_DISABLE=1 $(MAKE) PROF_FLAGS=-fprofile-use all
|
||||
|
||||
|
||||
.PHONY: all clean install distclean test prof-gen prof-clean prof-use
|
||||
.PHONY: all clean install distclean test
|
||||
.NOEXPORT:
|
||||
@@ -1,420 +1,235 @@
|
||||
PHP NEWS
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
23 Jul 2015, PHP 7.0.0 Beta 2
|
||||
?? ??? 201?, PHP 5.5.0 Alpha 3
|
||||
|
||||
- Core:
|
||||
. Fixed bug #70012 (Exception lost with nested finally block). (Laruence)
|
||||
- General improvements:
|
||||
. Fixed bug #63874 (Segfault if php_strip_whitespace has heredoc). (Pierrick)
|
||||
. Fixed bug #63822 (Crash when using closures with ArrayAccess).
|
||||
(Nikita Popov)
|
||||
. Add Generator::throw() method. (Nikita Popov)
|
||||
. Bug #23955: allow specifying Max-Age attribute in setcookie() (narfbg, Lars)
|
||||
. Bug #52126: timestamp for mail.log (Martin Jansen, Lars)
|
||||
|
||||
- Soap:
|
||||
. Fixed bug #70032 (make_http_soap_request calls
|
||||
zend_hash_get_current_key_ex(,,,NULL). (Laruence)
|
||||
- mysqlnd
|
||||
. Fixed return value of mysqli_stmt_affected_rows() in the time after
|
||||
prepare() and before execute(). (Andrey)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #70018 (exec does not strip all whitespace). (Laruence)
|
||||
- cURL:
|
||||
. Added new functions curl_escape, curl_multi_setopt, curl_multi_strerror
|
||||
curl_pause, curl_reset, curl_share_close, curl_share_init,
|
||||
curl_share_setopt curl_strerror and curl_unescape. (Pierrick)
|
||||
. Addes new curl options CURLOPT_TELNETOPTIONS, CURLOPT_GSSAPI_DELEGATION,
|
||||
CURLOPT_ACCEPTTIMEOUT_MS, CURLOPT_SSL_OPTIONS, CURLOPT_TCP_KEEPALIVE,
|
||||
CURLOPT_TCP_KEEPIDLE and CURLOPT_TCP_KEEPINTVL. (Pierrick)
|
||||
|
||||
- Tokenizer:
|
||||
. Fixed bug #69430 (token_get_all has new irrecoverable errors). (Nikita)
|
||||
18 Dec 2012, PHP 5.5.0 Alpha 2
|
||||
|
||||
09 Jul 2015, PHP 7.0.0 Beta 1
|
||||
- General improvements:
|
||||
. Added systemtap support by enabling systemtap compatible dtrace probes on
|
||||
linux. (David Soria Parra)
|
||||
. Added support for using empty() on the result of function calls and
|
||||
other expressions (https://wiki.php.net/rfc/empty_isset_exprs).
|
||||
(Nikita Popov)
|
||||
. Optimized access to temporary and compiled VM variables. 8% less memory
|
||||
reads. (Dmitry)
|
||||
. The VM stacks for passing function arguments and syntaticaly nested calls
|
||||
were merged into a single stack. The stack size needed for op_array
|
||||
execution is calculated at compile time and preallocated at once. As result
|
||||
all the stack push operatins don't require checks for stack overflow
|
||||
any more. (Dmitry)
|
||||
|
||||
- Core:
|
||||
. Fixed bug #70006 (cli - function with default arg = STDOUT crash output).
|
||||
(Laruence)
|
||||
. Fixed bug #69521 (Segfault in gc_collect_cycles()).
|
||||
(arjen at react dot com, Laruence)
|
||||
. Improved zend_string API (Francois Laupretre)
|
||||
. Fixed bug #69955 (Segfault when trying to combine [] and assign-op on
|
||||
ArrayAccess object). (Laruence)
|
||||
. Fixed bug #69957 (Different ways of handling div/mod/intdiv). (Bob)
|
||||
. Fixed bug #69900 (Too long timeout on pipes). (Anatol)
|
||||
. Fixed bug #62210 (Exceptions can leak temporary variables. As a part of
|
||||
the fix serious refactoring was done. op_array->brk_cont_array was removed,
|
||||
and replaced with more general and speed efficient op_array->T_liveliness.
|
||||
ZEND_GOTO opcode is always replaced by ZEND_JMP at compile time).
|
||||
(Bob, Dmitry, Laruence)
|
||||
|
||||
- CLI server:
|
||||
. Fixed bug #69655 (php -S changes MKCALENDAR request method to MKCOL). (cmb)
|
||||
. Fixed bug #64878 (304 responses return Content-Type header). (cmb)
|
||||
|
||||
- COM:
|
||||
. Fixed bug #69939 (Casting object to bool returns false). (Kalle)
|
||||
|
||||
- JSON
|
||||
. Fixed bug #62010 (json_decode produces invalid byte-sequences).
|
||||
(Jakub Zelenka)
|
||||
|
||||
- OCI8:
|
||||
. Corrected oci8 hash destructors to prevent segfaults, and a few other fixes.
|
||||
(Cameron Porter)
|
||||
|
||||
- ODBC:
|
||||
. Fixed bug #69975 (PHP segfaults when accessing nvarchar(max) defined
|
||||
columns). (cmb)
|
||||
|
||||
- OpenSSL:
|
||||
. Fixed bug #69882 (OpenSSL error "key values mismatch" after
|
||||
openssl_pkcs12_read with extra cert) (Tomasz Sawicki)
|
||||
|
||||
- PCRE:
|
||||
. Fixed bug #53823 (preg_replace: * qualifier on unicode replace garbles the
|
||||
string). (cmb)
|
||||
|
||||
- Session:
|
||||
. Fixed bug #69952 (Data integrity issues accessing superglobals by
|
||||
reference). (Bob)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #69970 (Use-after-free vulnerability in
|
||||
spl_recursive_it_move_forward_ex()). (Laruence)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #69983 (get_browser fails with user agent of null).
|
||||
(Kalle, cmb, Laruence)
|
||||
. Fixed bug #69976 (Unable to parse "all" urls with colon char). (cmb)
|
||||
. Fixed bug #69768 (escapeshell*() doesn't cater to !). (cmb)
|
||||
|
||||
- Sqlite3:
|
||||
. Fixed bug #69972 (Use-after-free vulnerability in
|
||||
sqlite3SafetyCheckSickOrOk()). (Laruence)
|
||||
|
||||
25 Jun 2015, PHP 7.0.0 Alpha 2
|
||||
|
||||
- Core:
|
||||
. Fixed bug #69872 (uninitialised value in strtr with array). (Laruence)
|
||||
. Fixed bug #69868 (Invalid read of size 1 in zend_compile_short_circuiting).
|
||||
(Laruence)
|
||||
. Fixed bug #69849 (Broken output of apache_request_headers). (Kalle)
|
||||
. Fixed bug #69840 (iconv_substr() doesn't work with UTF-16BE). (Kalle)
|
||||
. Fixed bug #69823 (PHP 7.0.0alpha1 segmentation fault when exactly 33
|
||||
extensions are loaded). (Laruence)
|
||||
. Fixed bug #69805 (null ptr deref and seg fault in zend_resolve_class_name).
|
||||
(Laruence)
|
||||
. Fixed bug #69802 (Reflection on Closure::__invoke borks type hint class
|
||||
name). (Dmitry)
|
||||
. Fixed bug #69761 (Serialization of anonymous classes should be prevented).
|
||||
(Laruence)
|
||||
. Fixed bug #69551 (parse_ini_file() and parse_ini_string() segmentation
|
||||
fault). (Christoph M. Becker)
|
||||
. Fixed bug #69781 (phpinfo() reports Professional Editions of Windows
|
||||
7/8/8.1/10 as "Business"). (Christian Wenz)
|
||||
. Fixed bug #69835 (phpinfo() does not report many Windows SKUs).
|
||||
(Christian Wenz)
|
||||
. Fixed bug #69889 (Null coalesce operator doesn't work for string offsets).
|
||||
(Nikita)
|
||||
. Fixed bug #69891 (Unexpected array comparison result). (Nikita)
|
||||
. Fixed bug #69892 (Different arrays compare indentical due to integer key
|
||||
truncation). (Nikita)
|
||||
. Fixed bug #69893 (Strict comparison between integer and empty string keys
|
||||
crashes). (Nikita)
|
||||
|
||||
- DOM:
|
||||
. Fixed bug #69846 (Segmenation fault (access violation) when iterating over
|
||||
DOMNodeList). (Anatol Belski)
|
||||
|
||||
- GD:
|
||||
. Fixed bug #61221 (imagegammacorrect function loses alpha channel). (cmb)
|
||||
|
||||
- JSON
|
||||
. Fixed bug #68546 (json_decode() Fatal error: Cannot access property
|
||||
started with '\0'). (Jakub Zelenka)
|
||||
|
||||
- mysqlnd:
|
||||
. Fixed Bug #69796 (mysqli_stmt::fetch doesn't assign null values to
|
||||
bound variables). (Laruence)
|
||||
|
||||
- Curl:
|
||||
. Fixed bug #69831 (Segmentation fault in curl_getinfo). (im dot denisenko at
|
||||
yahoo dot com)
|
||||
|
||||
- Opcache:
|
||||
. Removed opcache.load_comments configuration directive. Now doc comments
|
||||
loading costs nothing and always enabled. (Dmitry)
|
||||
. Fixed bug #69838 (Wrong size calculation for function table). (Anatol)
|
||||
|
||||
- PCRE:
|
||||
. Fixed bug #69864 (Segfault in preg_replace_callback) (cmb, ab)
|
||||
|
||||
- PDO_pgsql:
|
||||
. Fixed bug #69752 (PDOStatement::execute() leaks memory with DML
|
||||
Statements when closeCuror() is u). (Philip Hofstetter)
|
||||
|
||||
- SPL
|
||||
. Fixed bug #69845 (ArrayObject with ARRAY_AS_PROPS broken). (Dmitry)
|
||||
|
||||
- SQLite3
|
||||
. Fixed bug #69897 (segfault when manually constructing SQLite3Result).
|
||||
(Kalle)
|
||||
|
||||
- Standard
|
||||
. Fixed bug #62922 (Truncating entire string should result in string).
|
||||
(Nikita)
|
||||
|
||||
11 Jun 2015, PHP 7.0.0 Alpha 1
|
||||
|
||||
- Core:
|
||||
. Fixed bug #69767 (Default parameter value with wrong type segfaults).
|
||||
(cmb, Laruence)
|
||||
. Fixed bug #69756 (Fatal error: Nesting level too deep - recursive dependency
|
||||
? with ===). (Dmitry, Laruence)
|
||||
. Fixed bug #69758 (Item added to array not being removed by array_pop/shift
|
||||
). (Laruence)
|
||||
. Fixed bug #68475 (Add support for $callable() sytnax with 'Class::method').
|
||||
(Julien, Aaron Piotrowski)
|
||||
. Fixed bug #69485 (Double free on zend_list_dtor). (Laruence)
|
||||
. Fixed bug #69427 (Segfault on magic method __call of private method in
|
||||
superclass). (Laruence)
|
||||
. Improved __call() and __callStatic() magic method handling. Now they are
|
||||
called in a stackless way using ZEND_CALL_TRAMPOLINE opcode, without
|
||||
additional stack frame. (Laruence, Dmitry)
|
||||
. Optimized strings concatenation. (Dmitry, Laruence)
|
||||
. Fixed weird operators behavior. Division by zero now emits warning and
|
||||
returns +/-INF, modulo by zero and intdid() throws an exception, shifts
|
||||
by negative offset throw exceptions. Compile-time evaluation of division
|
||||
by zero is disabled. (Dmitry, Andrea, Nikita)
|
||||
. Fixed bug #69371 (Hash table collision leads to inaccessible array keys).
|
||||
(Laruence)
|
||||
. Fixed bug #68933 (Invalid read of size 8 in zend_std_read_property).
|
||||
(Laruence, arjen at react dot com)
|
||||
. Fixed bug #68252 (segfault in Zend/zend_hash.c in function
|
||||
_zend_hash_del_el). (Laruence)
|
||||
. Fixed bug #65598 (Closure executed via static autoload incorrectly marked as
|
||||
static). (Nikita)
|
||||
. Fixed bug #66811 (Cannot access static::class in lambda, writen outside of a
|
||||
class). (Nikita)
|
||||
. Fixed bug #69568 (call a private function in closure failed). (Nikita)
|
||||
. Added PHP_INT_MIN constant. (Andrea)
|
||||
. Added Closure::call() method. (Andrea)
|
||||
. Fixed bug #67959 (Segfault when calling phpversion('spl')). (Florian)
|
||||
. Implemented the RFC `Catchable "Call to a member function bar() on a
|
||||
non-object"`. (Timm)
|
||||
. Added options parameter for unserialize allowing to specify acceptable
|
||||
classes (https://wiki.php.net/rfc/secure_unserialize). (Stas)
|
||||
. Fixed bug #63734 (Garbage collector can free zvals that are still
|
||||
referenced). (Dmitry)
|
||||
. Removed ZEND_ACC_FINAL_CLASS, promoting ZEND_ACC_FINAL as final class
|
||||
modifier. (Guilherme Blanco)
|
||||
. is_long() & is_integer() is now an alias of is_int(). (Kalle)
|
||||
. Implemented FR #55467 (phpinfo: PHP Variables with $ and single quotes). (Kalle)
|
||||
. Added ?? operator. (Andrea)
|
||||
. Added <=> operator. (Andrea)
|
||||
. Added \u{xxxxx} Unicode Codepoint Escape Syntax. (Andrea)
|
||||
. Fixed oversight where define() did not support arrays yet const syntax did.
|
||||
(Andrea, Dmitry)
|
||||
. Use "integer" and "float" instead of "long" and "double" in ZPP, type hint
|
||||
and conversion error messages. (Andrea)
|
||||
. Implemented FR #55428 (E_RECOVERABLE_ERROR when output buffering in output
|
||||
buffering handler). (Kalle)
|
||||
. Removed scoped calls of non-static methods from an incompatible $this
|
||||
context. (Nikita)
|
||||
. Removed support for #-style comments in ini files. (Nikita)
|
||||
. Removed support for assigning the result of new by reference. (Nikita)
|
||||
. Invalid octal literals in source code now produce compile errors, fixes
|
||||
PHPSadness #31. (Andrea)
|
||||
. Removed dl() function on fpm-fcgi. (Nikita)
|
||||
. Removed support for hexadecimal numeric strings. (Nikita)
|
||||
. Removed obsolete extensions and SAPIs. See the full list in UPGRADING. (Anatol)
|
||||
. Added NULL byte protection to exec, system and passthru. (Yasuo)
|
||||
. Added error_clear_last() function. (Reeze Xia)
|
||||
. Fixed bug #68797 (Number 2.2250738585072012e-308 converted incorrectly).
|
||||
(Anatol)
|
||||
. Improved zend_qsort(using hybrid sorting algo) for better performance,
|
||||
and also renamed zend_qsort to zend_sort. (Laruence)
|
||||
. Added stable sorting algo zend_insert_sort. (Laruence)
|
||||
. Implemented the RFC `Scalar Type Decalarations v0.5`. (Anthony)
|
||||
. Implemented the RFC `Group Use Declarations`. (Marcio)
|
||||
. Implemented the RFC `Continue Output Buffering`. (Mike)
|
||||
. Implemented the RFC `Constructor behaviour of internal classes`. (Dan, Dmitry)
|
||||
. Implemented the RFC `Fix "foreach" behavior`. (Dmitry)
|
||||
. Implemented the RFC `Generator Delegation`. (Bob)
|
||||
. Implemented the RFC `Anonymous Class Support`. (Joe, Nikita, Dmitry)
|
||||
. Implemented the RFC `Context Sensitive Lexer`. (Marcio Almada)
|
||||
. Fixed bug #69511 (Off-by-one buffer overflow in php_sys_readlink).
|
||||
(Jan Starke, Anatol)
|
||||
|
||||
- CLI server:
|
||||
. Refactor MIME type handling to use a hash table instead of linear search.
|
||||
(Adam)
|
||||
. Update the MIME type list from the one shipped by Apache HTTPD. (Adam)
|
||||
. Added support for SEARCH WebDav method. (Mats Lindh)
|
||||
|
||||
- Curl:
|
||||
. Fixed bug #68937 (Segfault in curl_multi_exec). (Laruence)
|
||||
. Removed support for unsafe file uploads. (Nikita)
|
||||
|
||||
- Date:
|
||||
. Fixed day_of_week function as it could sometimes return negative values
|
||||
internally. (Derick)
|
||||
. Removed $is_dst parameter from mktime() and gmmktime(). (Nikita)
|
||||
. Removed date.timezone warning
|
||||
(https://wiki.php.net/rfc/date.timezone_warning_removal). (Bob)
|
||||
. Added "v" DateTime format modifier to get the 3-digit version of fraction
|
||||
of seconds. (Mariano Iglesias)
|
||||
. Implemented FR #69089: Added DateTime::RFC3339_EXTENDED to output in
|
||||
RFC3339 Extended format which includes fraction of seconds (Mariano
|
||||
Iglesias)
|
||||
|
||||
- DBA:
|
||||
. Fixed bug #62490 (dba_delete returns true on missing item (inifile)). (Mike)
|
||||
. Fixed bug #68711 (useless comparisons). (bugreports at internot dot info)
|
||||
|
||||
- DOM:
|
||||
. Made DOMNode::textContent writeable. (Tjerk)
|
||||
|
||||
- GD:
|
||||
. Made fontFetch's path parser thread-safe. (Sara)
|
||||
. Removed T1Lib support. (Kalle)
|
||||
- MySQL
|
||||
. This extension is now deprecated, and deprecation warnings will be generated
|
||||
when connections are established to databases via mysql_connect(),
|
||||
mysql_pconnect(), or through implicit connection: use MySQLi or PDO_MySQL
|
||||
instead (https://wiki.php.net/rfc/mysql_deprecation). (Adam)
|
||||
|
||||
- Fileinfo:
|
||||
. Fixed bug #66242 (libmagic: don't assume char is signed). (ArdB)
|
||||
. Fixed bug #63590 (Different results in TS and NTS under Windows).
|
||||
(Anatoliy)
|
||||
|
||||
- Filter:
|
||||
. New FILTER_VALIDATE_DOMAIN and better RFC conformance for FILTER_VALIDATE_URL. (Kevin Dunglas)
|
||||
- Apache2 Handler SAPI:
|
||||
. Enabled Apache 2.4 configure option for Windows (Pierre, Anatoliy)
|
||||
|
||||
- FPM:
|
||||
. Fixed bug #68945 (Unknown admin values segfault pools). (Laruence)
|
||||
. Fixed bug #65933 (Cannot specify config lines longer than 1024 bytes). (Chris Wright)
|
||||
. Implement request #67106 (Split main fpm config). (Elan Ruusamäe, Remi)
|
||||
13 Nov 2012, PHP 5.5.0 Alpha 1
|
||||
|
||||
- FTP:
|
||||
. Fixed bug #69082 (FTPS support on Windows). (Anatol)
|
||||
|
||||
- Intl:
|
||||
. Removed deprecated aliases datefmt_set_timezone_id() and
|
||||
IntlDateFormatter::setTimeZoneID(). (Nikita)
|
||||
|
||||
- JSON
|
||||
. Replace non-free JSON parser with a parser from Jsond extension, fixes #63520
|
||||
(JSON extension includes a problematic license statement). (Jakub Zelenka)
|
||||
. Fixed bug #68938 (json_decode() decodes empty string without error).
|
||||
(jeremy at bat-country dot us)
|
||||
|
||||
- LDAP
|
||||
. Fixed bug #47222 (Implement LDAP_OPT_DIAGNOSTIC_MESSAGE). (Andreas Heigl)
|
||||
|
||||
- LiteSpeed:
|
||||
. Updated LiteSpeed SAPI code from V5.5 to V6.6. (George Wang)
|
||||
|
||||
- libxml:
|
||||
. Fixed handling of big lines in error messages with libxml >= 2.9.0.
|
||||
(Christoph M. Becker)
|
||||
|
||||
- Mcrypt:
|
||||
. Fixed possible read after end of buffer and use after free. (Dmitry)
|
||||
. Removed mcrypt_generic_end() alias. (Nikita)
|
||||
. Removed mcrypt_ecb(), mcrypt_cbc(), mcrypt_cfb(), mcrypt_ofb(). (Nikita)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #69688 (segfault with eval and opcache fast shutdown).
|
||||
- General improvements:
|
||||
. Added generators and coroutines (https://wiki.php.net/rfc/generators).
|
||||
(Nikita Popov)
|
||||
. Added "finally" keyword (https://wiki.php.net/rfc/finally). (Laruence)
|
||||
. Add simplified password hashing API
|
||||
(https://wiki.php.net/rfc/password_hash). (Anthony Ferrara)
|
||||
. Added support for list in foreach (https://wiki.php.net/rfc/foreachlist).
|
||||
(Laruence)
|
||||
. Added experimental (disabled by default) file based opcode cache.
|
||||
(Dmitry, Laruence, Anatol)
|
||||
. Fixed bug with try blocks being removed when extended_info opcode
|
||||
generation is turned on. (Laruence)
|
||||
. Fixed bug #68644 (strlen incorrect : mbstring + func_overload=2 +UTF-8
|
||||
+ Opcache). (Laruence)
|
||||
. Added support for using empty() on the result of function calls and
|
||||
other expressions (https://wiki.php.net/rfc/empty_isset_exprs).
|
||||
(Nikita Popov)
|
||||
. Added support for constant array/string dereferencing. (Laruence)
|
||||
. Improve set_exception_handler while doing reset.(Laruence)
|
||||
. Remove php_logo_guid(), php_egg_logo_guid(), php_real_logo_guid(),
|
||||
zend_logo_guid(). (Adnrew Faulds)
|
||||
. Drop Windows XP and 2003 support. (Pierre)
|
||||
|
||||
- OpenSSL:
|
||||
. Added "alpn_protocols" SSL context option allowing encrypted client/server
|
||||
streams to negotiate alternative protocols using the ALPN TLS extension when
|
||||
built against OpenSSL 1.0.2 or newer. Negotiated protocol information is
|
||||
accessible through stream_get_meta_data() output.
|
||||
. Removed "CN_match" and "SNI_server_name" SSL context options. Use automatic
|
||||
detection or the "peer_name" option instead. (Nikita)
|
||||
- Calendar:
|
||||
. Fixed bug #54254 (cal_from_jd returns month = 6 when there is only one Adar)
|
||||
(Stas, Eitan Mosenkis)
|
||||
|
||||
- pcntl:
|
||||
. Fixed bug #60509 (pcntl_signal doesn't decrease ref-count of old handler
|
||||
when setting SIG_DFL). (Julien)
|
||||
. Added wifcontinued and wcontinued. (xilon-jul)
|
||||
. Added rusage support to pcntl_wait() and pcntl_waitpid(). (Anton Stepanenko,
|
||||
Tony)
|
||||
- Core:
|
||||
. Added boolval(). (Jille Timmermans)
|
||||
. Added "Z" option to pack/unpack. (Gustavo)
|
||||
. Implemented FR #60738 (Allow 'set_error_handler' to handle NULL).
|
||||
(Laruence, Nikita Popov)
|
||||
. Added optional second argument for assert() to specify custom message. Patch
|
||||
by Lonny Kapelushnik (lonny@lonnylot.com). (Lars)
|
||||
. Fixed bug #18556 (Engine uses locale rules to handle class names). (Stas)
|
||||
. Fixed bug #61681 (Malformed grammar). (Nikita Popov, Etienne, Laruence)
|
||||
. Fixed bug #61038 (unpack("a5", "str\0\0") does not work as expected).
|
||||
(srgoogleguy, Gustavo)
|
||||
. Return previous handler when passing NULL to set_error_handler and
|
||||
set_exception_handler. (Nikita Popov)
|
||||
|
||||
- cURL:
|
||||
. Added support for CURLOPT_FTP_RESPONSE_TIMEOUT, CURLOPT_APPEND,
|
||||
CURLOPT_DIRLISTONLY, CURLOPT_NEW_DIRECTORY_PERMS, CURLOPT_NEW_FILE_PERMS,
|
||||
CURLOPT_NETRC_FILE, CURLOPT_PREQUOTE, CURLOPT_KRBLEVEL, CURLOPT_MAXFILESIZE,
|
||||
CURLOPT_FTP_ACCOUNT, CURLOPT_COOKIELIST, CURLOPT_IGNORE_CONTENT_LENGTH,
|
||||
CURLOPT_CONNECT_ONLY, CURLOPT_LOCALPORT, CURLOPT_LOCALPORTRANGE,
|
||||
CURLOPT_FTP_ALTERNATIVE_TO_USER, CURLOPT_SSL_SESSIONID_CACHE,
|
||||
CURLOPT_FTP_SSL_CCC, CURLOPT_HTTP_CONTENT_DECODING,
|
||||
CURLOPT_HTTP_TRANSFER_DECODING, CURLOPT_PROXY_TRANSFER_MODE,
|
||||
CURLOPT_ADDRESS_SCOPE, CURLOPT_CRLFILE, CURLOPT_ISSUERCERT,
|
||||
CURLOPT_USERNAME, CURLOPT_PASSWORD, CURLOPT_PROXYUSERNAME,
|
||||
CURLOPT_PROXYPASSWORD, CURLOPT_NOPROXY, CURLOPT_SOCKS5_GSSAPI_NEC,
|
||||
CURLOPT_SOCKS5_GSSAPI_SERVICE, CURLOPT_TFTP_BLKSIZE,
|
||||
CURLOPT_SSH_KNOWNHOSTS, CURLOPT_FTP_USE_PRET, CURLOPT_MAIL_FROM,
|
||||
CURLOPT_MAIL_RCPT, CURLOPT_RTSP_CLIENT_CSEQ, CURLOPT_RTSP_SERVER_CSEQ,
|
||||
CURLOPT_RTSP_SESSION_ID, CURLOPT_RTSP_STREAM_URI, CURLOPT_RTSP_TRANSPORT,
|
||||
CURLOPT_RTSP_REQUEST, CURLOPT_RESOLVE, CURLOPT_ACCEPT_ENCODING,
|
||||
CURLOPT_TRANSFER_ENCODING, CURLOPT_DNS_SERVERS and CURLOPT_USE_SSL.
|
||||
(Pierrick)
|
||||
. Fixed bug #55635 (CURLOPT_BINARYTRANSFER no longer used. The constant
|
||||
still exists for backward compatibility but is doing nothing). (Pierrick)
|
||||
. Fixed bug #54995 (Missing CURLINFO_RESPONSE_CODE support). (Pierrick)
|
||||
|
||||
- Datetime
|
||||
. Fixed bug #61642 (modify("+5 weekdays") returns Sunday).
|
||||
(Dmitri Iouchtchenko)
|
||||
|
||||
- Hash
|
||||
. Added support for PBKDF2 via hash_pbkdf2(). (Anthony Ferrara)
|
||||
|
||||
- Intl
|
||||
. The intl extension now requires ICU 4.0+.
|
||||
. Added intl.use_exceptions INI directive, which controls what happens when
|
||||
global errors are set together with intl.error_level. (Gustavo)
|
||||
. MessageFormatter::format() and related functions now accepted named
|
||||
arguments and mixed numeric/named arguments in ICU 4.8+. (Gustavo)
|
||||
. MessageFormatter::format() and related functions now don't error out when
|
||||
an insufficient argument count is provided. Instead, the placeholders will
|
||||
remain unsubstituted. (Gustavo)
|
||||
. MessageFormatter::parse() and MessageFormat::format() (and their static
|
||||
equivalents) don't throw away better than second precision in the arguments.
|
||||
(Gustavo)
|
||||
. IntlDateFormatter::__construct and datefmt_create() now accept for the
|
||||
$timezone argument time zone identifiers, IntlTimeZone objects, DateTimeZone
|
||||
objects and NULL. (Gustavo)
|
||||
. IntlDateFormatter::__construct and datefmt_create() no longer accept invalid
|
||||
timezone identifiers or empty strings. (Gustavo)
|
||||
. The default time zone used in IntlDateFormatter::__construct and
|
||||
datefmt_create() (when the corresponding argument is not passed or NULL is
|
||||
passed) is now the one given by date_default_timezone_get(), not the
|
||||
default ICU time zone. (Gustavo)
|
||||
. The time zone passed to the IntlDateFormatter is ignored if it is NULL and
|
||||
if the calendar passed is an IntlCalendar object -- in this case, the
|
||||
IntlCalendar's time zone will be used instead. Otherwise, the time zone
|
||||
specified in the $timezone argument is used instead. This does not affect
|
||||
old code, as IntlCalendar was introduced in this version. (Gustavo)
|
||||
. IntlDateFormatter::__construct and datefmt_create() now accept for the
|
||||
$calendar argument also IntlCalendar objects. (Gustavo)
|
||||
. IntlDateFormatter::getCalendar() and datefmt_get_calendar() return false
|
||||
if the IntlDateFormatter was set up with an IntlCalendar instead of the
|
||||
constants IntlDateFormatter::GREGORIAN/TRADITIONAL. IntlCalendar did not
|
||||
exist before this version. (Gustavo)
|
||||
. IntlDateFormatter::setCalendar() and datefmt_set_calendar() now also accept
|
||||
an IntlCalendar object, in which case its time zone is taken. Passing a
|
||||
constant is still allowed, and still keeps the time zone. (Gustavo)
|
||||
. IntlDateFormatter::setTimeZoneID() and datefmt_set_timezone_id() are
|
||||
deprecated. Use IntlDateFormatter::setTimeZone() or datefmt_set_timezone()
|
||||
instead. (Gustavo)
|
||||
. IntlDateFormatter::format() and datefmt_format() now also accept an
|
||||
IntlCalendar object for formatting. (Gustavo)
|
||||
. Added the classes: IntlCalendar, IntlGregorianCalendar, IntlTimeZone,
|
||||
IntlBreakIterator, IntlRuleBasedBreakIterator and
|
||||
IntlCodePointBreakIterator. (Gustavo)
|
||||
. Added the functions: intlcal_get_keyword_values_for_locale(),
|
||||
intlcal_get_now(), intlcal_get_available_locales(), intlcal_get(),
|
||||
intlcal_get_time(), intlcal_set_time(), intlcal_add(),
|
||||
intlcal_set_time_zone(), intlcal_after(), intlcal_before(), intlcal_set(),
|
||||
intlcal_roll(), intlcal_clear(), intlcal_field_difference(),
|
||||
intlcal_get_actual_maximum(), intlcal_get_actual_minimum(),
|
||||
intlcal_get_day_of_week_type(), intlcal_get_first_day_of_week(),
|
||||
intlcal_get_greatest_minimum(), intlcal_get_least_maximum(),
|
||||
intlcal_get_locale(), intlcal_get_maximum(),
|
||||
intlcal_get_minimal_days_in_first_week(), intlcal_get_minimum(),
|
||||
intlcal_get_time_zone(), intlcal_get_type(),
|
||||
intlcal_get_weekend_transition(), intlcal_in_daylight_time(),
|
||||
intlcal_is_equivalent_to(), intlcal_is_lenient(), intlcal_is_set(),
|
||||
intlcal_is_weekend(), intlcal_set_first_day_of_week(),
|
||||
intlcal_set_lenient(), intlcal_equals(),
|
||||
intlcal_get_repeated_wall_time_option(),
|
||||
intlcal_get_skipped_wall_time_option(),
|
||||
intlcal_set_repeated_wall_time_option(),
|
||||
intlcal_set_skipped_wall_time_option(), intlcal_from_date_time(),
|
||||
intlcal_to_date_time(), intlcal_get_error_code(),
|
||||
intlcal_get_error_message(), intlgregcal_create_instance(),
|
||||
intlgregcal_set_gregorian_change(), intlgregcal_get_gregorian_change() and
|
||||
intlgregcal_is_leap_year(). (Gustavo)
|
||||
. Added the functions: intltz_create_time_zone(), intltz_create_default(),
|
||||
intltz_get_id(), intltz_get_gmt(), intltz_get_unknown(),
|
||||
intltz_create_enumeration(), intltz_count_equivalent_ids(),
|
||||
intltz_create_time_zone_id_enumeration(), intltz_get_canonical_id(),
|
||||
intltz_get_region(), intltz_get_tz_data_version(),
|
||||
intltz_get_equivalent_id(), intltz_use_daylight_time(), intltz_get_offset(),
|
||||
intltz_get_raw_offset(), intltz_has_same_rules(), intltz_get_display_name(),
|
||||
intltz_get_dst_savings(), intltz_from_date_time_zone(),
|
||||
intltz_to_date_time_zone(), intltz_get_error_code(),
|
||||
intltz_get_error_message(). (Gustavo)
|
||||
. Added the methods: IntlDateFormatter::formatObject(),
|
||||
IntlDateFormatter::getCalendarObject(), IntlDateFormatter::getTimeZone(),
|
||||
IntlDateFormatter::setTimeZone(). (Gustavo)
|
||||
. Added the functions: datefmt_format_object(), datefmt_get_calendar_object(),
|
||||
datefmt_get_timezone(), datefmt_set_timezone(),
|
||||
datefmt_get_calendar_object(), intlcal_create_instance(). (Gustavo)
|
||||
|
||||
- MCrypt
|
||||
. mcrypt_ecb(), mcrypt_cbc(), mcrypt_cfb() and mcrypt_ofb() now throw
|
||||
E_DEPRECATED. (GoogleGuy)
|
||||
|
||||
- MySQLi
|
||||
. Dropped support for LOAD DATA LOCAL INFILE handlers when using libmysql.
|
||||
Known for stability problems. (Andrey)
|
||||
. Added support for SHA256 authentication available with MySQL 5.6.6+. (Andrey)
|
||||
|
||||
- PCRE:
|
||||
. Removed support for the /e (PREG_REPLACE_EVAL) modifier. (Nikita)
|
||||
. Deprecated the /e modifier
|
||||
(https://wiki.php.net/rfc/remove_preg_replace_eval_modifier). (Nikita Popov)
|
||||
. Fixed bug #63284 (Upgrade PCRE to 8.31). (Anatoliy)
|
||||
|
||||
- PDO:
|
||||
. Fixed bug #59450 (./configure fails with "Cannot find php_pdo_driver.h").
|
||||
(maxime dot besson at smile dot fr)
|
||||
- pgsql
|
||||
. Added pg_escape_literal() and pg_escape_identifier() (Yasuo)
|
||||
|
||||
- PDO_mysql:
|
||||
. Fixed bug #68424 (Add new PDO mysql connection attr to control multi
|
||||
statements option). (peter dot wolanin at acquia dot com)
|
||||
- SPL
|
||||
. Fix bug #60560 (SplFixedArray un-/serialize, getSize(), count() return 0,
|
||||
keys are strings). (Adam)
|
||||
|
||||
- PDO_pgsql:
|
||||
. Removed PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT attribute in favor of
|
||||
ATTR_EMULATE_PREPARES). (Nikita)
|
||||
|
||||
- Reflection
|
||||
. Fixed inheritance chain of Reflector interface. (Tjerk)
|
||||
. Added ReflectionGenerator class. (Bob)
|
||||
. Added reflection support for return types and type declarations. (Sara,
|
||||
Matteo)
|
||||
|
||||
- Session:
|
||||
. Fixed bug #67694 (Regression in session_regenerate_id()). (Tjerk)
|
||||
. Fixed bug #68941 (mod_files.sh is a bash-script). (bugzilla at ii.nl, Yasuo)
|
||||
|
||||
- SOAP:
|
||||
. Fixed bug #68361 (Segmentation fault on SoapClient::__getTypes). (Laruence)
|
||||
|
||||
- SPL:
|
||||
. Changed ArrayIterator implementation using zend_hash_iterator_... API.
|
||||
Allowed modification of iterated ArrayObject using the same behavior
|
||||
as proposed in `Fix "foreach" behavior`. Removed "Array was modified
|
||||
outside object and internal position is no longer valid" hack. (Dmitry)
|
||||
. Implemented #67886 (SplPriorityQueue/SplHeap doesn't expose extractFlags
|
||||
nor curruption state). (Julien)
|
||||
. Fixed bug #66405 (RecursiveDirectoryIterator::CURRENT_AS_PATHNAME
|
||||
breaks the RecursiveIterator). (Paul Garvin)
|
||||
|
||||
- Sqlite3:
|
||||
. Fixed bug #68260 (SQLite3Result::fetchArray declares wrong
|
||||
required_num_args). (Julien)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #69723 (Passing parameters by reference and array_column).
|
||||
(Laruence)
|
||||
. Fixed bug #69523 (Cookie name cannot be empty). (Christoph M. Becker)
|
||||
. Fixed bug #69325 (php_copy_file_ex does not pass the argument).
|
||||
(imbolk at gmail dot com)
|
||||
. Fixed bug #69299 (Regression in array_filter's $flag argument in PHP 7).
|
||||
(Laruence)
|
||||
. Removed call_user_method() and call_user_method_array() functions. (Kalle)
|
||||
. Fixed user session handlers (See rfc:session.user.return-value). (Sara)
|
||||
. Added intdiv() function. (Andrea)
|
||||
. Improved precision of log() function for base 2 and 10. (Marc Bennewitz)
|
||||
. Remove string category support in setlocale(). (Nikita)
|
||||
. Remove set_magic_quotes_runtime() and its alias magic_quotes_runtime().
|
||||
(Nikita)
|
||||
. Fixed bug #65272 (flock() out parameter not set correctly in windows).
|
||||
(Daniel Lowrey)
|
||||
. Added preg_replace_callback_array function. (Wei Dai)
|
||||
. Deprecated salt option to password_hash. (Anthony)
|
||||
. Fixed bug #69686 (password_verify reports back error on PHP7 will null
|
||||
string). (Anthony)
|
||||
. Added Windows support for getrusage(). (Kalle)
|
||||
. Removed hardcoded limit on number of pipes in proc_open(). (Tony)
|
||||
|
||||
- Streams:
|
||||
. Fixed bug #68532 (convert.base64-encode omits padding bytes).
|
||||
(blaesius at krumedia dot de)
|
||||
. Removed set_socket_blocking() in favor of its alias stream_set_blocking().
|
||||
(Nikita)
|
||||
|
||||
- XSL:
|
||||
. Fixed bug #64776 (The XSLT extension is not thread safe). (Mike)
|
||||
. Removed xsl.security_prefs ini option. (Nikita)
|
||||
|
||||
- Zlib:
|
||||
. Added deflate_init(), deflate_add(), inflate_init(), inflate_add()
|
||||
functions allowing incremental/streaming compression/decompression.
|
||||
(Daniel Lowrey & Bob Weinand)
|
||||
- Tokenizer:
|
||||
. Fixed bug #60097 (token_get_all fails to lex nested heredoc). (Nikita Popov)
|
||||
|
||||
- Zip:
|
||||
. Added ZipArchive::setCompressionName and ZipArchive::setCompressionIndex
|
||||
methods (Remi, Cedric Delmas)
|
||||
. Update bundled libzip to 1.0.1 (Remi, Anatol)
|
||||
. Fixed bug #67161. (ZipArchive::getStream() returns NULL for certain file)
|
||||
(Christoph M. Becker)
|
||||
. Upgraded libzip to 0.10.1 (Anatoliy)
|
||||
|
||||
- Fileinfo:
|
||||
. Fixed bug #63248 (Load multiple magic files from a directory under Windows).
|
||||
(Anatoliy)
|
||||
|
||||
<<< NOTE: Insert NEWS from last stable release here prior to actual release! >>>
|
||||
@@ -0,0 +1,39 @@
|
||||
Between PHP 4.0.6 and 4.1.0, the Zend module struct changed in a way
|
||||
that broke both source and binary compatibility. If you are
|
||||
maintaining a third party extension, here's how to update it:
|
||||
|
||||
If this was your old module entry:
|
||||
|
||||
zend_module_entry foo_module_entry = {
|
||||
"foo", /* extension name */
|
||||
foo_functions, /* extension function list */
|
||||
NULL, /* extension-wide startup function */
|
||||
NULL, /* extension-wide shutdown function */
|
||||
PHP_RINIT(foo), /* per-request startup function */
|
||||
PHP_RSHUTDOWN(foo), /* per-request shutdown function */
|
||||
PHP_MINFO(foo), /* information function */
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
Here's how it should look if you want your code to build with PHP
|
||||
4.1.0 and up:
|
||||
|
||||
zend_module_entry foo_module_entry = {
|
||||
#if ZEND_MODULE_API_NO >= 20010901
|
||||
STANDARD_MODULE_HEADER,
|
||||
#endif
|
||||
"foo", /* extension name */
|
||||
foo_functions, /* extension function list */
|
||||
NULL, /* extension-wide startup function */
|
||||
NULL, /* extension-wide shutdown function */
|
||||
PHP_RINIT(foo), /* per-request startup function */
|
||||
PHP_RSHUTDOWN(foo), /* per-request shutdown function */
|
||||
PHP_MINFO(foo), /* information function */
|
||||
#if ZEND_MODULE_API_NO >= 20010901
|
||||
FOO_VERSION, /* extension version number (string) */
|
||||
#endif
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
If you don't care about source compatibility with earlier PHP releases
|
||||
than 4.1.0, you can drop the #if/#endif lines.
|
||||
+10
-33
@@ -31,11 +31,6 @@ HOW TO USE IT
|
||||
|
||||
./buildconf; ./configure --enable-module_name; make
|
||||
|
||||
The definition of PHP_MODULE_NAME_VERSION will be present in the
|
||||
php_module_name.h and injected into the zend_module_entry definition. This
|
||||
is required by the PECL website for the version string conformity checks
|
||||
against package.xml
|
||||
|
||||
But if you already have planned the overall scheme of your module, what
|
||||
functions it will contain, their return types and the arguments they take
|
||||
(a very good idea) and don't want to bother yourself with creating function
|
||||
@@ -45,29 +40,12 @@ HOW TO USE IT
|
||||
|
||||
--proto=filename.
|
||||
|
||||
SOURCE AND HEADER FILE NAME
|
||||
|
||||
./ext_skel generates 'module_name.c' and 'php_module_name.h' as main source
|
||||
and header files. Keep these names.
|
||||
|
||||
Module functions (User functions) must be named
|
||||
|
||||
module_name_function()
|
||||
|
||||
When you need to expose module functions to other modules, expose functions
|
||||
strictly needed by others. Exposed internal function must be named
|
||||
|
||||
php_module_name_function()
|
||||
|
||||
See also CODING_STANDARDS.
|
||||
|
||||
|
||||
FORMAT OF FUNCTION DEFINITIONS FILE
|
||||
|
||||
All the definitions must be on one line. In it's simplest form, it's just
|
||||
the function name, e.g.
|
||||
|
||||
module_name_function
|
||||
my_function
|
||||
|
||||
but then you'll be left with an almost empty function body without any
|
||||
argument handling.
|
||||
@@ -89,9 +67,8 @@ FORMAT OF FUNCTION DEFINITIONS FILE
|
||||
|
||||
An example:
|
||||
|
||||
module_name_function(int arg1, int arg2 [, int arg3 [, int arg4]])
|
||||
my_function(int arg1, int arg2 [, int arg3 [, int arg4]]) this is my 1st
|
||||
|
||||
Arguments arg1 and arg2 are required.
|
||||
Arguments arg3 and arg4 are optional.
|
||||
|
||||
If possible, the function definition should also contain it's return type
|
||||
@@ -151,24 +128,24 @@ EXAMPLE
|
||||
|
||||
The following _one_ line
|
||||
|
||||
bool module_name_drawtext(resource image, string text, resource font, int x, int y [, int color])
|
||||
bool my_drawtext(resource image, string text, resource font, int x, int y [, int color])
|
||||
|
||||
will create this function definition for you (note that there are a few
|
||||
question marks to be replaced by you, and you must of course add your own
|
||||
value definitions too):
|
||||
|
||||
/* {{{ proto bool module_name_drawtext(resource image, string text, resource font, int x, int y [, int color])
|
||||
/* {{{ proto bool my_drawtext(resource image, string text, resource font, int x, int y [, int color])
|
||||
*/
|
||||
PHP_FUNCTION(module_name_drawtext)
|
||||
PHP_FUNCTION(my_drawtext)
|
||||
{
|
||||
char *text = NULL;
|
||||
int argc = ZEND_NUM_ARGS();
|
||||
int image_id = -1;
|
||||
size_t text_len;
|
||||
int text_len;
|
||||
int font_id = -1;
|
||||
zend_long x;
|
||||
zend_long y;
|
||||
zend_long color;
|
||||
long x;
|
||||
long y;
|
||||
long color;
|
||||
zval *image = NULL;
|
||||
zval *font = NULL;
|
||||
|
||||
@@ -182,7 +159,7 @@ PHP_FUNCTION(module_name_drawtext)
|
||||
ZEND_FETCH_RESOURCE(???, ???, font, font_id, "???", ???_rsrc_id);
|
||||
}
|
||||
|
||||
php_error(E_WARNING, "module_name_drawtext: not yet implemented");
|
||||
php_error(E_WARNING, "my_drawtext: not yet implemented");
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
+11
-18
@@ -45,39 +45,32 @@ Currently we have the following branches in use::
|
||||
|
||||
master The active development branch.
|
||||
|
||||
PHP-5.6 Is used to release the PHP 5.6.x series. This is a current
|
||||
PHP-5.5 Is used to release the PHP 5.5.x series. It allows for larger
|
||||
enhancements.
|
||||
|
||||
PHP-5.4 Is used to release the PHP 5.4.x series. This is current
|
||||
stable version and is open for bugfixes only.
|
||||
|
||||
PHP-5.5 Is used to release the PHP 5.5.x series. This is a current
|
||||
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.4 Is used to release the PHP 5.4.x series. This is a current
|
||||
stable version and is open for bugfixes only.
|
||||
|
||||
PHP-5.3 This branch is closed.
|
||||
|
||||
PHP-5.2 This branch is closed.
|
||||
|
||||
PHP-5.1 This branch is closed.
|
||||
|
||||
PHP-4.4 This branch is closed.
|
||||
|
||||
PHP-X.Y.Z These branches are used for the release managers for tagging
|
||||
the releases, hence they are closed to the general public.
|
||||
|
||||
The next few rules are more of a technical nature::
|
||||
|
||||
1. All changes should first go to the lowest branch (i.e. 5.4) and then
|
||||
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 *any
|
||||
stable release* version with the given change. In other words,
|
||||
news about a bug fix which went into PHP-5.4, PHP-5.5 and master
|
||||
should be noted in both PHP-5.4/NEWS and PHP-5.5/NEWS but
|
||||
not master, which is not a public released version yet.
|
||||
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
|
||||
@@ -114,9 +107,9 @@ If you fix some bugs, you should note the bug ID numbers in your
|
||||
commit message. Bug ID should be prefixed by "#" for easier access to
|
||||
bug report when developers are browsing CVS via LXR or Bonsai.
|
||||
|
||||
Example:
|
||||
Example::
|
||||
|
||||
Fixed bug #14016 (pgsql notice handler double free crash bug.)
|
||||
Fixed bug #14016 (pgsql notice handler double free crash bug.)
|
||||
|
||||
When you change the NEWS file for a bug fix, then please keep the bugs
|
||||
sorted in decreasing order under the fixed version.
|
||||
|
||||
@@ -34,7 +34,7 @@ API adjustment to the old output control code:
|
||||
php_output_handler_started(handler_name, handler_name_len TSRMLS_CC);
|
||||
|
||||
Flushing one output buffer:
|
||||
// php_end_ob_buffer(1, 1 TSRMLS_CC);
|
||||
// php_ob_end_buffer(1, 1 TSRMLS_CC);
|
||||
php_output_flush(TSRMLS_C);
|
||||
|
||||
Flushing all output buffers:
|
||||
|
||||
@@ -28,29 +28,18 @@ Both functions return SUCCESS or FAILURE depending on the result.
|
||||
The auto-conversions are performed as necessary. Arrays, objects, and
|
||||
resources cannot be auto-converted.
|
||||
|
||||
PHP 5.5 includes a new function:
|
||||
|
||||
int zend_parse_parameter(int flags, int arg_num TSRMLS_DC, zval **arg, const char *spec, ...);
|
||||
|
||||
This function behaves like zend_parse_parameters_ex() except that instead of
|
||||
reading the arguments from the stack, it receives a single zval to convert
|
||||
(passed with double indirection). The passed zval may be changed in place as
|
||||
part of the conversion process.
|
||||
|
||||
See also https://wiki.php.net/rfc/zpp_improv#expose_zend_parse_arg_as_zend_parse_parameter
|
||||
|
||||
|
||||
Type specifiers
|
||||
---------------
|
||||
The following list shows the type specifier, its meaning and the parameter
|
||||
types that need to be passed by address. All passed parameters are set
|
||||
types that need to be passed by address. All passed paramaters are set
|
||||
if the PHP parameter is non optional and untouched if optional and the
|
||||
parameter is not present. The only exception is O where the zend_class_entry*
|
||||
has to be provided on input and is used to verify the PHP parameter is an
|
||||
instance of that class.
|
||||
|
||||
a - array (zval*)
|
||||
A - array or object (zval*)
|
||||
A - array or object (zval *)
|
||||
b - boolean (zend_bool)
|
||||
C - class (zend_class_entry*)
|
||||
d - double (double)
|
||||
@@ -58,16 +47,15 @@ Type specifiers
|
||||
zend_fcall_info and zend_fcall_info_cache)
|
||||
h - array (returned as HashTable*)
|
||||
H - array or HASH_OF(object) (returned as HashTable*)
|
||||
l - long (zend_long)
|
||||
L - long, limits out-of-range numbers to LONG_MAX/LONG_MIN (zend_long, ZEND_LONG_MAX/ZEND_LONG_MIN)
|
||||
l - long (long)
|
||||
L - long, limits out-of-range numbers to LONG_MAX/LONG_MIN (long)
|
||||
o - object of any type (zval*)
|
||||
O - object of specific type given by class entry (zval*, zend_class_entry)
|
||||
p - valid path (string without null bytes in the middle) and its length (char*, size_t)
|
||||
P - valid path (string without null bytes in the middle) as zend_string (zend_string)
|
||||
p - valid path (string without null bytes in the middle) and its length (char*, int)
|
||||
r - resource (zval*)
|
||||
s - string (with possible null bytes) and its length (char*, size_t)
|
||||
S - string (with possible null bytes) as zend_string (zend_string)
|
||||
s - string (with possible null bytes) and its length (char*, int)
|
||||
z - the actual zval (zval*)
|
||||
Z - the actual zval (zval**)
|
||||
* - variable arguments list (0 or more)
|
||||
+ - variable arguments list (1 or more)
|
||||
|
||||
@@ -77,30 +65,28 @@ Type specifiers
|
||||
will not be touched by the parsing function if they are not
|
||||
passed to it.
|
||||
/ - use SEPARATE_ZVAL_IF_NOT_REF() on the parameter it follows
|
||||
! - the parameter it follows can be of specified type or NULL. If NULL is
|
||||
passed and the output for such type is a pointer, then the output
|
||||
pointer is set to a native NULL pointer.
|
||||
For 'b', 'l' and 'd', an extra argument of type zend_bool* must be
|
||||
passed after the corresponding bool*, zend_long* or double* arguments,
|
||||
respectively. A non-zero value will be written to the zend_bool if a
|
||||
PHP NULL is passed.
|
||||
! - the parameter it follows can be of specified type or NULL (applies
|
||||
to all specifiers except for 'b', 'l', and 'd'). If NULL is passed, the
|
||||
results pointer is set to NULL as well.
|
||||
|
||||
|
||||
Note on 64bit compatibility
|
||||
---------------------------
|
||||
Please note that since version 7 PHP uses zend_long as integer type and
|
||||
zend_string with size_t as length, so make sure you pass zend_longs to "l"
|
||||
and size_t to strings length (i.e. for "s" you need to pass char * and size_t),
|
||||
Please do not forget that int and long are two different things on 64bit
|
||||
OSes (int is 4 bytes and long is 8 bytes), so make sure you pass longs to "l"
|
||||
and ints to strings length (i.e. for "s" you need to pass char * and int),
|
||||
not the other way round!
|
||||
Remember: "l" is the only case when you need to pass long (and that's why
|
||||
it's "l", not "i" btw).
|
||||
|
||||
Both mistakes might cause memory corruptions and segfaults:
|
||||
Both mistakes cause memory corruptions and segfaults on 64bit OSes:
|
||||
1)
|
||||
char *str;
|
||||
long str_len; /* XXX THIS IS WRONG!! Use size_t instead. */
|
||||
long str_len; /* XXX THIS IS WRONG!! Use int instead. */
|
||||
zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &str, &str_len)
|
||||
|
||||
2)
|
||||
int num; /* XXX THIS IS WRONG!! Use zend_long instead. */
|
||||
int num; /* XXX THIS IS WRONG!! Use long instead. */
|
||||
zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &num)
|
||||
|
||||
If you're in doubt, use check_parameters.php script to the parameters
|
||||
@@ -112,9 +98,9 @@ and their types (it can be found in ./scripts/dev/ directory of PHP sources):
|
||||
Examples
|
||||
--------
|
||||
/* Gets a long, a string and its length, and a zval */
|
||||
zend_long l;
|
||||
long l;
|
||||
char *s;
|
||||
size_t s_len;
|
||||
int s_len;
|
||||
zval *param;
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lsz",
|
||||
&l, &s, &s_len, ¶m) == FAILURE) {
|
||||
@@ -150,16 +136,16 @@ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a/!",
|
||||
}
|
||||
|
||||
/* Get either a set of 3 longs or a string. */
|
||||
zend_long l1, l2, l3;
|
||||
long l1, l2, l3;
|
||||
char *s;
|
||||
/*
|
||||
* The function expects a pointer to a size_t in this case, not a long
|
||||
* The function expects a pointer to a integer in this case, not a long
|
||||
* or any other type. If you specify a type which is larger
|
||||
* than a 'size_t', the upper bits might not be initialized
|
||||
* than a 'int', the upper bits might not be initialized
|
||||
* properly, leading to random crashes on platforms like
|
||||
* Tru64 or Linux/Alpha.
|
||||
*/
|
||||
size_t length;
|
||||
int length;
|
||||
|
||||
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC,
|
||||
"lll", &l1, &l2, &l3) == SUCCESS) {
|
||||
@@ -177,7 +163,7 @@ if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC,
|
||||
/* Function that accepts only varargs (0 or more) */
|
||||
|
||||
int i, num_varargs;
|
||||
zval *varargs = NULL;
|
||||
zval ***varargs = NULL;
|
||||
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "*", &varargs, &num_varargs) == FAILURE) {
|
||||
@@ -196,9 +182,9 @@ if (varargs) {
|
||||
/* Function that accepts a string, followed by varargs (1 or more) */
|
||||
|
||||
char *str;
|
||||
size_t str_len;
|
||||
int str_len;
|
||||
int i, num_varargs;
|
||||
zval *varargs = NULL;
|
||||
zval ***varargs = NULL;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s+", &str, &str_len, &varargs, &num_varargs) == FAILURE) {
|
||||
return;
|
||||
@@ -208,11 +194,16 @@ for (i = 0; i < num_varargs; i++) {
|
||||
/* do something with varargs[i] */
|
||||
}
|
||||
|
||||
if (varargs) {
|
||||
efree(varargs);
|
||||
}
|
||||
|
||||
|
||||
/* Function that takes an array, followed by varargs, and ending with a long */
|
||||
zend_long num;
|
||||
long num;
|
||||
zval *array;
|
||||
int i, num_varargs;
|
||||
zval *varargs = NULL;
|
||||
zval ***varargs = NULL;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a*l", &array, &varargs, &num_varargs, &num) == FAILURE) {
|
||||
return;
|
||||
@@ -221,3 +212,8 @@ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a*l", &array, &varargs, &n
|
||||
for (i = 0; i < num_varargs; i++) {
|
||||
/* do something with varargs[i] */
|
||||
}
|
||||
|
||||
if (varargs) {
|
||||
efree(varargs);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,155 @@
|
||||
1. strrpos() and strripos() now use the entire string as a needle. Be aware
|
||||
that the existing scripts may no longer work as you expect.
|
||||
|
||||
EX :
|
||||
<?php
|
||||
var_dump(strrpos("ABCDEF","DEF"));
|
||||
var_dump(strrpos("ABCDEF","DAF"));
|
||||
?>
|
||||
|
||||
Will give you different results. The former returns 3 while the latter
|
||||
returns false rather than the position of the last occurrence of 'D'.
|
||||
The same applies to strripos().
|
||||
|
||||
2. Illegal use of string offsets causes E_ERROR instead of E_WARNING.
|
||||
|
||||
EX :
|
||||
<?php
|
||||
$a = "foo";
|
||||
unset($a[0][1][2]);
|
||||
?>
|
||||
|
||||
Fatal error: Cannot use string offset as an array in ... on line 1
|
||||
|
||||
3. array_merge() was changed to accept only arrays. If a non-array variable is
|
||||
passed, a E_WARNING will be thrown for every such parameter. Be careful
|
||||
because your code may start emitting E_WARNING out of the blue.
|
||||
|
||||
4. Be careful when porting from ext/mysql to ext/mysqli. The following
|
||||
functions return NULL when no more data is available in the result set
|
||||
(ext/mysql's functions return FALSE).
|
||||
|
||||
- mysqli_fetch_row()
|
||||
- mysqli_fetch_array()
|
||||
- mysqli_fetch_assoc()
|
||||
|
||||
5. PATH_TRANSLATED server variable is no longer set implicitly under
|
||||
Apache2 SAPI in contrast to the situation in PHP 4, where it is set to the
|
||||
same value as the SCRIPT_FILENAME server variable when it is not populated
|
||||
by Apache. This change was made to comply with the CGI specification.
|
||||
Please refer to bug #23610 for further information.
|
||||
|
||||
6. Starting PHP 5.0.0 the T_ML_CONSTANT constant is no longer defined by the
|
||||
ext/tokenizer extension. If error_reporting is set to E_ALL notices will
|
||||
be produced. Instead of T_ML_CONSTANT for /* */ the T_COMMENT constant
|
||||
is used, thus both // and /* */ are resolved as the T_COMMENT constant.
|
||||
However the PHPDoc style comments /** */ ,which starting PHP 5 are parsed
|
||||
by PHP, are recongnized as T_DOC_COMMENT.
|
||||
|
||||
7. $_SERVER should be populated with argc and argv if variables_order
|
||||
includes "S". If you have specifically configured your system to not
|
||||
create $_SERVER, then of course it shouldn't be there. The change was to
|
||||
always make argc and argv available in the CLI version regardless of the
|
||||
variables_order setting. As in, the CLI version will now always populate
|
||||
the global $argc and $argv variables.
|
||||
|
||||
8. In some cases classes must be declared before used. It only happens only
|
||||
if some of the new features of PHP 5 are used. Otherwise the behaviour is
|
||||
the old.
|
||||
Example 1 (works with no errors):
|
||||
<?php
|
||||
$a = new a();
|
||||
class a {
|
||||
}
|
||||
?>
|
||||
|
||||
Example 2 (throws an error):
|
||||
<?php
|
||||
$a = new a();
|
||||
interface b{
|
||||
}
|
||||
class a implements b {
|
||||
}
|
||||
?>
|
||||
|
||||
Output (example 2) :
|
||||
Fatal error: Class 'a' not found in /tmp/cl.php on line 2
|
||||
|
||||
9. get_class() starting PHP 5 returns the name of the class as it was
|
||||
declared which may lead to problems in older scripts that rely on
|
||||
the previous behaviour - the class name is lowercased. Expect the
|
||||
same behaviour from get_parent_class() when applicable.
|
||||
Example :
|
||||
<?php
|
||||
class FooBar {
|
||||
}
|
||||
class ExtFooBar extends FooBar{}
|
||||
$a = new FooBar();
|
||||
var_dump(get_class($a), get_parent_class($a));
|
||||
?>
|
||||
|
||||
Output (PHP 4):
|
||||
string(6) "foobar"
|
||||
string(9) "extfoobar"
|
||||
|
||||
Output (PHP 5):
|
||||
string(6) "FooBar"
|
||||
string(9) "ExtFooBar"
|
||||
----------------------------------------------------------------------
|
||||
Example code that will break :
|
||||
//....
|
||||
function someMethod($p) {
|
||||
if (get_class($p) != 'helpingclass') {
|
||||
return FALSE;
|
||||
}
|
||||
//...
|
||||
}
|
||||
//...
|
||||
Possible solution is to search for get_class() and get_parent_class() in
|
||||
all your scripts and use strtolower().
|
||||
|
||||
10. get_class_methods() returns the names of the methods of a class as they
|
||||
declared. In PHP4 the names are all lowercased.
|
||||
Example code :
|
||||
<?php
|
||||
class Foo{
|
||||
function doFoo(){}
|
||||
function hasFoo(){}
|
||||
}
|
||||
var_dump(get_class_methods("Foo"));
|
||||
?>
|
||||
Output (PHP4):
|
||||
array(2) {
|
||||
[0]=>
|
||||
string(5) "dofoo"
|
||||
[1]=>
|
||||
string(6) "hasfoo"
|
||||
}
|
||||
Output (PHP5):
|
||||
array(2) {
|
||||
[0]=>
|
||||
string(5) "doFoo"
|
||||
[1]=>
|
||||
string(6) "hasFoo"
|
||||
}
|
||||
|
||||
11. Assignment $this is impossible. Starting PHP 5.0.0 $this has special
|
||||
meaning in class methods and is recognized by the PHP parser. The latter
|
||||
will generate a parse error when assignment to $this is found
|
||||
Example code :
|
||||
<?php
|
||||
class Foo {
|
||||
function assignNew($obj) {
|
||||
$this = $obj;
|
||||
}
|
||||
}
|
||||
$a = new Foo();
|
||||
$b = new Foo();
|
||||
$a->assignNew($b);
|
||||
echo "I was executed\n";
|
||||
?>
|
||||
Output (PHP 4):
|
||||
I was executed
|
||||
Output (PHP 5):
|
||||
PHP Fatal error: Cannot re-assign $this in /tmp/this_ex.php on line 4
|
||||
|
||||
+78
-122
@@ -8,30 +8,19 @@ General notes and tips
|
||||
1. Do not release on Fridays, Saturdays or Sundays
|
||||
because the sysadmins can not upgrade stuff then.
|
||||
|
||||
2. Package two days before a release. So if the release is to be on Thursday,
|
||||
package on Tuesday. Think about timezones as well.
|
||||
2. Package the day before a release. So if the release is to be on Thursday,
|
||||
package on Wednesday.
|
||||
|
||||
3. Ensure that the tests on Travis CI are green.
|
||||
See: https://travis-ci.org/php/php-src/builds
|
||||
It is recommended to do so a couple of days before the packaging day, to
|
||||
have enough time to investigate failures, communicate with the authors and
|
||||
commit the fixes.
|
||||
The RM for the branch is also responsible for keeping the CI green on
|
||||
ongoing bases between the releases. Check the CI status for your branch
|
||||
periodically and resolve the failures ASAP. See more in:
|
||||
https://wiki.php.net/rfc/travis_ci
|
||||
3. Ensure that Windows builds will work before packaging
|
||||
|
||||
4. Ensure that Windows builds will work before packaging
|
||||
4. Follow all steps to the letter. When unclear ask previous RM's (Derick/Ilia)
|
||||
before proceeding. Ideally make sure that for the first releases one of the
|
||||
previous RM's is around to answer questions. For the steps related to the
|
||||
php/QA/bug websites try to have someone from the webmaster team (Bjori) on hand.
|
||||
|
||||
5. Follow all steps to the letter. When unclear ask previous RM's (David/Julien/
|
||||
Johannes/Stas/Derick/Ilia) before proceeding. Ideally make sure that for the
|
||||
first releases one of the previous RM's is around to answer questions. For the
|
||||
steps related to the 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. Verify the tags to be extra sure everything was tagged properly.
|
||||
|
||||
7. Moving extensions from/to PECL requires write acces to the destination.
|
||||
6. Moving extensions from/to PECL requires write acces to the destination.
|
||||
Most developers should have this.
|
||||
|
||||
Moving extensions from php-src to PECL
|
||||
@@ -58,49 +47,33 @@ Rolling a non stable release (alpha/beta/RC)
|
||||
|
||||
1. Check windows snapshot builder logs (http://windows.php.net/downloads/snaps/ the last revision)
|
||||
|
||||
2. Check the tests at https://travis-ci.org/php/php-src/builds
|
||||
|
||||
3. run the "scripts/dev/credits" script in php-src and commit the changes in the
|
||||
2. run the "scripts/dev/credits" script in php-src and commit the changes in the
|
||||
credits files in ext/standard.
|
||||
|
||||
4. Checkout the release branch for this release (e.g., PHP-5.4.2) from the main branch.
|
||||
3. Checkout the release branch for this release (e.g., PHP-5.4.2).
|
||||
|
||||
5. Bump the version numbers in ``main/php_version.h``, ``configure.in`` and possibly ``NEWS``.
|
||||
Do not use abbreviations for alpha and beta. Do not use dashes, you should
|
||||
``#define PHP_VERSION "5.4.22RC1"`` and not ``#define PHP_VERSION "5.4.22-RC1"``
|
||||
4. Bump the version numbers in ``main/php_version.h``, ``configure.in`` and possibly ``NEWS``.
|
||||
Do not use abbreviations for alpha and beta.
|
||||
|
||||
6. Compile and make test, with and without ZTS, using the right Bison version
|
||||
(for example, for 5.5, Bison 2.4.1 is used)
|
||||
5. Commit these changes to the branch with ``git commit -a``.
|
||||
|
||||
7. Check ./sapi/cli/php -v output for version matching.
|
||||
|
||||
8. If all is right, commit the changes to the release branch with ``git commit -a``.
|
||||
|
||||
9. Tag the repository release branch with the version, e.g.:
|
||||
6. Tag the repository with the version, e.g.:
|
||||
``git tag -u YOURKEYID php-5.4.2RC2``
|
||||
|
||||
10. Bump the version numbers in ``main/php_version.h``, ``configure.in`` and ``NEWS``
|
||||
in the *main* branch (PHP-5.4 for example) to prepare for the **next** version.
|
||||
F.e. if the RC is "5.4.1RC1" then the new one should be "5.4.2-dev" - regardless if we get
|
||||
a new RC or not. This is to make sure ``version_compare()`` can correctly work.
|
||||
Commit the changes to the main branch.
|
||||
|
||||
11. Push the changes to the main repo, the tag, the main branch and the release branch :
|
||||
7. Push the changes to the main repo:
|
||||
``git push --tags origin HEAD``
|
||||
``git push origin {main branch}``
|
||||
``git push origin {release branch}``
|
||||
|
||||
12. run: ``PHPROOT=. ./makedist 5.4.2RC2``, this will export the tree, create configure
|
||||
and build three tarballs (gz, bz2 and xz).
|
||||
8. run: ``./makedist 5.4.2RC2``, this will export the tree, create configure
|
||||
and build two tarballs (one gz and one bz2).
|
||||
|
||||
13. Copy those tarballs (scp, rsync) to downloads.php.net, in your homedir there should be a
|
||||
9. Copy those two tarballs to www.php.net, in your homedir there should be a
|
||||
directory "downloads/". Copy them into there, so that the system can generate
|
||||
MD5 sums. If you do not have this directory, talk to Derick or Dan.
|
||||
MD5 sums. If you do not have this directory, talk to Derick.
|
||||
|
||||
14. Now the RC can be found on http://downloads.php.net/yourname,
|
||||
10. Now the RC can be found on http://downloads.php.net/yourname,
|
||||
f.e. http://downloads.php.net/derick/
|
||||
|
||||
15. Once the release has been tagged, contact the PHP Windows development team
|
||||
11. 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 placed into the same directory as the source snapshots.
|
||||
|
||||
@@ -113,10 +86,10 @@ pointing out "the location of the release" and "the possible release date of
|
||||
either the next RC, or the final release".
|
||||
|
||||
2. Send an email (see example here http://news.php.net/php.pear.qa/5201) **To**
|
||||
``php-qa@lists.php.net`` and ``primary-qa-tester@lists.php.net``.
|
||||
``php-qa@lists.php.net`` and ``primary-qa-tests@lists.php.net``.
|
||||
This email is to notify the selected projects about a new release so that they
|
||||
can make sure their projects keep working. Make sure that you have been setup
|
||||
as a moderator for ``primary-qa-tester@lists.php.net`` by having someone (Hannes, Dan,
|
||||
as a moderator for ``primary-qa-tests@lists.php.net`` by having someone (Wez,
|
||||
Derick) run the following commands for you:
|
||||
|
||||
``ssh lists.php.net``
|
||||
@@ -132,9 +105,9 @@ Derick) run the following commands for you:
|
||||
|
||||
Note: Remember to update the MD5 checksum information.
|
||||
|
||||
4. Update ``web/php.git/include/version.inc`` (x=major version number)
|
||||
4. Update ``php.git/include/version.inc`` (x=major version number)
|
||||
|
||||
a. ``$PHP_x_RC`` = "5.4.0RC1" (should be set to "false" before)
|
||||
a. ``$PHP_x_RC`` = "5.4.0RC1"
|
||||
|
||||
b. ``$PHP_x_RC_DATE`` = "06 September 2007"
|
||||
|
||||
@@ -145,62 +118,59 @@ Derick) run the following commands for you:
|
||||
6. 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
|
||||
------------------------
|
||||
|
||||
1. Checkout your release branch, you should have created when releasing previous RC
|
||||
and bump the version numbers in ``main/php_version.h``, ``configure.in`` and possibly ``NEWS``.
|
||||
1. Check windows snapshot builder logs (http://snaps.php.net/win32/snapshot-STABLE.log f.e.)
|
||||
|
||||
2. If a CVE commit needs to be merged to the release, then have it committed to
|
||||
the base branches and merged upwards as usual (f.e commit the CVE fix to 5.3,
|
||||
merge to 5.4, 5.5 etc...). Then you can cherry-pick it in your release branch.
|
||||
Don't forget to update NEWS manually in an extra commit then.
|
||||
2. Bump the version numbers in ``main/php_version.h``, ``configure.in`` and possibly ``NEWS``.
|
||||
|
||||
3. Commit those changes. Ensure the tests at https://travis-ci.org/php/php-src/builds are
|
||||
still passing.
|
||||
3. **Merge** all related sections in NEWS (f.e. merge the 5.4.1RC1 and 5.4.0 sections)
|
||||
|
||||
4. run the "scripts/dev/credits" script in php-src and commit the changes in the
|
||||
4. Commit those changes
|
||||
|
||||
5. run the "scripts/dev/credits" script in php-src and commit the changes in the
|
||||
credits files in ext/standard.
|
||||
|
||||
5. Compile and make test, with and without ZTS, using the right Bison version
|
||||
(for example, for 5.5, Bison 2.4.1 is used)
|
||||
6. tag the repository with the version f.e. "``git tag -s php-5.4.1``"
|
||||
(of course, you need to change that to the version you're rolling an RC for).
|
||||
When making 5.X release, you need to tag the Zend directory separately!!
|
||||
|
||||
6. Check ./sapi/cli/php -v output for version matching.
|
||||
7. 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 candidate
|
||||
was "5.4.1RC1" then the new one should be "5.4.1RC2-dev" - regardless if we get
|
||||
a new RC or not. This is to make sure ``version_compare()`` can correctly work.
|
||||
|
||||
7. tag the repository with the version f.e. "``git tag -u YOURKEYID -s php-5.4.1``"
|
||||
8. Commit those changes
|
||||
|
||||
8. Push the tag f.e. "``git push origin php-5.4.1``"
|
||||
9. Log in onto the snaps box and go into the correct tree (f.e. the PHP-5.4
|
||||
branch if you're rolling 5.5.x releases).
|
||||
|
||||
9. run: ``PHPROOT=. ./makedist php 5.4.1``, this will export the tag, create configure
|
||||
and build three tarballs (gz, bz2 and xz).
|
||||
Check if the pear files are updated (phar).
|
||||
10. You do not have to update the tree, but of course you can with "``git pull
|
||||
origin <branch>``".
|
||||
|
||||
10. Generate the GPG signature files for the archives.
|
||||
``gpg -u YOUREMAIL --armor --detach-sign php-X.Y.Z.tar.xxx``
|
||||
11. run: ``./makedist php 5.4.1``, this will export the tree, create configure
|
||||
and build two tarballs (one gz and one bz2).
|
||||
|
||||
11. Commit and push all the tarballs and signature files to web/php-distributions.git,
|
||||
then update the git submodule reference in web/php.git:
|
||||
``git submodule init;
|
||||
git submodule update;
|
||||
cd distributions;
|
||||
git pull origin master;
|
||||
cd ..;
|
||||
git commit distributions;
|
||||
git push;``
|
||||
This is to fetch the last commit id from php-distributions.git and commit this
|
||||
last commit id to web/php.git, then, mirrors will now sync
|
||||
12. Commit those two tarballs to Git (php-distributions.git)
|
||||
|
||||
12. Once the release has been tagged, contact the PHP Windows development team
|
||||
(internals-win@lists.php.net) so that Windows binaries can be created.
|
||||
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.
|
||||
|
||||
14. Check if the pear files are updated (phar for 5.1+ or run pear/make-pear-bundle.php with 4.4)
|
||||
|
||||
15. When making a final release, also remind the PHP Windows development team
|
||||
(internals-win@lists.php.net) to prepare the installer packages for Win32.
|
||||
|
||||
Getting the stable release announced
|
||||
------------------------------------
|
||||
|
||||
1. Update phpweb/include/releases.inc with the old release info
|
||||
(updates the download archives)
|
||||
1. Run the bumpRelease script for phpweb on your local checkout
|
||||
|
||||
a. You can run ``php bin/bumpRelease 5`` if you are making a release for the
|
||||
highest branch, otherwise you have to do this manually, see point 1.b
|
||||
a. ``php bin/bumpRelease 5`` (or ``php bin/bumpRelease 4`` for PHP4)
|
||||
|
||||
b. In case multiple PHP minor versions are in active development you have
|
||||
to manually copy the old information to include/releases.inc
|
||||
@@ -213,23 +183,14 @@ Getting the stable release announced
|
||||
|
||||
c. ``$PHP_X_MD5`` array and update all the md5 sums
|
||||
|
||||
d. ``$PHP_X_SHA256`` array and update all the SHA256 sums
|
||||
d. set ``$PHP_X_RC`` to false!
|
||||
|
||||
e. set ``$PHP_X_RC`` to false!
|
||||
|
||||
f. Make sure there are no outdated "notes" or edited "date" keys in the
|
||||
e. Make sure there are no outdated "notes" or edited "date" keys in the
|
||||
``$RELEASES[X][$PHP_X_VERSION]["source"]`` array
|
||||
|
||||
g. if the windows builds aren't ready yet prefix the "windows" key with a dot (".windows")
|
||||
f. if the windows builds aren't ready yet prefix the "windows" key with a dot (".windows")
|
||||
|
||||
3. Create the release file (releases/x_y_z.php)
|
||||
Usually we use the same content as for point 6, but included in php template
|
||||
instead of the release xml.
|
||||
|
||||
4. Update php-qa/include/release-qa.php and add the next version as an QARELEASE
|
||||
(prepare for next RC)
|
||||
|
||||
5. Update the ChangeLog file for the given major version
|
||||
3. Update the ChangeLog file for the given major version
|
||||
f.e. ``ChangeLog-5.php`` from the NEWS file
|
||||
|
||||
a. go over the list and put every element on one line
|
||||
@@ -249,10 +210,19 @@ f.e. ``ChangeLog-5.php`` from the NEWS file
|
||||
IV. ``s/Fixed PECL bug #\([0-9]\+\)/<?php peclbugfix(\1); ?>/``
|
||||
|
||||
V. ``s/FR #\([0-9]\+\)/FR <?php bugl(\1); ?>/``
|
||||
|
||||
e. You may want to try php-web/bin/news2html to automate this task
|
||||
|
||||
6. Add a short notice to phpweb stating that there is a new release, and
|
||||
4. ``cp releases/5_4_0.php releases/5_4_1.php``
|
||||
|
||||
5. ``git add releases/5_4_1.php``
|
||||
|
||||
6. Update the ``releases/*.php`` file with relevant data. The release
|
||||
announcement file should list in detail:
|
||||
|
||||
a. security fixes,
|
||||
|
||||
b. changes in behavior (whether due to a bug fix or not)
|
||||
|
||||
7. Add a short notice to phpweb stating that there is a new release, and
|
||||
highlight the major important things (security fixes) and when it is important
|
||||
to upgrade.
|
||||
|
||||
@@ -260,20 +230,11 @@ to upgrade.
|
||||
|
||||
b. Add the content for the news entry
|
||||
|
||||
7. **Check mirrors have been synced before announcing or pushing news**
|
||||
Try, f.e. http://www.php.net/get/php-5.5.1.tar.bz2/from/a/mirror
|
||||
Try several mirrors, mirrors may update slowly (may take an hour)
|
||||
8. Commit all the changes.
|
||||
|
||||
8. Commit all the changes to their respective git repos
|
||||
|
||||
9. Please note down the sha256 and the PGP signature (.asc). These *must* be
|
||||
included in the release mail.
|
||||
10. Wait an hour or two, then send a mail to php-announce@lists.php.net,
|
||||
9. Wait an hour or two, then send a mail to php-announce@lists.php.net,
|
||||
php-general@lists.php.net and internals@lists.php.net with a text similar to
|
||||
http://news.php.net/php.internals/17222.
|
||||
Please make sure that the mail to php-announce@ is its own completely seperate email.
|
||||
This is to make sure that repiles to the announcement on php-general@ or internals@
|
||||
will not accidentally hit the php-announce@ mailinglist.
|
||||
|
||||
Re-releasing the same version (or -pl)
|
||||
--------------------------------------
|
||||
@@ -290,9 +251,7 @@ Re-releasing the same version (or -pl)
|
||||
|
||||
d. ``$PHP_X_MD5`` array and update all the md5 sums
|
||||
|
||||
e. ``$PHP_X_SHA256`` array and update all the SHA256 sums
|
||||
|
||||
f. Make sure there are no outdated "notes" or edited "date" keys in the
|
||||
e. Make sure there are no outdated "notes" or edited "date" keys in the
|
||||
``$RELEASES[X][$PHP_X_VERSION]["source"]`` array
|
||||
|
||||
3. Add a short notice to phpweb stating that there is a new release, and
|
||||
@@ -309,6 +268,3 @@ to upgrade.
|
||||
5. Wait an hour or two, then send a mail to php-announce@lists.php.net,
|
||||
php-general@lists.php.net and internals@lists.php.net with a text similar to
|
||||
the news entry.
|
||||
Please make sure that the mail to php-announce@ is its own completely seperate email.
|
||||
This is to make sure that repiles to the announcement on php-general@ or internals@
|
||||
will not accidentally hit the php-announce@ mailinglist.
|
||||
@@ -153,18 +153,3 @@ ADDING SHARED MODULE SUPPORT TO A MODULE
|
||||
#ifdef COMPILE_DL_FOO
|
||||
ZEND_GET_MODULE(foo)
|
||||
#endif
|
||||
|
||||
PECL SITE CONFORMITY
|
||||
|
||||
If you plan to release an extension to the PECL website, there are several
|
||||
points to be regarded.
|
||||
|
||||
1. Add LICENSE or COPYING to the package.xml
|
||||
|
||||
2. The following should be defined in one of the extension header files
|
||||
|
||||
#define PHP_FOO_VERSION "1.2.3"
|
||||
|
||||
This macros has to be used within your foo_module_entry to indicate the
|
||||
extension version.
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ Opening Streams
|
||||
===============
|
||||
In most cases, you should use this API:
|
||||
|
||||
PHPAPI php_stream *php_stream_open_wrapper(const char *path, const char *mode,
|
||||
PHPAPI php_stream *php_stream_open_wrapper(char *path, char *mode,
|
||||
int options, char **opened_path TSRMLS_DC);
|
||||
|
||||
Where:
|
||||
|
||||
+20
-32
@@ -5,7 +5,7 @@ This document describes how to submit an enhancement or patch for PHP.
|
||||
It's easy!
|
||||
|
||||
You don't need any login accounts or special access to download,
|
||||
build, debug and begin submitting PHP or PECL code, tests or
|
||||
build, debug and begin submitting PHP, PECL or PEAR code, tests or
|
||||
documentation. Once you've followed this README and had several
|
||||
patches accepted, commit privileges are often quickly granted.
|
||||
|
||||
@@ -16,8 +16,8 @@ http://phpadvent.org/2008/less-whining-more-coding-by-elizabeth-smith
|
||||
Online Forums
|
||||
-------------
|
||||
There are several IRC channels where PHP developers are often
|
||||
available to discuss questions. They include #php.pecl and #php.doc
|
||||
on the EFNet network and #winphp-dev on FreeNode.
|
||||
available to discuss questions. They include #php.pecl, #php.doc and
|
||||
#pear on the EFNet network and #php-dev-win on FreeNode.
|
||||
|
||||
|
||||
PHP Patches
|
||||
@@ -33,27 +33,16 @@ and discuss it on the development mail list internals@lists.php.net.
|
||||
RFC Wiki accounts can be requested on
|
||||
http://wiki.php.net/start?do=register. PHP extension maintainers can
|
||||
be found in the EXTENSIONS file in the PHP source. Mail list
|
||||
subscription is explained on http://php.net/mailing-lists.php.
|
||||
subscription is explained on http://www.php.net/mailing-lists.php.
|
||||
|
||||
Information on PHP internal C functions is at
|
||||
http://php.net/internals, though this is considered incomplete.
|
||||
Various external resources can be found on the web. See
|
||||
https://wiki.php.net/internals for some references. A standard
|
||||
http://www.php.net/internals, though this is considered incomplete.
|
||||
Various external resources can be found on the web. A standard
|
||||
printed reference is the book "Extending and Embedding PHP" by Sara
|
||||
Golemon.
|
||||
|
||||
The preferred way to propose PHP patch is sending pull request from
|
||||
GitHub: https://github.com/php/php-src
|
||||
|
||||
Fork the official PHP repository and send a pull request. A
|
||||
notification will be sent to the pull request mailing list. Sending a
|
||||
note to PHP Internals list (internals@lists.php.net) may help getting
|
||||
more feedback and quicker turnaround. You can also add pull requests
|
||||
to bug reports at http://bugs.php.net/.
|
||||
|
||||
If you are not using GitHub, attach your patch to a PHP bug and
|
||||
consider sending a notification email about the change to
|
||||
internals@lists.php.net. If the bug is for an extension, also CC the
|
||||
Attach the patch to the PHP bug and consider sending a notification
|
||||
email about the change to internals@lists.php.net. Also CC the
|
||||
extension maintainer. Explain what has been changed by your patch.
|
||||
Test scripts should be included.
|
||||
|
||||
@@ -62,7 +51,6 @@ ensure it has a file extension of ".txt". This is because only MIME
|
||||
attachments of type 'text/*' are accepted.
|
||||
|
||||
|
||||
|
||||
PHP Documentation Patches
|
||||
-------------------------
|
||||
If you are fixing incorrect PHP documentation first create a bug or
|
||||
@@ -72,7 +60,7 @@ the PHP mail archives.
|
||||
|
||||
If your change is large, then first discuss it with the mail list
|
||||
phpdoc@lists.php.net. Subscription is explained on
|
||||
http://php.net/mailing-lists.php.
|
||||
http://www.php.net/mailing-lists.php.
|
||||
|
||||
Information on contributing to PHP documentation is at
|
||||
http://php.net/dochowto and http://wiki.php.net/doc/howto
|
||||
@@ -90,7 +78,7 @@ of type 'text/*' are accepted.
|
||||
PECL Extension Patches: http://pecl.php.net/
|
||||
--------------------------------------------
|
||||
If you are fixing broken functionality in a PECL extension then create
|
||||
a bug or identify an existing bug at http://bugs.php.net/. A bug
|
||||
a bug or identify an existing bug at http://pecl.php.net/bugs/. A bug
|
||||
can be used to track the patch progress and prevent your changes
|
||||
getting lost in the PHP mail archives.
|
||||
|
||||
@@ -126,15 +114,15 @@ http://pear.php.net/manual/en/guide-developers.php
|
||||
|
||||
How to create your PHP, PHP Documentation or PECL patch
|
||||
-------------------------------------------------------
|
||||
PHP and most PECL packages use Git for revision control. Some PECL
|
||||
packages use Subversion (SVN) Read http://www.php.net/git.php for help
|
||||
on using Git to get and build PHP source code. We recommend to look
|
||||
at our workflow on https://wiki.php.net/vcs/gitworkflow and our FAQ
|
||||
https://wiki.php.net/vcs/gitfaq.
|
||||
PHP and PECL use Subversion (SVN) for revision control. Read
|
||||
http://www.php.net/svn.php for help on using SVN to get and build PHP
|
||||
source code. We recommend using a Sparse Directory checkout described
|
||||
in http://wiki.php.net/vcs/svnfaq. If you are new to SVN, read
|
||||
http://svnbook.red-bean.com.
|
||||
|
||||
Generally we ask that bug fix patches work on the current stable PHP
|
||||
development branches and on "master". New PHP features only need to
|
||||
work on "master".
|
||||
development branches and on "trunk". New PHP features only need to
|
||||
work on "trunk".
|
||||
|
||||
Read CODING_STANDARDS before you start working.
|
||||
|
||||
@@ -146,7 +134,7 @@ comprehensive.
|
||||
|
||||
After testing is finished, create a patch file using the command:
|
||||
|
||||
git diff > your_patch.txt
|
||||
svn diff > your_patch.txt
|
||||
|
||||
For ease of review and later troubleshooting, submit individual
|
||||
patches for each bug or feature.
|
||||
@@ -154,7 +142,7 @@ patches for each bug or feature.
|
||||
|
||||
Checklist for submitting your PHP or PECL code patch
|
||||
----------------------------------------------------
|
||||
- Update git source just before running your final 'diff' and
|
||||
- Update SVN source just before running your final 'diff' and
|
||||
before testing.
|
||||
- Add in-line comments and/or have external documentation ready.
|
||||
Use only "/* */" style comments, not "//".
|
||||
@@ -187,7 +175,7 @@ about these questions:
|
||||
|
||||
What happens when your PHP or PECL patch is applied
|
||||
---------------------------------------------------
|
||||
Your name will likely be included in the Git commit log. If your
|
||||
Your name will likely be included in the SVN commit log. If your
|
||||
patch affects end users, a brief description and your name might be
|
||||
added to the NEWS file.
|
||||
|
||||
|
||||
+6
-7
@@ -1,8 +1,8 @@
|
||||
[IMPORTANT NOTICE]
|
||||
------------------
|
||||
Failed tests usually indicate a problem with your local system setup
|
||||
Failed tests usualy indicate a problem with your local system setup
|
||||
and not within PHP itself (at least for official PHP release versions).
|
||||
You may decide to automatically submit a test summary to our QA workflow
|
||||
You may decide to automaticaly submit a test summary to our QA workflow
|
||||
at the end of a test run.
|
||||
Please do *not* submit a failed test as a bug or ask for help on why
|
||||
it failed on your system without providing substantial backup information
|
||||
@@ -104,8 +104,7 @@ The php file will be generated always.
|
||||
NOTE: You can set environment variable TEST_PHP_DETAILED to enable
|
||||
detailed test information.
|
||||
|
||||
[Automated Testing]
|
||||
--------------
|
||||
[Automated testing]
|
||||
If you like to keep up to speed, with latest developments and quality
|
||||
assurance, setting the environment variable NO_INTERACTION to 1, will not
|
||||
prompt the tester for any user input.
|
||||
@@ -119,12 +118,12 @@ Example script to be run by cron(1):
|
||||
========== qa-test.sh =============
|
||||
#!/bin/sh
|
||||
|
||||
CO_DIR=$HOME/cvs/php7
|
||||
CO_DIR=$HOME/cvs/php5
|
||||
MYMAIL=qa-test@domain.com
|
||||
TMPDIR=/var/tmp
|
||||
TODAY=`date +"%Y%m%d"`
|
||||
|
||||
# Make sure compilation environment is correct
|
||||
# Make sure compilation enviroment is correct
|
||||
CONFIGURE_OPTS='--disable-all --enable-cli --with-pcre'
|
||||
export MAKE=gmake
|
||||
export CC=gcc
|
||||
@@ -143,7 +142,7 @@ then
|
||||
fi
|
||||
========== end of qa-test.sh =============
|
||||
|
||||
NOTE: The exit status of run-tests.php will be 1 when
|
||||
NOTE: the exit status of run-tests.php will be 1 when
|
||||
REPORT_EXIT_STATUS is set. The result of "make test" may be higher
|
||||
than that. At present, gmake 3.79.1 returns 2, so it is
|
||||
advised to test for non-zero, rather then a specific value.
|
||||
|
||||
+3
-3
@@ -8,7 +8,7 @@ the original run-tests.php script. server-tests is *not* used by
|
||||
'make test'. server-tests was developed to provide support for
|
||||
testing PHP under it's primary environment, HTTP, and can run the
|
||||
PHP tests under any of the SAPI modules that are direct executables,
|
||||
or are accessible via HTTP.
|
||||
or are accessable via HTTP.
|
||||
|
||||
[New features]
|
||||
----------------
|
||||
@@ -95,7 +95,7 @@ include:
|
||||
$filename full native path to file, will become PATH_TRANSLATED
|
||||
$filepath =dirname($filename)
|
||||
$scriptname this is what will become SCRIPT_NAME unless you override it
|
||||
$docroot the equivalent of DOCUMENT_ROOT under Apache
|
||||
$docroot the equivelant of DOCUMENT_ROOT under Apache
|
||||
$cwd the directory that the test is being initiated from
|
||||
$this->conf all server-tests configuration vars
|
||||
$this->env all environment variables that will get passed to the test
|
||||
@@ -105,7 +105,7 @@ include:
|
||||
This section is also eval'd, and is similar in nature to --ENV--. However,
|
||||
this section is used to build the url used in an HTTP request. Valid values
|
||||
to set in this section would include:
|
||||
SCRIPT_NAME The initial part of the request url
|
||||
SCRIPT_NAME The inital part of the request url
|
||||
PATH_INFO The pathinfo part of a request url
|
||||
FRAGMENT The fragment section of a url (after #)
|
||||
QUERY_STRING The query part of a url (after ?)
|
||||
|
||||
@@ -108,7 +108,7 @@ module, program, etc).
|
||||
|
||||
For example for APXS:
|
||||
|
||||
PHP_SELECT_SAPI(apache, shared, sapi_apache.c mod_php7.c php_apache.c)
|
||||
PHP_SELECT_SAPI(apache, shared, sapi_apache.c mod_php5.c php_apache.c)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -181,3 +181,4 @@ PHP_FUNCTION(my_get_raw)
|
||||
RETVAL_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ The PHP Interpreter
|
||||
This is the github mirror of the official PHP repository located at
|
||||
http://git.php.net.
|
||||
|
||||
[](http://travis-ci.org/php/php-src)
|
||||
[](http://travis-ci.org/php/php-src)
|
||||
|
||||
Pull Requests
|
||||
=============
|
||||
@@ -17,7 +17,7 @@ See https://wiki.php.net/rfc and https://wiki.php.net/rfc/voting for more
|
||||
information on the process.
|
||||
|
||||
Bug fixes **do not** require an RFC, but require a bugtracker ticket. Always
|
||||
open a ticket at https://bugs.php.net and reference the bug id using #NNNNNN.
|
||||
open a ticket at http://bugs.php.net and reference the bug id using #NNNNNN.
|
||||
|
||||
Fix #55371: get_magic_quotes_gpc() throws deprecation warning
|
||||
|
||||
@@ -28,12 +28,3 @@ open a ticket at https://bugs.php.net and reference the bug id using #NNNNNN.
|
||||
|
||||
We do not merge pull requests directly on github. All PRs will be
|
||||
pulled and pushed through http://git.php.net.
|
||||
|
||||
|
||||
Guidelines for contributors
|
||||
===========================
|
||||
- [CODING_STANDARDS](/CODING_STANDARDS)
|
||||
- [README.GIT-RULES](/README.GIT-RULES)
|
||||
- [README.MAILINGLIST_RULES](/README.MAILINGLIST_RULES)
|
||||
- [README.RELEASE_PROCESS](/README.RELEASE_PROCESS)
|
||||
|
||||
Regular → Executable
File mode changed.
+1
-1
@@ -1,6 +1,6 @@
|
||||
## process this file with automake to produce Makefile.am
|
||||
AUTOMAKE_OPTIONS=foreign
|
||||
noinst_LTLIBRARIES=libtsrm.la
|
||||
libtsrm_la_SOURCES = TSRM.c tsrm_strtok_r.c
|
||||
libtsrm_la_SOURCES = TSRM.c tsrm_strtok_r.c tsrm_virtual_cwd.c
|
||||
|
||||
depend:
|
||||
+17
-29
@@ -22,10 +22,6 @@
|
||||
|
||||
typedef struct _tsrm_tls_entry tsrm_tls_entry;
|
||||
|
||||
#if defined(TSRM_WIN32)
|
||||
/* TSRMLS_CACHE_DEFINE; is already done in Zend, this is being always compiled statically. */
|
||||
#endif
|
||||
|
||||
struct _tsrm_tls_entry {
|
||||
void **storage;
|
||||
int count;
|
||||
@@ -181,7 +177,7 @@ TSRM_API void tsrm_shutdown(void)
|
||||
for (j=0; j<p->count; j++) {
|
||||
if (p->storage[j]) {
|
||||
if (resource_types_table && !resource_types_table[j].done && resource_types_table[j].dtor) {
|
||||
resource_types_table[j].dtor(p->storage[j]);
|
||||
resource_types_table[j].dtor(p->storage[j], &p->storage);
|
||||
}
|
||||
free(p->storage[j]);
|
||||
}
|
||||
@@ -256,7 +252,7 @@ TSRM_API ts_rsrc_id ts_allocate_id(ts_rsrc_id *rsrc_id, size_t size, ts_allocate
|
||||
for (j=p->count; j<id_count; j++) {
|
||||
p->storage[j] = (void *) malloc(resource_types_table[j].size);
|
||||
if (resource_types_table[j].ctor) {
|
||||
resource_types_table[j].ctor(p->storage[j]);
|
||||
resource_types_table[j].ctor(p->storage[j], &p->storage);
|
||||
}
|
||||
}
|
||||
p->count = id_count;
|
||||
@@ -277,10 +273,7 @@ static void allocate_new_resource(tsrm_tls_entry **thread_resources_ptr, THREAD_
|
||||
|
||||
TSRM_ERROR((TSRM_ERROR_LEVEL_CORE, "Creating data structures for thread %x", thread_id));
|
||||
(*thread_resources_ptr) = (tsrm_tls_entry *) malloc(sizeof(tsrm_tls_entry));
|
||||
(*thread_resources_ptr)->storage = NULL;
|
||||
if (id_count > 0) {
|
||||
(*thread_resources_ptr)->storage = (void **) malloc(sizeof(void *)*id_count);
|
||||
}
|
||||
(*thread_resources_ptr)->storage = (void **) malloc(sizeof(void *)*id_count);
|
||||
(*thread_resources_ptr)->count = id_count;
|
||||
(*thread_resources_ptr)->thread_id = thread_id;
|
||||
(*thread_resources_ptr)->next = NULL;
|
||||
@@ -289,7 +282,7 @@ static void allocate_new_resource(tsrm_tls_entry **thread_resources_ptr, THREAD_
|
||||
tsrm_tls_set(*thread_resources_ptr);
|
||||
|
||||
if (tsrm_new_thread_begin_handler) {
|
||||
tsrm_new_thread_begin_handler(thread_id);
|
||||
tsrm_new_thread_begin_handler(thread_id, &((*thread_resources_ptr)->storage));
|
||||
}
|
||||
for (i=0; i<id_count; i++) {
|
||||
if (resource_types_table[i].done) {
|
||||
@@ -298,13 +291,13 @@ static void allocate_new_resource(tsrm_tls_entry **thread_resources_ptr, THREAD_
|
||||
{
|
||||
(*thread_resources_ptr)->storage[i] = (void *) malloc(resource_types_table[i].size);
|
||||
if (resource_types_table[i].ctor) {
|
||||
resource_types_table[i].ctor((*thread_resources_ptr)->storage[i]);
|
||||
resource_types_table[i].ctor((*thread_resources_ptr)->storage[i], &(*thread_resources_ptr)->storage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (tsrm_new_thread_end_handler) {
|
||||
tsrm_new_thread_end_handler(thread_id);
|
||||
tsrm_new_thread_end_handler(thread_id, &((*thread_resources_ptr)->storage));
|
||||
}
|
||||
|
||||
tsrm_mutex_unlock(tsmm_mutex);
|
||||
@@ -397,7 +390,7 @@ void tsrm_free_interpreter_context(void *context)
|
||||
|
||||
for (i=0; i<thread_resources->count; i++) {
|
||||
if (resource_types_table[i].dtor) {
|
||||
resource_types_table[i].dtor(thread_resources->storage[i]);
|
||||
resource_types_table[i].dtor(thread_resources->storage[i], &thread_resources->storage);
|
||||
}
|
||||
}
|
||||
for (i=0; i<thread_resources->count; i++) {
|
||||
@@ -438,7 +431,7 @@ void *tsrm_new_interpreter_context(void)
|
||||
current = tsrm_tls_get();
|
||||
|
||||
allocate_new_resource(&new_ctx, thread_id);
|
||||
|
||||
|
||||
/* switch back to the context that was in use prior to our creation
|
||||
* of the new one */
|
||||
return tsrm_set_interpreter_context(current);
|
||||
@@ -462,7 +455,7 @@ void ts_free_thread(void)
|
||||
if (thread_resources->thread_id == thread_id) {
|
||||
for (i=0; i<thread_resources->count; i++) {
|
||||
if (resource_types_table[i].dtor) {
|
||||
resource_types_table[i].dtor(thread_resources->storage[i]);
|
||||
resource_types_table[i].dtor(thread_resources->storage[i], &thread_resources->storage);
|
||||
}
|
||||
}
|
||||
for (i=0; i<thread_resources->count; i++) {
|
||||
@@ -504,7 +497,7 @@ void ts_free_worker_threads(void)
|
||||
if (thread_resources->thread_id != thread_id) {
|
||||
for (i=0; i<thread_resources->count; i++) {
|
||||
if (resource_types_table[i].dtor) {
|
||||
resource_types_table[i].dtor(thread_resources->storage[i]);
|
||||
resource_types_table[i].dtor(thread_resources->storage[i], &thread_resources->storage);
|
||||
}
|
||||
}
|
||||
for (i=0; i<thread_resources->count; i++) {
|
||||
@@ -550,7 +543,7 @@ void ts_free_id(ts_rsrc_id id)
|
||||
while (p) {
|
||||
if (p->count > j && p->storage[j]) {
|
||||
if (resource_types_table && resource_types_table[j].dtor) {
|
||||
resource_types_table[j].dtor(p->storage[j]);
|
||||
resource_types_table[j].dtor(p->storage[j], &p->storage);
|
||||
}
|
||||
free(p->storage[j]);
|
||||
p->storage[j] = NULL;
|
||||
@@ -616,7 +609,7 @@ TSRM_API MUTEX_T tsrm_mutex_alloc(void)
|
||||
#elif defined(BETHREADS)
|
||||
mutexp = (beos_ben*)malloc(sizeof(beos_ben));
|
||||
mutexp->ben = 0;
|
||||
mutexp->sem = create_sem(1, "PHP sempahore");
|
||||
mutexp->sem = create_sem(1, "PHP sempahore");
|
||||
#endif
|
||||
#ifdef THR_DEBUG
|
||||
printf("Mutex created thread: %d\n",mythreadid());
|
||||
@@ -645,7 +638,7 @@ TSRM_API void tsrm_mutex_free(MUTEX_T mutexp)
|
||||
st_mutex_destroy(mutexp);
|
||||
#elif defined(BETHREADS)
|
||||
delete_sem(mutexp->sem);
|
||||
free(mutexp);
|
||||
free(mutexp);
|
||||
#endif
|
||||
}
|
||||
#ifdef THR_DEBUG
|
||||
@@ -679,8 +672,8 @@ TSRM_API int tsrm_mutex_lock(MUTEX_T mutexp)
|
||||
#elif defined(TSRM_ST)
|
||||
return st_mutex_lock(mutexp);
|
||||
#elif defined(BETHREADS)
|
||||
if (atomic_add(&mutexp->ben, 1) != 0)
|
||||
return acquire_sem(mutexp->sem);
|
||||
if (atomic_add(&mutexp->ben, 1) != 0)
|
||||
return acquire_sem(mutexp->sem);
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
@@ -711,9 +704,9 @@ TSRM_API int tsrm_mutex_unlock(MUTEX_T mutexp)
|
||||
#elif defined(TSRM_ST)
|
||||
return st_mutex_unlock(mutexp);
|
||||
#elif defined(BETHREADS)
|
||||
if (atomic_add(&mutexp->ben, -1) != 1)
|
||||
if (atomic_add(&mutexp->ben, -1) != 1)
|
||||
return release_sem(mutexp->sem);
|
||||
return 0;
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -798,9 +791,4 @@ void tsrm_error_set(int level, char *debug_filename)
|
||||
#endif
|
||||
}
|
||||
|
||||
TSRM_API void *tsrm_get_ls_cache(void)
|
||||
{
|
||||
return tsrm_tls_get();
|
||||
}
|
||||
|
||||
#endif /* ZTS */
|
||||
+186
@@ -0,0 +1,186 @@
|
||||
# Microsoft Developer Studio Project File - Name="TSRM" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
||||
|
||||
CFG=TSRM - Win32 Debug_TS
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "TSRM.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "TSRM.mak" CFG="TSRM - Win32 Debug_TS"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "TSRM - Win32 Debug_TS" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "TSRM - Win32 Release_TS" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "TSRM - Win32 Release_TS_inline" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "TSRM - Win32 Release_TSDbg" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "TSRM - Win32 Debug_TS"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "TSRM___Win32_Debug_TS"
|
||||
# PROP BASE Intermediate_Dir "TSRM___Win32_Debug_TS"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug_TS"
|
||||
# PROP Intermediate_Dir "Debug_TS"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "C:\Projects\TSRM" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /D "_DEBUG" /D "ZTS" /D "_LIB" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /D TSRM_DEBUG=1 /YX /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x40d /d "_DEBUG"
|
||||
# ADD RSC /l 0x40d /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "TSRM - Win32 Release_TS"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "TSRM___Win32_Release_TS"
|
||||
# PROP BASE Intermediate_Dir "TSRM___Win32_Release_TS"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release_TS"
|
||||
# PROP Intermediate_Dir "Release_TS"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDEBUG" /D "ZTS" /D "_LIB" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /D TSRM_DEBUG=0 /YX /FD /c
|
||||
# ADD BASE RSC /l 0x40d /d "NDEBUG"
|
||||
# ADD RSC /l 0x40d /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "TSRM - Win32 Release_TS_inline"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "TSRM___Win32_Release_TS_inline"
|
||||
# PROP BASE Intermediate_Dir "TSRM___Win32_Release_TS_inline"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release_TS_inline"
|
||||
# PROP Intermediate_Dir "Release_TS_inline"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "TSRM_EXPORTS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDEBUG" /D "ZTS" /D "_LIB" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /D TSRM_DEBUG=0 /YX /FD /c
|
||||
# ADD BASE RSC /l 0x40d /d "NDEBUG"
|
||||
# ADD RSC /l 0x40d /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "TSRM - Win32 Release_TSDbg"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "TSRM___Win32_Release_TSDbg"
|
||||
# PROP BASE Intermediate_Dir "TSRM___Win32_Release_TSDbg"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release_TSDbg"
|
||||
# PROP Intermediate_Dir "Release_TSDbg"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDEBUG" /D "ZTS" /D "_LIB" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /D TSRM_DEBUG=0 /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /Zi /Od /I "." /D "NDEBUG" /D "ZTS" /D "_LIB" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /D TSRM_DEBUG=0 /YX /FD /c
|
||||
# ADD BASE RSC /l 0x40d /d "NDEBUG"
|
||||
# ADD RSC /l 0x40d /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "TSRM - Win32 Debug_TS"
|
||||
# Name "TSRM - Win32 Release_TS"
|
||||
# Name "TSRM - Win32 Release_TS_inline"
|
||||
# Name "TSRM - Win32 Release_TSDbg"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TSRM.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\tsrm_strtok_r.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\tsrm_virtual_cwd.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\tsrm_win32.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\readdir.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TSRM.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\tsrm_config.w32.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\tsrm_config_common.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\tsrm_strtok_r.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\tsrm_virtual_cwd.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\tsrm_win32.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
+20
-45
@@ -20,8 +20,6 @@
|
||||
# include <tsrm_config.h>
|
||||
#endif
|
||||
|
||||
#include "main/php_stdint.h"
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
# ifdef TSRM_EXPORTS
|
||||
# define TSRM_API __declspec(dllexport)
|
||||
@@ -34,8 +32,13 @@
|
||||
# define TSRM_API
|
||||
#endif
|
||||
|
||||
typedef intptr_t tsrm_intptr_t;
|
||||
typedef uintptr_t tsrm_uintptr_t;
|
||||
#ifdef _WIN64
|
||||
typedef __int64 tsrm_intptr_t;
|
||||
typedef unsigned __int64 tsrm_uintptr_t;
|
||||
#else
|
||||
typedef long tsrm_intptr_t;
|
||||
typedef unsigned long tsrm_uintptr_t;
|
||||
#endif
|
||||
|
||||
/* Only compile multi-threading functions if we're in ZTS mode */
|
||||
#ifdef ZTS
|
||||
@@ -53,7 +56,7 @@ typedef uintptr_t tsrm_uintptr_t;
|
||||
#elif defined(TSRM_ST)
|
||||
# include <st.h>
|
||||
#elif defined(BETHREADS)
|
||||
#include <kernel/OS.h>
|
||||
#include <kernel/OS.h>
|
||||
#include <TLS.h>
|
||||
#endif
|
||||
|
||||
@@ -84,15 +87,15 @@ typedef struct {
|
||||
sem_id sem;
|
||||
int32 ben;
|
||||
} beos_ben;
|
||||
# define MUTEX_T beos_ben *
|
||||
# define MUTEX_T beos_ben *
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SIGNAL_H
|
||||
#include <signal.h>
|
||||
#endif
|
||||
|
||||
typedef void (*ts_allocate_ctor)(void *);
|
||||
typedef void (*ts_allocate_dtor)(void *);
|
||||
typedef void (*ts_allocate_ctor)(void *, void ***);
|
||||
typedef void (*ts_allocate_dtor)(void *, void ***);
|
||||
|
||||
#define THREAD_HASH_OF(thr,ts) (unsigned long)thr%(unsigned long)ts
|
||||
|
||||
@@ -126,8 +129,8 @@ TSRM_API void ts_free_id(ts_rsrc_id id);
|
||||
#define TSRM_ERROR_LEVEL_CORE 2
|
||||
#define TSRM_ERROR_LEVEL_INFO 3
|
||||
|
||||
typedef void (*tsrm_thread_begin_func_t)(THREAD_T thread_id);
|
||||
typedef void (*tsrm_thread_end_func_t)(THREAD_T thread_id);
|
||||
typedef void (*tsrm_thread_begin_func_t)(THREAD_T thread_id, void ***tsrm_ls);
|
||||
typedef void (*tsrm_thread_end_func_t)(THREAD_T thread_id, void ***tsrm_ls);
|
||||
|
||||
|
||||
TSRM_API int tsrm_error(int level, const char *format, ...);
|
||||
@@ -152,37 +155,17 @@ TSRM_API void *tsrm_new_interpreter_context(void);
|
||||
TSRM_API void *tsrm_set_interpreter_context(void *new_ctx);
|
||||
TSRM_API void tsrm_free_interpreter_context(void *context);
|
||||
|
||||
TSRM_API void *tsrm_get_ls_cache(void);
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
# define TSRM_TLS __declspec(thread)
|
||||
#else
|
||||
# define TSRM_TLS __thread
|
||||
#endif
|
||||
|
||||
#define TSRM_SHUFFLE_RSRC_ID(rsrc_id) ((rsrc_id)+1)
|
||||
#define TSRM_UNSHUFFLE_RSRC_ID(rsrc_id) ((rsrc_id)-1)
|
||||
|
||||
#define TSRMLS_FETCH() void ***tsrm_ls = (void ***) ts_resource_ex(0, NULL)
|
||||
#define TSRMLS_FETCH_FROM_CTX(ctx) void ***tsrm_ls = (void ***) ctx
|
||||
#define TSRMLS_SET_CTX(ctx) ctx = (void ***) tsrm_get_ls_cache()
|
||||
#define TSRMG(id, type, element) (((type) (*((void ***) tsrm_get_ls_cache()))[TSRM_UNSHUFFLE_RSRC_ID(id)])->element)
|
||||
|
||||
#define TSRMG_STATIC(id, type, element) (((type) (*((void ***) TSRMLS_CACHE))[TSRM_UNSHUFFLE_RSRC_ID(id)])->element)
|
||||
#define TSRMLS_CACHE_EXTERN() extern TSRM_TLS void *TSRMLS_CACHE
|
||||
#define TSRMLS_CACHE_DEFINE() TSRM_TLS void *TSRMLS_CACHE = NULL
|
||||
#if ZEND_DEBUG
|
||||
#define TSRMLS_CACHE_UPDATE() TSRMLS_CACHE = tsrm_get_ls_cache()
|
||||
#else
|
||||
#define TSRMLS_CACHE_UPDATE() if (!TSRMLS_CACHE) TSRMLS_CACHE = tsrm_get_ls_cache()
|
||||
#endif
|
||||
#define TSRMLS_CACHE _tsrm_ls_cache
|
||||
|
||||
/* BC only */
|
||||
#define TSRMLS_D void
|
||||
#define TSRMLS_DC
|
||||
#define TSRMLS_C
|
||||
#define TSRMLS_CC
|
||||
#define TSRMLS_FETCH()
|
||||
#define TSRMLS_SET_CTX(ctx) ctx = (void ***) tsrm_ls
|
||||
#define TSRMG(id, type, element) (((type) (*((void ***) tsrm_ls))[TSRM_UNSHUFFLE_RSRC_ID(id)])->element)
|
||||
#define TSRMLS_D void ***tsrm_ls
|
||||
#define TSRMLS_DC , TSRMLS_D
|
||||
#define TSRMLS_C tsrm_ls
|
||||
#define TSRMLS_CC , TSRMLS_C
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
@@ -193,14 +176,6 @@ TSRM_API void *tsrm_get_ls_cache(void);
|
||||
#define TSRMLS_FETCH()
|
||||
#define TSRMLS_FETCH_FROM_CTX(ctx)
|
||||
#define TSRMLS_SET_CTX(ctx)
|
||||
|
||||
#define TSRMG_STATIC(id, type, element)
|
||||
#define TSRMLS_CACHE_EXTERN()
|
||||
#define TSRMLS_CACHE_DEFINE()
|
||||
#define TSRMLS_CACHE_UPDATE()
|
||||
#define TSRMLS_CACHE
|
||||
|
||||
/* BC only */
|
||||
#define TSRMLS_D void
|
||||
#define TSRMLS_DC
|
||||
#define TSRMLS_C
|
||||
|
||||
+1
-2
@@ -1,6 +1,5 @@
|
||||
// vim:ft=javascript
|
||||
// $Id$
|
||||
|
||||
ADD_SOURCES("TSRM", "TSRM.c tsrm_strtok_r.c tsrm_win32.c");
|
||||
ADD_FLAG("CFLAGS_BD_TSRM", "/D ZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
|
||||
ADD_SOURCES("TSRM", "TSRM.c tsrm_strtok_r.c tsrm_virtual_cwd.c tsrm_win32.c");
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
#define TSRM_CONFIG_W32_H
|
||||
|
||||
#include <../main/config.w32.h>
|
||||
#include "Zend/zend_config.w32.h"
|
||||
|
||||
#define HAVE_UTIME 1
|
||||
#define HAVE_ALLOCA 1
|
||||
@@ -12,4 +11,12 @@
|
||||
#include <stdlib.h>
|
||||
#include <crtdbg.h>
|
||||
|
||||
#undef inline
|
||||
#ifdef ZEND_WIN32_FORCE_INLINE
|
||||
# define inline __forceinline
|
||||
#else
|
||||
# define inline
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
@@ -2,7 +2,7 @@
|
||||
#define TSRM_CONFIG_COMMON_H
|
||||
|
||||
#ifndef __CYGWIN__
|
||||
# ifdef _WIN32
|
||||
# if WINNT|WIN32
|
||||
# define TSRM_WIN32
|
||||
# endif
|
||||
#endif
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 7 |
|
||||
| PHP Version 5 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2015 The PHP Group |
|
||||
| Copyright (c) 1997-2013 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 7 |
|
||||
| PHP Version 5 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2015 The PHP Group |
|
||||
| Copyright (c) 1997-2013 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 |
|
||||
|
||||
@@ -14,7 +14,7 @@ static inline int in_character_class(char ch, const char *delim)
|
||||
return 0;
|
||||
}
|
||||
|
||||
TSRM_API char *tsrm_strtok_r(char *s, const char *delim, char **last)
|
||||
char *tsrm_strtok_r(char *s, const char *delim, char **last)
|
||||
{
|
||||
char *token;
|
||||
|
||||
@@ -56,7 +56,7 @@ main()
|
||||
printf ("Token = '%s'\n", token);
|
||||
token = tsrm_strtok_r(NULL, "/\\", &last);
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef TSRM_STRTOK_R
|
||||
#define TSRM_STRTOK_R
|
||||
|
||||
#include "TSRM.h"
|
||||
|
||||
TSRM_API char *tsrm_strtok_r(char *s, const char *delim, char **last);
|
||||
char *tsrm_strtok_r(char *s, const char *delim, char **last);
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,338 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 5 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2013 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available through the world-wide-web at the following url: |
|
||||
| http://www.php.net/license/3_01.txt |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Sascha Schumann <sascha@schumann.cx> |
|
||||
| Pierre Joye <pierre@php.net> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
#ifndef VIRTUAL_CWD_H
|
||||
#define VIRTUAL_CWD_H
|
||||
|
||||
#include "TSRM.h"
|
||||
#include "tsrm_config_common.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#ifdef HAVE_UTIME_H
|
||||
#include <utime.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDARG_H
|
||||
#include <stdarg.h>
|
||||
#endif
|
||||
|
||||
#ifdef ZTS
|
||||
#define VIRTUAL_DIR
|
||||
#endif
|
||||
|
||||
#ifndef TSRM_WIN32
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#include <direct.h>
|
||||
#endif
|
||||
|
||||
#if defined(__osf__) || defined(_AIX)
|
||||
#include <errno.h>
|
||||
#endif
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
#include "readdir.h"
|
||||
#include <sys/utime.h>
|
||||
/* mode_t isn't defined on Windows */
|
||||
typedef unsigned short mode_t;
|
||||
|
||||
#define DEFAULT_SLASH '\\'
|
||||
#define DEFAULT_DIR_SEPARATOR ';'
|
||||
#define IS_SLASH(c) ((c) == '/' || (c) == '\\')
|
||||
#define IS_SLASH_P(c) (*(c) == '/' || \
|
||||
(*(c) == '\\' && !IsDBCSLeadByte(*(c-1))))
|
||||
|
||||
/* COPY_WHEN_ABSOLUTE is 2 under Win32 because by chance both regular absolute paths
|
||||
in the file system and UNC paths need copying of two characters */
|
||||
#define COPY_WHEN_ABSOLUTE(path) 2
|
||||
#define IS_UNC_PATH(path, len) \
|
||||
(len >= 2 && IS_SLASH(path[0]) && IS_SLASH(path[1]))
|
||||
#define IS_ABSOLUTE_PATH(path, len) \
|
||||
(len >= 2 && ((isalpha(path[0]) && path[1] == ':') || IS_UNC_PATH(path, len)))
|
||||
|
||||
#elif defined(NETWARE)
|
||||
#ifdef HAVE_DIRENT_H
|
||||
#include <dirent.h>
|
||||
#endif
|
||||
|
||||
#define DEFAULT_SLASH '/'
|
||||
#define DEFAULT_DIR_SEPARATOR ';'
|
||||
#define IS_SLASH(c) ((c) == '/' || (c) == '\\')
|
||||
#define IS_SLASH_P(c) IS_SLASH(*(c))
|
||||
/* Colon indicates volume name, either first character should be forward slash or backward slash */
|
||||
#define IS_ABSOLUTE_PATH(path, len) \
|
||||
((strchr(path, ':') != NULL) || ((len >= 1) && ((path[0] == '/') || (path[0] == '\\'))))
|
||||
|
||||
#else
|
||||
#ifdef HAVE_DIRENT_H
|
||||
#include <dirent.h>
|
||||
#endif
|
||||
|
||||
#define DEFAULT_SLASH '/'
|
||||
|
||||
#ifdef __riscos__
|
||||
#define DEFAULT_DIR_SEPARATOR ';'
|
||||
#else
|
||||
#define DEFAULT_DIR_SEPARATOR ':'
|
||||
#endif
|
||||
|
||||
#define IS_SLASH(c) ((c) == '/')
|
||||
#define IS_SLASH_P(c) (*(c) == '/')
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef COPY_WHEN_ABSOLUTE
|
||||
#define COPY_WHEN_ABSOLUTE(path) 0
|
||||
#endif
|
||||
|
||||
#ifndef IS_ABSOLUTE_PATH
|
||||
#define IS_ABSOLUTE_PATH(path, len) \
|
||||
(IS_SLASH(path[0]))
|
||||
#endif
|
||||
|
||||
#ifdef TSRM_EXPORTS
|
||||
#define CWD_EXPORTS
|
||||
#endif
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
# ifdef CWD_EXPORTS
|
||||
# define CWD_API __declspec(dllexport)
|
||||
# else
|
||||
# define CWD_API __declspec(dllimport)
|
||||
# endif
|
||||
#elif defined(__GNUC__) && __GNUC__ >= 4
|
||||
# define CWD_API __attribute__ ((visibility("default")))
|
||||
#else
|
||||
# define CWD_API
|
||||
#endif
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
CWD_API int php_sys_stat_ex(const char *path, struct stat *buf, int lstat);
|
||||
# define php_sys_stat(path, buf) php_sys_stat_ex(path, buf, 0)
|
||||
# define php_sys_lstat(path, buf) php_sys_stat_ex(path, buf, 1)
|
||||
CWD_API int php_sys_readlink(const char *link, char *target, size_t target_len);
|
||||
#else
|
||||
# define php_sys_stat stat
|
||||
# define php_sys_lstat lstat
|
||||
# ifdef HAVE_SYMLINK
|
||||
# define php_sys_readlink(link, target, target_len) readlink(link, target, target_len)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
typedef struct _cwd_state {
|
||||
char *cwd;
|
||||
int cwd_length;
|
||||
} cwd_state;
|
||||
|
||||
typedef int (*verify_path_func)(const cwd_state *);
|
||||
|
||||
CWD_API void virtual_cwd_startup(void);
|
||||
CWD_API void virtual_cwd_shutdown(void);
|
||||
CWD_API char *virtual_getcwd_ex(size_t *length TSRMLS_DC);
|
||||
CWD_API char *virtual_getcwd(char *buf, size_t size TSRMLS_DC);
|
||||
CWD_API int virtual_chdir(const char *path TSRMLS_DC);
|
||||
CWD_API int virtual_chdir_file(const char *path, int (*p_chdir)(const char *path TSRMLS_DC) TSRMLS_DC);
|
||||
CWD_API int virtual_filepath(const char *path, char **filepath TSRMLS_DC);
|
||||
CWD_API int virtual_filepath_ex(const char *path, char **filepath, verify_path_func verify_path TSRMLS_DC);
|
||||
CWD_API char *virtual_realpath(const char *path, char *real_path TSRMLS_DC);
|
||||
CWD_API FILE *virtual_fopen(const char *path, const char *mode TSRMLS_DC);
|
||||
CWD_API int virtual_open(const char *path TSRMLS_DC, int flags, ...);
|
||||
CWD_API int virtual_creat(const char *path, mode_t mode TSRMLS_DC);
|
||||
CWD_API int virtual_rename(char *oldname, char *newname TSRMLS_DC);
|
||||
CWD_API int virtual_stat(const char *path, struct stat *buf TSRMLS_DC);
|
||||
CWD_API int virtual_lstat(const char *path, struct stat *buf TSRMLS_DC);
|
||||
CWD_API int virtual_unlink(const char *path TSRMLS_DC);
|
||||
CWD_API int virtual_mkdir(const char *pathname, mode_t mode TSRMLS_DC);
|
||||
CWD_API int virtual_rmdir(const char *pathname TSRMLS_DC);
|
||||
CWD_API DIR *virtual_opendir(const char *pathname TSRMLS_DC);
|
||||
CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC);
|
||||
CWD_API int virtual_access(const char *pathname, int mode TSRMLS_DC);
|
||||
#if defined(TSRM_WIN32)
|
||||
/* these are not defined in win32 headers */
|
||||
#ifndef W_OK
|
||||
#define W_OK 0x02
|
||||
#endif
|
||||
#ifndef R_OK
|
||||
#define R_OK 0x04
|
||||
#endif
|
||||
#ifndef X_OK
|
||||
#define X_OK 0x01
|
||||
#endif
|
||||
#ifndef F_OK
|
||||
#define F_OK 0x00
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAVE_UTIME
|
||||
CWD_API int virtual_utime(const char *filename, struct utimbuf *buf TSRMLS_DC);
|
||||
#endif
|
||||
CWD_API int virtual_chmod(const char *filename, mode_t mode TSRMLS_DC);
|
||||
#if !defined(TSRM_WIN32) && !defined(NETWARE)
|
||||
CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group, int link TSRMLS_DC);
|
||||
#endif
|
||||
|
||||
/* One of the following constants must be used as the last argument
|
||||
in virtual_file_ex() call. */
|
||||
|
||||
#define CWD_EXPAND 0 /* expand "." and ".." but dont resolve symlinks */
|
||||
#define CWD_FILEPATH 1 /* resolve symlinks if file is exist otherwise expand */
|
||||
#define CWD_REALPATH 2 /* call realpath(), resolve symlinks. File must exist */
|
||||
|
||||
CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func verify_path, int use_realpath TSRMLS_DC);
|
||||
|
||||
CWD_API char *tsrm_realpath(const char *path, char *real_path TSRMLS_DC);
|
||||
|
||||
#define REALPATH_CACHE_TTL (2*60) /* 2 minutes */
|
||||
#define REALPATH_CACHE_SIZE 0 /* disabled while php.ini isn't loaded */
|
||||
|
||||
typedef struct _realpath_cache_bucket {
|
||||
unsigned long key;
|
||||
char *path;
|
||||
int path_len;
|
||||
char *realpath;
|
||||
int realpath_len;
|
||||
int is_dir;
|
||||
time_t expires;
|
||||
#ifdef PHP_WIN32
|
||||
unsigned char is_rvalid;
|
||||
unsigned char is_readable;
|
||||
unsigned char is_wvalid;
|
||||
unsigned char is_writable;
|
||||
#endif
|
||||
struct _realpath_cache_bucket *next;
|
||||
} realpath_cache_bucket;
|
||||
|
||||
typedef struct _virtual_cwd_globals {
|
||||
cwd_state cwd;
|
||||
long realpath_cache_size;
|
||||
long realpath_cache_size_limit;
|
||||
long realpath_cache_ttl;
|
||||
realpath_cache_bucket *realpath_cache[1024];
|
||||
} virtual_cwd_globals;
|
||||
|
||||
#ifdef ZTS
|
||||
extern ts_rsrc_id cwd_globals_id;
|
||||
# define CWDG(v) TSRMG(cwd_globals_id, virtual_cwd_globals *, v)
|
||||
#else
|
||||
extern virtual_cwd_globals cwd_globals;
|
||||
# define CWDG(v) (cwd_globals.v)
|
||||
#endif
|
||||
|
||||
CWD_API void realpath_cache_clean(TSRMLS_D);
|
||||
CWD_API void realpath_cache_del(const char *path, int path_len TSRMLS_DC);
|
||||
CWD_API realpath_cache_bucket* realpath_cache_lookup(const char *path, int path_len, time_t t TSRMLS_DC);
|
||||
CWD_API int realpath_cache_size(TSRMLS_D);
|
||||
CWD_API int realpath_cache_max_buckets(TSRMLS_D);
|
||||
CWD_API realpath_cache_bucket** realpath_cache_get_buckets(TSRMLS_D);
|
||||
|
||||
/* The actual macros to be used in programs using TSRM
|
||||
* If the program defines VIRTUAL_DIR it will use the
|
||||
* virtual_* functions
|
||||
*/
|
||||
|
||||
#ifdef VIRTUAL_DIR
|
||||
|
||||
#define VCWD_GETCWD(buff, size) virtual_getcwd(buff, size TSRMLS_CC)
|
||||
#define VCWD_FOPEN(path, mode) virtual_fopen(path, mode TSRMLS_CC)
|
||||
/* Because open() has two modes, we have to macros to replace it */
|
||||
#define VCWD_OPEN(path, flags) virtual_open(path TSRMLS_CC, flags)
|
||||
#define VCWD_OPEN_MODE(path, flags, mode) virtual_open(path TSRMLS_CC, flags, mode)
|
||||
#define VCWD_CREAT(path, mode) virtual_creat(path, mode TSRMLS_CC)
|
||||
#define VCWD_CHDIR(path) virtual_chdir(path TSRMLS_CC)
|
||||
#define VCWD_CHDIR_FILE(path) virtual_chdir_file(path, virtual_chdir TSRMLS_CC)
|
||||
#define VCWD_GETWD(buf)
|
||||
#define VCWD_REALPATH(path, real_path) virtual_realpath(path, real_path TSRMLS_CC)
|
||||
#define VCWD_RENAME(oldname, newname) virtual_rename(oldname, newname TSRMLS_CC)
|
||||
#define VCWD_STAT(path, buff) virtual_stat(path, buff TSRMLS_CC)
|
||||
# define VCWD_LSTAT(path, buff) virtual_lstat(path, buff TSRMLS_CC)
|
||||
#define VCWD_UNLINK(path) virtual_unlink(path TSRMLS_CC)
|
||||
#define VCWD_MKDIR(pathname, mode) virtual_mkdir(pathname, mode TSRMLS_CC)
|
||||
#define VCWD_RMDIR(pathname) virtual_rmdir(pathname TSRMLS_CC)
|
||||
#define VCWD_OPENDIR(pathname) virtual_opendir(pathname TSRMLS_CC)
|
||||
#define VCWD_POPEN(command, type) virtual_popen(command, type TSRMLS_CC)
|
||||
#define VCWD_ACCESS(pathname, mode) virtual_access(pathname, mode TSRMLS_CC)
|
||||
#if HAVE_UTIME
|
||||
#define VCWD_UTIME(path, time) virtual_utime(path, time TSRMLS_CC)
|
||||
#endif
|
||||
#define VCWD_CHMOD(path, mode) virtual_chmod(path, mode TSRMLS_CC)
|
||||
#if !defined(TSRM_WIN32) && !defined(NETWARE)
|
||||
#define VCWD_CHOWN(path, owner, group) virtual_chown(path, owner, group, 0 TSRMLS_CC)
|
||||
#if HAVE_LCHOWN
|
||||
#define VCWD_LCHOWN(path, owner, group) virtual_chown(path, owner, group, 1 TSRMLS_CC)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#define VCWD_GETCWD(buff, size) getcwd(buff, size)
|
||||
#define VCWD_FOPEN(path, mode) fopen(path, mode)
|
||||
#define VCWD_OPEN(path, flags) open(path, flags)
|
||||
#define VCWD_OPEN_MODE(path, flags, mode) open(path, flags, mode)
|
||||
#define VCWD_CREAT(path, mode) creat(path, mode)
|
||||
/* rename on windows will fail if newname already exists.
|
||||
MoveFileEx has to be used */
|
||||
#if defined(TSRM_WIN32)
|
||||
# define VCWD_RENAME(oldname, newname) (MoveFileEx(oldname, newname, MOVEFILE_REPLACE_EXISTING|MOVEFILE_COPY_ALLOWED) == 0 ? -1 : 0)
|
||||
#else
|
||||
# define VCWD_RENAME(oldname, newname) rename(oldname, newname)
|
||||
#endif
|
||||
#define VCWD_CHDIR(path) chdir(path)
|
||||
#define VCWD_CHDIR_FILE(path) virtual_chdir_file(path, chdir)
|
||||
#define VCWD_GETWD(buf) getwd(buf)
|
||||
#define VCWD_STAT(path, buff) php_sys_stat(path, buff)
|
||||
#define VCWD_LSTAT(path, buff) lstat(path, buff)
|
||||
#define VCWD_UNLINK(path) unlink(path)
|
||||
#define VCWD_MKDIR(pathname, mode) mkdir(pathname, mode)
|
||||
#define VCWD_RMDIR(pathname) rmdir(pathname)
|
||||
#define VCWD_OPENDIR(pathname) opendir(pathname)
|
||||
#define VCWD_POPEN(command, type) popen(command, type)
|
||||
#if defined(TSRM_WIN32)
|
||||
#define VCWD_ACCESS(pathname, mode) tsrm_win32_access(pathname, mode TSRMLS_CC)
|
||||
#else
|
||||
#define VCWD_ACCESS(pathname, mode) access(pathname, mode)
|
||||
#endif
|
||||
|
||||
#define VCWD_REALPATH(path, real_path) tsrm_realpath(path, real_path TSRMLS_CC)
|
||||
|
||||
#if HAVE_UTIME
|
||||
# ifdef TSRM_WIN32
|
||||
# define VCWD_UTIME(path, time) win32_utime(path, time)
|
||||
# else
|
||||
# define VCWD_UTIME(path, time) utime(path, time)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#define VCWD_CHMOD(path, mode) chmod(path, mode)
|
||||
#if !defined(TSRM_WIN32) && !defined(NETWARE)
|
||||
#define VCWD_CHOWN(path, owner, group) chown(path, owner, group)
|
||||
#if HAVE_LCHOWN
|
||||
#define VCWD_LCHOWN(path, owner, group) lchown(path, owner, group)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* VIRTUAL_CWD_H */
|
||||
+40
-89
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 7 |
|
||||
| PHP Version 5 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2015 The PHP Group |
|
||||
| Copyright (c) 1997-2013 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 |
|
||||
@@ -32,7 +32,7 @@
|
||||
#ifdef TSRM_WIN32
|
||||
#include <Sddl.h>
|
||||
#include "tsrm_win32.h"
|
||||
#include "zend_virtual_cwd.h"
|
||||
#include "tsrm_virtual_cwd.h"
|
||||
|
||||
#ifdef ZTS
|
||||
static ts_rsrc_id win32_globals_id;
|
||||
@@ -40,11 +40,8 @@ static ts_rsrc_id win32_globals_id;
|
||||
static tsrm_win32_globals win32_globals;
|
||||
#endif
|
||||
|
||||
static void tsrm_win32_ctor(tsrm_win32_globals *globals)
|
||||
static void tsrm_win32_ctor(tsrm_win32_globals *globals TSRMLS_DC)
|
||||
{
|
||||
#ifdef ZTS
|
||||
TSRMLS_CACHE_UPDATE();
|
||||
#endif
|
||||
globals->process = NULL;
|
||||
globals->shm = NULL;
|
||||
globals->process_size = 0;
|
||||
@@ -52,7 +49,7 @@ TSRMLS_CACHE_UPDATE();
|
||||
globals->comspec = _strdup((GetVersion()<0x80000000)?"cmd.exe":"command.com");
|
||||
|
||||
/* Set it to INVALID_HANDLE_VALUE
|
||||
* It will be initialized correctly in tsrm_win32_access or set to
|
||||
* It will be initialized correctly in tsrm_win32_access or set to
|
||||
* NULL if no impersonation has been done.
|
||||
* the impersonated token can't be set here as the impersonation
|
||||
* will happen later, in fcgi_accept_request (or whatever is the
|
||||
@@ -62,7 +59,7 @@ TSRMLS_CACHE_UPDATE();
|
||||
globals->impersonation_token_sid = NULL;
|
||||
}
|
||||
|
||||
static void tsrm_win32_dtor(tsrm_win32_globals *globals)
|
||||
static void tsrm_win32_dtor(tsrm_win32_globals *globals TSRMLS_DC)
|
||||
{
|
||||
shm_pair *ptr;
|
||||
|
||||
@@ -95,32 +92,30 @@ TSRM_API void tsrm_win32_startup(void)
|
||||
#ifdef ZTS
|
||||
ts_allocate_id(&win32_globals_id, sizeof(tsrm_win32_globals), (ts_allocate_ctor)tsrm_win32_ctor, (ts_allocate_ctor)tsrm_win32_dtor);
|
||||
#else
|
||||
tsrm_win32_ctor(&win32_globals);
|
||||
tsrm_win32_ctor(&win32_globals TSRMLS_CC);
|
||||
#endif
|
||||
}
|
||||
|
||||
TSRM_API void tsrm_win32_shutdown(void)
|
||||
{
|
||||
#ifndef ZTS
|
||||
tsrm_win32_dtor(&win32_globals);
|
||||
tsrm_win32_dtor(&win32_globals TSRMLS_CC);
|
||||
#endif
|
||||
}
|
||||
|
||||
char * tsrm_win32_get_path_sid_key(const char *pathname)
|
||||
char * tsrm_win32_get_path_sid_key(const char *pathname TSRMLS_DC)
|
||||
{
|
||||
PSID pSid = TWG(impersonation_token_sid);
|
||||
DWORD sid_len = pSid ? GetLengthSid(pSid) : 0;
|
||||
TCHAR *ptcSid = NULL;
|
||||
char *bucket_key = NULL;
|
||||
size_t ptc_sid_len, pathname_len;
|
||||
|
||||
pathname_len = strlen(pathname);
|
||||
|
||||
if (!pSid) {
|
||||
bucket_key = (char *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, pathname_len + 1);
|
||||
bucket_key = (char *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, strlen(pathname) + 1);
|
||||
if (!bucket_key) {
|
||||
return NULL;
|
||||
}
|
||||
memcpy(bucket_key, pathname, pathname_len);
|
||||
memcpy(bucket_key, pathname, strlen(pathname));
|
||||
return bucket_key;
|
||||
}
|
||||
|
||||
@@ -128,16 +123,14 @@ char * tsrm_win32_get_path_sid_key(const char *pathname)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
ptc_sid_len = strlen(ptcSid);
|
||||
bucket_key = (char *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, pathname_len + ptc_sid_len + 1);
|
||||
bucket_key = (char *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, strlen(pathname) + strlen(ptcSid) + 1);
|
||||
if (!bucket_key) {
|
||||
LocalFree(ptcSid);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
memcpy(bucket_key, ptcSid, ptc_sid_len);
|
||||
memcpy(bucket_key + ptc_sid_len, pathname, pathname_len + 1);
|
||||
memcpy(bucket_key, ptcSid, strlen(ptcSid));
|
||||
memcpy(bucket_key + strlen(ptcSid), pathname, strlen(pathname) + 1);
|
||||
|
||||
LocalFree(ptcSid);
|
||||
return bucket_key;
|
||||
@@ -146,8 +139,11 @@ char * tsrm_win32_get_path_sid_key(const char *pathname)
|
||||
|
||||
PSID tsrm_win32_get_token_sid(HANDLE hToken)
|
||||
{
|
||||
BOOL bSuccess = FALSE;
|
||||
DWORD dwLength = 0;
|
||||
PTOKEN_USER pTokenUser = NULL;
|
||||
PSID sid;
|
||||
PSID *ppsid = &sid;
|
||||
DWORD sid_len;
|
||||
PSID pResultSid = NULL;
|
||||
|
||||
@@ -194,7 +190,7 @@ Finished:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
TSRM_API int tsrm_win32_access(const char *pathname, int mode)
|
||||
TSRM_API int tsrm_win32_access(const char *pathname, int mode TSRMLS_DC)
|
||||
{
|
||||
time_t t;
|
||||
HANDLE thread_token = NULL;
|
||||
@@ -208,6 +204,7 @@ TSRM_API int tsrm_win32_access(const char *pathname, int mode)
|
||||
BYTE * psec_desc = NULL;
|
||||
BOOL fAccess = FALSE;
|
||||
|
||||
BOOL bucket_key_alloc = FALSE;
|
||||
realpath_cache_bucket * bucket = NULL;
|
||||
char * real_path = NULL;
|
||||
|
||||
@@ -217,7 +214,7 @@ TSRM_API int tsrm_win32_access(const char *pathname, int mode)
|
||||
} else {
|
||||
if(!IS_ABSOLUTE_PATH(pathname, strlen(pathname)+1)) {
|
||||
real_path = (char *)malloc(MAX_PATH);
|
||||
if(tsrm_realpath(pathname, real_path) == NULL) {
|
||||
if(tsrm_realpath(pathname, real_path TSRMLS_CC) == NULL) {
|
||||
goto Finished;
|
||||
}
|
||||
pathname = real_path;
|
||||
@@ -245,6 +242,7 @@ TSRM_API int tsrm_win32_access(const char *pathname, int mode)
|
||||
was impersonating already, this function uses that impersonation context.
|
||||
*/
|
||||
if(!OpenThreadToken(GetCurrentThread(), TOKEN_ALL_ACCESS, TRUE, &thread_token)) {
|
||||
DWORD err = GetLastError();
|
||||
if (GetLastError() == ERROR_NO_TOKEN) {
|
||||
if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ALL_ACCESS, &thread_token)) {
|
||||
TWG(impersonation_token) = NULL;
|
||||
@@ -281,14 +279,14 @@ TSRM_API int tsrm_win32_access(const char *pathname, int mode)
|
||||
|
||||
if (CWDG(realpath_cache_size_limit)) {
|
||||
t = time(0);
|
||||
bucket = realpath_cache_lookup(pathname, (int)strlen(pathname), t);
|
||||
bucket = realpath_cache_lookup(pathname, strlen(pathname), t TSRMLS_CC);
|
||||
if(bucket == NULL && real_path == NULL) {
|
||||
/* We used the pathname directly. Call tsrm_realpath */
|
||||
/* so that entry is created in realpath cache */
|
||||
real_path = (char *)malloc(MAX_PATH);
|
||||
if(tsrm_realpath(pathname, real_path) != NULL) {
|
||||
if(tsrm_realpath(pathname, real_path TSRMLS_CC) != NULL) {
|
||||
pathname = real_path;
|
||||
bucket = realpath_cache_lookup(pathname, (int)strlen(pathname), t);
|
||||
bucket = realpath_cache_lookup(pathname, strlen(pathname), t TSRMLS_CC);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -383,7 +381,7 @@ Finished:
|
||||
}
|
||||
|
||||
|
||||
static process_pair *process_get(FILE *stream)
|
||||
static process_pair *process_get(FILE *stream TSRMLS_DC)
|
||||
{
|
||||
process_pair *ptr;
|
||||
process_pair *newptr;
|
||||
@@ -413,6 +411,7 @@ static shm_pair *shm_get(int key, void *addr)
|
||||
{
|
||||
shm_pair *ptr;
|
||||
shm_pair *newptr;
|
||||
TSRMLS_FETCH();
|
||||
|
||||
for (ptr = TWG(shm); ptr < (TWG(shm) + TWG(shm_size)); ptr++) {
|
||||
if (!ptr->descriptor) {
|
||||
@@ -450,14 +449,15 @@ static HANDLE dupHandle(HANDLE fh, BOOL inherit) {
|
||||
|
||||
TSRM_API FILE *popen(const char *command, const char *type)
|
||||
{
|
||||
TSRMLS_FETCH();
|
||||
|
||||
return popen_ex(command, type, NULL, NULL);
|
||||
return popen_ex(command, type, NULL, NULL TSRMLS_CC);
|
||||
}
|
||||
|
||||
TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, char *env)
|
||||
TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, char *env TSRMLS_DC)
|
||||
{
|
||||
FILE *stream = NULL;
|
||||
int fno, type_len, read, mode;
|
||||
int fno, type_len = strlen(type), read, mode;
|
||||
STARTUPINFO startup;
|
||||
PROCESS_INFORMATION process;
|
||||
SECURITY_ATTRIBUTES security;
|
||||
@@ -477,7 +477,7 @@ TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd,
|
||||
}
|
||||
|
||||
/*The following two checks can be removed once we drop XP support */
|
||||
type_len = (int)strlen(type);
|
||||
type_len = strlen(type);
|
||||
if (type_len <1 || type_len > 2) {
|
||||
return NULL;
|
||||
}
|
||||
@@ -551,7 +551,7 @@ TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd,
|
||||
}
|
||||
|
||||
CloseHandle(process.hThread);
|
||||
proc = process_get(NULL);
|
||||
proc = process_get(NULL TSRMLS_CC);
|
||||
|
||||
if (read) {
|
||||
fno = _open_osfhandle((tsrm_intptr_t)in, _O_RDONLY | mode);
|
||||
@@ -571,8 +571,9 @@ TSRM_API int pclose(FILE *stream)
|
||||
{
|
||||
DWORD termstat = 0;
|
||||
process_pair *process;
|
||||
TSRMLS_FETCH();
|
||||
|
||||
if ((process = process_get(stream)) == NULL) {
|
||||
if ((process = process_get(stream TSRMLS_CC)) == NULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -604,13 +605,13 @@ TSRM_API int shmget(int key, int size, int flags)
|
||||
shm_handle = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, shm_segment);
|
||||
info_handle = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, shm_info);
|
||||
|
||||
if (!shm_handle && !info_handle) {
|
||||
if ((!shm_handle && !info_handle)) {
|
||||
if (flags & IPC_CREAT) {
|
||||
shm_handle = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, size, shm_segment);
|
||||
info_handle = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, sizeof(shm->descriptor), shm_info);
|
||||
created = TRUE;
|
||||
}
|
||||
if (!shm_handle || !info_handle) {
|
||||
if ((!shm_handle || !info_handle)) {
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
@@ -624,7 +625,7 @@ TSRM_API int shmget(int key, int size, int flags)
|
||||
shm->info = info_handle;
|
||||
shm->descriptor = MapViewOfFileEx(shm->info, FILE_MAP_ALL_ACCESS, 0, 0, 0, NULL);
|
||||
|
||||
if (NULL != shm->descriptor && created) {
|
||||
if (created) {
|
||||
shm->descriptor->shm_perm.key = key;
|
||||
shm->descriptor->shm_segsz = size;
|
||||
shm->descriptor->shm_ctime = time(NULL);
|
||||
@@ -638,10 +639,8 @@ TSRM_API int shmget(int key, int size, int flags)
|
||||
shm->descriptor->shm_perm.mode = shm->descriptor->shm_perm.seq = 0;
|
||||
}
|
||||
|
||||
if (NULL != shm->descriptor && (shm->descriptor->shm_perm.key != key || size > shm->descriptor->shm_segsz)) {
|
||||
if (NULL != shm->segment) {
|
||||
CloseHandle(shm->segment);
|
||||
}
|
||||
if (shm->descriptor->shm_perm.key != key || size > shm->descriptor->shm_segsz ) {
|
||||
CloseHandle(shm->segment);
|
||||
UnmapViewOfFile(shm->descriptor);
|
||||
CloseHandle(shm->info);
|
||||
return -1;
|
||||
@@ -721,52 +720,4 @@ TSRM_API char *realpath(char *orig_path, char *buffer)
|
||||
return buffer;
|
||||
}
|
||||
|
||||
#if HAVE_UTIME
|
||||
static zend_always_inline void UnixTimeToFileTime(time_t t, LPFILETIME pft) /* {{{ */
|
||||
{
|
||||
// Note that LONGLONG is a 64-bit value
|
||||
LONGLONG ll;
|
||||
|
||||
ll = Int32x32To64(t, 10000000) + 116444736000000000;
|
||||
pft->dwLowDateTime = (DWORD)ll;
|
||||
pft->dwHighDateTime = ll >> 32;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
TSRM_API int win32_utime(const char *filename, struct utimbuf *buf) /* {{{ */
|
||||
{
|
||||
FILETIME mtime, atime;
|
||||
HANDLE hFile;
|
||||
|
||||
hFile = CreateFile(filename, GENERIC_WRITE, FILE_SHARE_WRITE|FILE_SHARE_READ, NULL,
|
||||
OPEN_ALWAYS, FILE_FLAG_BACKUP_SEMANTICS, NULL);
|
||||
|
||||
/* OPEN_ALWAYS mode sets the last error to ERROR_ALREADY_EXISTS but
|
||||
the CreateFile operation succeeds */
|
||||
if (GetLastError() == ERROR_ALREADY_EXISTS) {
|
||||
SetLastError(0);
|
||||
}
|
||||
|
||||
if ( hFile == INVALID_HANDLE_VALUE ) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!buf) {
|
||||
SYSTEMTIME st;
|
||||
GetSystemTime(&st);
|
||||
SystemTimeToFileTime(&st, &mtime);
|
||||
atime = mtime;
|
||||
} else {
|
||||
UnixTimeToFileTime(buf->modtime, &mtime);
|
||||
UnixTimeToFileTime(buf->actime, &atime);
|
||||
}
|
||||
if (!SetFileTime(hFile, NULL, &atime, &mtime)) {
|
||||
CloseHandle(hFile);
|
||||
return -1;
|
||||
}
|
||||
CloseHandle(hFile);
|
||||
return 1;
|
||||
}
|
||||
/* }}} */
|
||||
#endif
|
||||
#endif
|
||||
+6
-10
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 7 |
|
||||
| PHP Version 5 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2015 The PHP Group |
|
||||
| Copyright (c) 1997-2013 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 |
|
||||
@@ -23,9 +23,6 @@
|
||||
|
||||
#include "TSRM.h"
|
||||
#include <windows.h>
|
||||
#if HAVE_UTIME
|
||||
# include <sys/utime.h>
|
||||
#endif
|
||||
|
||||
struct ipc_perm {
|
||||
int key;
|
||||
@@ -71,8 +68,7 @@ typedef struct {
|
||||
} tsrm_win32_globals;
|
||||
|
||||
#ifdef ZTS
|
||||
# define TWG(v) TSRMG_STATIC(win32_globals_id, tsrm_win32_globals *, v)
|
||||
TSRMLS_CACHE_EXTERN();
|
||||
# define TWG(v) TSRMG(win32_globals_id, tsrm_win32_globals *, v)
|
||||
#else
|
||||
# define TWG(v) (win32_globals.v)
|
||||
#endif
|
||||
@@ -94,15 +90,15 @@ TSRMLS_CACHE_EXTERN();
|
||||
#define SHM_RND FILE_MAP_WRITE
|
||||
#define SHM_REMAP FILE_MAP_COPY
|
||||
|
||||
char * tsrm_win32_get_path_sid_key(const char *pathname );
|
||||
char * tsrm_win32_get_path_sid_key(const char *pathname TSRMLS_DC);
|
||||
|
||||
TSRM_API void tsrm_win32_startup(void);
|
||||
TSRM_API void tsrm_win32_shutdown(void);
|
||||
|
||||
TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, char *env);
|
||||
TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, char *env TSRMLS_DC);
|
||||
TSRM_API FILE *popen(const char *command, const char *type);
|
||||
TSRM_API int pclose(FILE *stream);
|
||||
TSRM_API int tsrm_win32_access(const char *pathname, int mode);
|
||||
TSRM_API int tsrm_win32_access(const char *pathname, int mode TSRMLS_DC);
|
||||
TSRM_API int win32_utime(const char *filename, struct utimbuf *buf);
|
||||
|
||||
TSRM_API int shmget(int key, int size, int flags);
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
+39
-265
@@ -1,291 +1,65 @@
|
||||
$Id$
|
||||
|
||||
PHP 7.0 INTERNALS UPGRADE NOTES
|
||||
UPGRADE NOTES - PHP X.Y
|
||||
|
||||
0. Wiki Examples
|
||||
1. Internal API changes
|
||||
e. New data types
|
||||
f. zend_parse_parameters() specs
|
||||
g. sprintf() formats
|
||||
h. HashTable API
|
||||
i. New portable macros for large file support
|
||||
j. New portable macros for integers
|
||||
k. get_class_entry object handler info
|
||||
l. get_class_name object handler info
|
||||
m. Other portable macros info
|
||||
n. ZEND_ENGINE_2 removal
|
||||
o. Updated final class modifier
|
||||
p. TSRM changes
|
||||
q. gc_collect_cycles() is now hookable
|
||||
r. PDO uses size_t for lengths
|
||||
s. Resource API changes
|
||||
t. Optimized strings concatenation.
|
||||
u. Streams changes
|
||||
a. Streams pooling API
|
||||
b. Lowercasing and locales
|
||||
|
||||
2. Build system changes
|
||||
a. Unix build system changes
|
||||
b. Windows build system changes
|
||||
|
||||
3. Module changes
|
||||
|
||||
================
|
||||
0. Wiki Examples
|
||||
================
|
||||
|
||||
The wiki contains multiple examples and further explanations of the internal
|
||||
changes. See: https://wiki.php.net/phpng-upgrading
|
||||
|
||||
|
||||
========================
|
||||
1. Internal API changes
|
||||
========================
|
||||
|
||||
e. New data types
|
||||
a. Streams pooling API
|
||||
|
||||
String
|
||||
The streams pooling API has been removed. The following functions no longer
|
||||
exist:
|
||||
|
||||
Besides the old way of accepting the strings with 's', the new 'S' ZPP spec
|
||||
was introduced. It expects an argument of the type zend_string *. String lengths
|
||||
in it are bound to the size_t datatype.
|
||||
PHPAPI int php_stream_context_get_link(php_stream_context *context,
|
||||
const char *hostent, php_stream **stream);
|
||||
PHPAPI int php_stream_context_set_link(php_stream_context *context,
|
||||
const char *hostent, php_stream *stream);
|
||||
PHPAPI int php_stream_context_del_link(php_stream_context *context,
|
||||
php_stream *stream);
|
||||
|
||||
Integer types
|
||||
b. Lowercasing and locales
|
||||
|
||||
Integers do no more depend on the firm 'long' type. Instead a platform
|
||||
dependent integer type is used, it is called zend_long. That datatype is
|
||||
defined dynamically to guarantee the consistent 64 bit support. The zval
|
||||
field representing user land integer it bound to zend_long.
|
||||
The lowercasing functions in zend_operators.c were split into those that do
|
||||
lowercasing according to locale rules and those that do ASCII lowercasing.
|
||||
ASCII:
|
||||
|
||||
Signed integer is defined as zend_long, unsigned integer as zend_ulong
|
||||
inside Zend.
|
||||
zend_str_tolower_copy
|
||||
zend_str_tolower_dup
|
||||
zend_str_tolower
|
||||
zend_binary_strcasecmp
|
||||
zend_binary_strncasecmp
|
||||
|
||||
Other datatypes
|
||||
Locale-based:
|
||||
zend_binary_strncasecmp_l
|
||||
zend_binary_strcasecmp_l
|
||||
zend_binary_zval_strcasecmp
|
||||
zend_binary_zval_strncasecmp
|
||||
string_compare_function_ex
|
||||
string_case_compare_function
|
||||
|
||||
zend_off_t - portable off_t analogue
|
||||
zend_stat_t - portable 'struct stat' analogue
|
||||
Internal engine lowercasing will be using ASCII-only rules. User-facing functions,
|
||||
such as strcasecmp, will be using locale rules.
|
||||
|
||||
These datatypes are declared to be portable across platforms. Thus, direct
|
||||
usage of the functions like fseek, stat, etc. as well as direct usage of
|
||||
off_t and struct stat is strongly not recommended. Instead the portable
|
||||
macros should be used.
|
||||
Two new functions - zend_binary_strncasecmp_l and zend_binary_strcasecmp_l - added as
|
||||
locale-based counterparts to zend_binary_strcasecmp and zend_binary_strncasecmp.
|
||||
|
||||
zend_fseek - portable fseek equivalent
|
||||
zend_ftell - portable ftell equivalent
|
||||
zend_lseek - portable lseek equivalent
|
||||
zend_fstat - portable fstat equivalent
|
||||
zend_stat - portable stat equivalent
|
||||
========================
|
||||
2. Build system changes
|
||||
========================
|
||||
|
||||
f. zend_parse_parameters() specs
|
||||
a. Unix build system changes
|
||||
-
|
||||
|
||||
The new spec 'S' introduced, which expects an argument of type zend_string *.
|
||||
The 'l' spec expects a parameter of the type zend_long, not long anymore.
|
||||
The 's' spec expects parameters of the type char * and size_t, no int anymore.
|
||||
|
||||
g. sprintf() formats
|
||||
|
||||
New printf modifier 'p' was implemented to platform independently output zend_long,
|
||||
zend_ulong and php_size_t datatypes. That modifier can be used with 'd', 'u', 'x' and 'o'
|
||||
printf format specs with spprintf, snprintf and the wrapping printf implementations.
|
||||
%pu is sufficient for both zend_ulong and php_size_t. the code using %p spec to output
|
||||
pointer address might need to be enclosed into #ifdef when it unlickily followed by 'd',
|
||||
'u', 'x' or 'o'.
|
||||
|
||||
The only exceptions are the snprintf and zend_sprintf functions yet, because in some cases
|
||||
they can use the implemenations available on the system, not the PHP one. With snprintf the
|
||||
macros ZEND_INT_FMT and ZEND_UINT_FMT should be used.
|
||||
|
||||
h. HashTable API
|
||||
|
||||
Datatype for array indexes was changed to zend_ulong, for string keys to zend_string *.
|
||||
|
||||
i. New portable macros for large file support
|
||||
|
||||
Function(s) Alias Comment
|
||||
stat, _stat64 zend_stat for use with zend_stat_t
|
||||
fstat, _fstat64 zend_fstat for use with zend_stat_t
|
||||
lseek, _lseeki64 zend_lseek for use with zend_off_t
|
||||
ftell, _ftelli64 zend_ftell for use with zend_off_t
|
||||
fseek, _fseeki64 zend_fseek for use with zend_off_t
|
||||
|
||||
j. New portable macros for integers
|
||||
|
||||
Function(s) Alias Comment
|
||||
snprintf with "%ld" or "%lld", _ltoa_s, _i64toa_s ZEND_LTOA for use with zend_long
|
||||
atol, atoll, _atoi64 ZEND_ATOL for use with zend_long
|
||||
strtol, strtoll, _strtoi64 ZEND_STRTOL for use with zend_long
|
||||
strtoul, strtoull, _strtoui64 ZEND_STRTOUL for use with zend_long
|
||||
abs, llabs, _abs64 ZEND_ABS for use with zend_long
|
||||
- ZEND_LONG_MAX replaces LONG_MAX where appropriate
|
||||
- ZEND_LONG_MIN replaces LONG_MIN where appropriate
|
||||
- ZEND_ULONG_MAX replaces ULONG_MAX where appropriate
|
||||
- SIZEOF_ZEND_LONG reworked SIZEOF_ZEND_LONG representing the size of zend_long datatype
|
||||
- ZEND_SIZE_MAX Max value of size_t
|
||||
- Z_L casts an integral constant to zend_long
|
||||
- Z_UL casts an integral constant to zend_ulong
|
||||
|
||||
The macro ZEND_ENABLE_ZVAL_LONG64 reveals whether zval operates on 64 or 32 bit integer.
|
||||
|
||||
k. The get_class_entry object handler is no longer available. Instead
|
||||
zend_object.ce is always used.
|
||||
|
||||
l. The get_class_name object handler is now only used for displaying class
|
||||
names in debugging functions like var_dump(). It is no longer used in
|
||||
get_class(), get_parent_class() or similar.
|
||||
|
||||
The handler is now obligatory, no longer accepts a `parent` argument and
|
||||
must return a non-NULL zend_string*, which will be released by the caller.
|
||||
|
||||
m. Other portable macros info
|
||||
|
||||
ZEND_SECURE_ZERO - zeroes chunk of memory
|
||||
ZEND_VALID_SOCKET - validates a php_socket_t variable
|
||||
|
||||
ZEND_FASTCALL is defined to use __vectorcall convention on VS2013 and above
|
||||
ZEND_NORETURN is defined as __declspec(noreturn) on VS
|
||||
|
||||
n. The ZEND_ENGINE_2 macro has been removed. A ZEND_ENGINE_3 macro has been added.
|
||||
b. Windows build system changes
|
||||
- Drop Windows XP and 2003 support.
|
||||
|
||||
o. Removed ZEND_ACC_FINAL_CLASS in favour of ZEND_ACC_FINAL, turning final class
|
||||
modifier now a different class entry flag. Update your extensions.
|
||||
|
||||
p. TSRM changes
|
||||
|
||||
The TSRM layer undergone significant changes. It is not necessary anymore to
|
||||
pass the tsrm_ls pointer explicitly. The TSRMLS_* macros should not be used
|
||||
in any new developments.
|
||||
|
||||
The recommended way accessing globals in TS builds is by implementing it
|
||||
to use a local thread unique pointer to the corresponding data pool. These
|
||||
are the new macros that serve to achieve this goal:
|
||||
|
||||
- ZEND_TSRMG - based on TSRMG and if static pointer for data pool access is
|
||||
implemented, will use it
|
||||
- ZEND_TSRMLS_CACHE_EXTERN - to be used in a header shared across multiple
|
||||
C/C++ files
|
||||
- ZEND_TSRMLS_CACHE_DEFINE - to be used in the main extension C/C++ file
|
||||
- ZEND_TSRMLS_CACHE_UPDATE - to be integrated at the top of the globals
|
||||
ctor or RINIT function
|
||||
- ZEND_ENABLE_STATIC_TSRMLS_CACHE - to be used in the config.[m4|w32] for
|
||||
enabling the globals access per thread unique pointer
|
||||
- TSRMLS_CACHE - expands to the variable name which links to the thread
|
||||
unique data pool
|
||||
|
||||
Note that usually it will work without implementing the globals access per
|
||||
a thread unique pointer, however it might cause a slowdown. The reason is
|
||||
that the access model to the extension/SAPI own globals as well as the
|
||||
access to the core globals is determined in the compilation phase depending
|
||||
on whether ZEND_ENABLE_STATIC_TSRMLS_CACHE macro is defined.
|
||||
|
||||
Due to the current compiler evolution state, the TSRMLS_CACHE pointer
|
||||
(when implemented) has to be present and updated in every binary unit which
|
||||
is not compiled statically into PHP. So any DLL, DSO, EXE, etc. has to take
|
||||
care about defining and updating it's TSRMLS cache. An update should happen
|
||||
before any globals was accessed.
|
||||
|
||||
Porting an extension or SAPI is usually as easy as removing all the TSRMLS_*
|
||||
occurrences and integrating the macros mentioned above. However if tsrm_ls
|
||||
is used explicitly, its usage can be considered obsolete in most cases.
|
||||
Additionally, if an extension triggers its own threads, TSRMLS_CACHE shouldn't
|
||||
be passed to that threads directly.
|
||||
|
||||
When working with CTOR/DTOR for the extension globals, only the data passed
|
||||
as parameters should be touched. For example, don't use code like
|
||||
free(MYEXT_G(vars)); inside globals destructor, as it possibly can destroy
|
||||
the data from a wrong thread. Instead use the pointer to the data delivered
|
||||
into the destructor. So the previous example could look like
|
||||
free(my_struct->vars); given the income was casted to (struct my_struct *).
|
||||
|
||||
q. gc_collect_cycles() is now a function pointer, and can be replaced in the
|
||||
same manner as zend_execute_ex() if needed (for example, to include the
|
||||
time spent in the garbage collector in a profiler). The default
|
||||
implementation has been renamed to zend_gc_collect_cycles(), and is
|
||||
exported with ZEND_API.
|
||||
|
||||
r. In accordance with general use of size_t as string length, all PDO API
|
||||
functions now use size_t for string length.
|
||||
|
||||
s. Removed ZEND_REGISTER/FETCH_RESOURCE, use zend_fetch_resource and
|
||||
and zend_register_resource instead, zend_fetch_resource accepts a zend_resource *
|
||||
as first argument, if you still need to fetch a resource from zval, use
|
||||
zend_fetch_resource_ex. More details can be found in Zend/zend_list.c.
|
||||
|
||||
t. Optimized strings concatenation.
|
||||
ZEND_ADD_STRING/VAR/CHAR are replaced with ZEND_ROPE_INIT, ZEND_ROPE_ADD,
|
||||
ZEND_ROPE_END.
|
||||
Instead of reallocation and copying string on each ZEND_ADD_STRING/VAR/CAHR,
|
||||
collect all the strings and then allocate and construct the resulting string once.
|
||||
|
||||
u. Streams changes
|
||||
- It is possible to do blocking reads on Windows pipes. It can be done either
|
||||
using context stream option PHP_STREAM_OPTION_PIPE_BLOCKING or
|
||||
adding STREAM_USE_BLOCKING_PIPE when opening the stream.
|
||||
|
||||
========================
|
||||
2. Build system changes
|
||||
========================
|
||||
|
||||
a. Unix build system changes
|
||||
|
||||
b. Windows build system changes
|
||||
|
||||
- Besides Visual Studio, building with Clang or Intel Composer is now
|
||||
possible. To enable an alternative toolset, add the option
|
||||
--with-toolset=[vs,clang,icc] to the configure line. The default
|
||||
toolset is vs. Still clang or icc need the correct environment
|
||||
which involves many tools from the vs toolset.
|
||||
|
||||
The toolset option is supported by phpize as well.
|
||||
|
||||
AWARENESS The only recommended and supported toolset to produce production
|
||||
ready binaries is Visual Studio. Still other compilers can be used now for
|
||||
testing and analyzing purposes.
|
||||
|
||||
- configure.js now produces response files which are passed to the linker
|
||||
and library manager. This solves the issues with the long command lines
|
||||
which can exceed the OS limit.
|
||||
|
||||
- with clang toolset, an option --with-uncritical-warn-choke is available,
|
||||
which suppresses the most frequent false positive warnings
|
||||
|
||||
- the --with-mp option will by default utilize all the available cores. It's
|
||||
enabled by default for release builds and can be disabled with the special
|
||||
"disable" keyword.
|
||||
|
||||
========================
|
||||
3. Module changes
|
||||
========================
|
||||
|
||||
Session:
|
||||
|
||||
- PS_MOD_UPDATE_TIMESTAMP() session save handler definition is added. New
|
||||
save handler should use PS_MOD_UPDATE_TIMESTAMP() definition. Save handler
|
||||
must not refer/change PS() variables directly from save handler. Use
|
||||
parameters.
|
||||
- PS_MOD()/PS_MOD_SID() macro exist only for transition. Beware these
|
||||
save handlers are less secure and slower than PS_MOD_UPDATE_TIMESTAMP().
|
||||
- PS(invalid_session_id) was removed. It was never worked as it supposed.
|
||||
To report invalid session ID, use PS_VALIDATE_SID() handler.
|
||||
- PS_VALIDATE_SID() defines session ID validation handler. This handler
|
||||
must validate if requested session ID exists in session data storage or not.
|
||||
Do not access PS(id) directly, but use this handler and it's parameter.
|
||||
- PS_UPDATE_TIMESTAMP() defines timestamp updating handler. This handler
|
||||
must update session data timestamp for GC if it is needed. e.g. Memcache
|
||||
updates timestamp on read, so it does not need to update timestamp. Return
|
||||
SUCCESS simply for this case.
|
||||
- PS_CREATE_SID() should check session ID collision. Return NULL for failure.
|
||||
- More documentation can be found in ext/session/mod_files.c as comments.
|
||||
mod_files.c may be used as reference implementation.
|
||||
|
||||
Openssl:
|
||||
- several ext/openssl functions require the inclusion of the applink shim
|
||||
as documented in the OpenSSL FAQ https://www.openssl.org/support/faq.html#PROG2
|
||||
to properly work on Windows. While this primarily affects the OpenSSL
|
||||
functionality, the shim needs to be included into the executable file
|
||||
which loads the extension DLL, not into the extension DLL itself. Alternatively
|
||||
it can be compiled and linked with the main program as a separate object file.
|
||||
More information and explanation in the linked OpenSSL FAQ.
|
||||
|
||||
Thus, this primarily affects any WAMP or other redistributions bundling the
|
||||
official PHP release zipballs or building from sources. The applink shim is
|
||||
already integrated with all the PHP executables from the official distribution
|
||||
starting with 7.0.0beta1.
|
||||
|
||||
+5
-6
@@ -8,19 +8,18 @@ noinst_LTLIBRARIES=libZend.la
|
||||
libZend_la_SOURCES=\
|
||||
zend_language_parser.y zend_language_scanner.l \
|
||||
zend_ini_parser.y zend_ini_scanner.l \
|
||||
zend_alloc.c zend_compile.c zend_constants.c \
|
||||
zend_alloc.c zend_compile.c zend_constants.c zend_dynamic_array.c \
|
||||
zend_execute.c zend_execute_API.c zend_highlight.c zend_llist.c \
|
||||
zend_vm_opcodes.c zend_opcode.c zend_operators.c zend_ptr_stack.c zend_stack.c \
|
||||
zend_opcode.c zend_operators.c zend_ptr_stack.c zend_stack.c \
|
||||
zend_variables.c zend.c zend_API.c zend_extensions.c zend_hash.c \
|
||||
zend_list.c zend_builtin_functions.c zend_sprintf.c \
|
||||
zend_ini.c zend_sort.c zend_objects.c zend_object_handlers.c \
|
||||
zend_list.c zend_indent.c zend_builtin_functions.c zend_sprintf.c \
|
||||
zend_ini.c zend_qsort.c zend_objects.c zend_object_handlers.c \
|
||||
zend_objects_API.c zend_ts_hash.c zend_stream.c \
|
||||
zend_default_classes.c \
|
||||
zend_iterators.c zend_interfaces.c zend_exceptions.c \
|
||||
zend_strtod.c zend_closures.c zend_float.c zend_string.c zend_signal.c \
|
||||
zend_generators.c zend_virtual_cwd.c zend_ast.c zend_smart_str.c
|
||||
zend_generators.c
|
||||
|
||||
libZend_la_CFLAGS = -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1
|
||||
libZend_la_LDFLAGS =
|
||||
libZend_la_LIBADD = @ZEND_EXTRA_LIBS@
|
||||
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ fields and using different execution methods (call threading, switch threading
|
||||
and direct threading). As a result ZE2 got more than 20% speedup on raw PHP
|
||||
code execution (with specialized executor and direct threading execution
|
||||
method). As in most PHP applications raw execution speed isn't the limiting
|
||||
factor but system calls and database calls are, your mileage with this patch
|
||||
factor but system calls and database callls are, your mileage with this patch
|
||||
will vary.
|
||||
|
||||
Most parts of the old zend_execute.c go into zend_vm_def.h. Here you can
|
||||
|
||||
+3
-3
@@ -9,11 +9,11 @@ Modified: 2001-09-17
|
||||
1. Background/Need
|
||||
==================
|
||||
|
||||
Many internal functions of PHP will reject parameters because of their
|
||||
Many internal function of PHP will reject parameters because of their
|
||||
type (the array and variable function come to mind). For userland
|
||||
this is not an easy task as there is no uniform way to do it. An
|
||||
addition to the engine for requiring loose types would allow
|
||||
developers to know that the data passed to their functions are of the
|
||||
delevopers to know that the data passed to their functions is of the
|
||||
correct type and reduce the need for duplicating the same code in
|
||||
every function to check for the type of data.
|
||||
|
||||
@@ -57,7 +57,7 @@ function foo (array $var){
|
||||
===========
|
||||
|
||||
Mis-matches in type should be reported as fatal errors and should halt
|
||||
the execution of a script as that function cannot be run and code
|
||||
the execution of a script as that function can not be run and code
|
||||
following could not reliably run.
|
||||
|
||||
|
||||
|
||||
+4
-4
@@ -435,7 +435,7 @@ Changes in the Zend Engine 2.0
|
||||
that of other object-oriented languages, such as Java: When the
|
||||
last reference to an object is destroyed the object's
|
||||
destructor, which is a class method name __destruct() that
|
||||
receives no parameters, is called before the object is freed
|
||||
recieves no parameters, is called before the object is freed
|
||||
from memory.
|
||||
|
||||
Example:
|
||||
@@ -1103,7 +1103,7 @@ Changes in the Zend Engine 1.0
|
||||
Use ob_start() to begin output buffering, ob_end_flush() to end
|
||||
buffering and send out the buffered contents, ob_end_clean() to
|
||||
end buffering without sending the buffered contents, and
|
||||
ob_get_contents() to retrieve the current contents of the output
|
||||
ob_get_contents() to retreive the current contents of the output
|
||||
buffer. Header information (header(), content type, cookies) are
|
||||
not buffered. By turning on output buffering, you can
|
||||
effectively send header information all throughout your file,
|
||||
@@ -1136,7 +1136,7 @@ Changes in the Zend Engine 1.0
|
||||
(supports breakpoints, expression evaluation, step-in/over,
|
||||
function call backtrace, and more).
|
||||
|
||||
The Zend Engine claims 100% compatibility with the engine of PHP
|
||||
The Zend Engine claims 100% compatability with the engine of PHP
|
||||
3.0, and is shamelessly lying about it. Here's why:
|
||||
|
||||
* Static variable initializers only accept scalar values
|
||||
@@ -1161,6 +1161,6 @@ Changes in the Zend Engine 1.0
|
||||
printed the letter { and the contents of the variable $somevar in
|
||||
PHP 3.0), it will result in a parse error with the Zend Engine.
|
||||
In this case, you would have to change the code to print
|
||||
"\{$somevar"; This incompatibility is due to the full variable
|
||||
"\{$somevar"; This incompatability is due to the full variable
|
||||
reference within quoted strings feature added in the Zend
|
||||
Engine.
|
||||
+610
@@ -0,0 +1,610 @@
|
||||
# Microsoft Developer Studio Project File - Name="Zend" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
||||
|
||||
CFG=Zend - Win32 Release_inline
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Zend.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Zend.mak" CFG="Zend - Win32 Release_inline"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "Zend - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "Zend - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "Zend - Win32 Release_inline" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "Zend - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDebug" /D "_MBCS" /D "_LIB" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug" /D "_LIB" /D "Zend_EXPORTS" /D ZEND_DEBUG=0 /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /D "ZEND_WIN32" /FR /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x40d /d "NDebug"
|
||||
# ADD RSC /l 0x40d /d "NDebug"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "Zend - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_Debug" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /D "_Debug" /D "_LIB" /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D ZEND_DEBUG=1 /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x40d /d "_Debug"
|
||||
# ADD RSC /l 0x40d /d "_Debug"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "Zend - Win32 Release_inline"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Output_Dir "Zend___Win32_Release_inline"
|
||||
# PROP BASE Intermediate_Dir "Zend___Win32_Release_inline"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Output_Dir "Release_inline"
|
||||
# PROP Intermediate_Dir "Release_inline"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug" /D "_LIB" /D "Zend_EXPORTS" /D ZEND_DEBUG=0 /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /FR /FD /c
|
||||
# SUBTRACT BASE CPP /YX
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug" /D "_LIB" /D "Zend_EXPORTS" /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D ZEND_DEBUG=0 /D "ZEND_WIN32_FORCE_INLINE" /D "WIN32" /D "_MBCS" /D "ZEND_WIN32" /FR /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x40d /d "NDebug"
|
||||
# ADD RSC /l 0x40d /d "NDebug"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "Zend - Win32 Release"
|
||||
# Name "Zend - Win32 Debug"
|
||||
# Name "Zend - Win32 Release_inline"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_alloc.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_API.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_builtin_functions.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_closures.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_compile.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_constants.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_default_classes.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_dynamic_array.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_execute.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_execute_API.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_extensions.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_float.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_generators.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_hash.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_highlight.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_indent.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ini.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ini_parser.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ini_scanner.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_interfaces.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend_language_parser.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend_language_scanner.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_list.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_llist.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_object_handlers.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_objects.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_objects_API.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_opcode.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_operators.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ptr_stack.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_qsort.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_sprintf.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_stack.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_stream.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_string.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_strtod.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ts_hash.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_variables.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\FlexLexer.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_alloc.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_API.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_builtin_functions.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_compile.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_config.w32.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_constants.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_default_classes.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_dynamic_array.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_errors.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_execute.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_execute_locks.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_extensions.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_globals.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_globals_macros.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_hash.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_highlight.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_indent.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ini.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ini_parser.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ini_scanner.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_interfaces.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_istdiostream.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend_language_parser.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend_language_scanner.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_list.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_llist.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_modules.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_object_handlers.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_objects.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_objects_API.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_operators.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ptr_stack.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_qsort.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_stack.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_stream.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_string.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_strtod.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ts_hash.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_variables.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Parsers"
|
||||
|
||||
# PROP Default_Filter "y"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ini_parser.y
|
||||
|
||||
!IF "$(CFG)" == "Zend - Win32 Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "Zend - Win32 Debug"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=.\zend_ini_parser.y
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend_ini_parser.c -v -d -p ini_ zend_ini_parser.y
|
||||
|
||||
"$(InputDir)\zend_ini_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend_ini_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "Zend - Win32 Release_inline"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend_language_parser.y"
|
||||
|
||||
!IF "$(CFG)" == "Zend - Win32 Release"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=".\zend_language_parser.y"
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y
|
||||
|
||||
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "Zend - Win32 Debug"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=".\zend_language_parser.y"
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y
|
||||
|
||||
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "Zend - Win32 Release_inline"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=".\zend_language_parser.y"
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y
|
||||
|
||||
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Scanners"
|
||||
|
||||
# PROP Default_Filter "l"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\flex.skl
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ini_scanner.l
|
||||
|
||||
!IF "$(CFG)" == "Zend - Win32 Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "Zend - Win32 Debug"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=.\zend_ini_scanner.l
|
||||
|
||||
"zend_ini_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -B -i -Sflex.skl -Pini_ -ozend_ini_scanner.c zend_ini_scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "Zend - Win32 Release_inline"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend_language_scanner.l"
|
||||
|
||||
!IF "$(CFG)" == "Zend - Win32 Release"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=".\zend_language_scanner.l"
|
||||
|
||||
"zend_language_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -i -Pzend -ozend_language_scanner.c zend_language_scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "Zend - Win32 Debug"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=".\zend_language_scanner.l"
|
||||
|
||||
"zend_language_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -i -Pzend -ozend_language_scanner.c zend_language_scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "Zend - Win32 Release_inline"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=".\zend_language_scanner.l"
|
||||
|
||||
"zend_language_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -i -Pzend -ozend_language_scanner.c zend_language_scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Text Files"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ZEND_BUGS
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ZEND_CHANGES
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ZEND_TODO
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resources"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend.ico
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
+31
-61
@@ -153,6 +153,14 @@ AC_ARG_ENABLE(debug,
|
||||
|
||||
AC_DEFUN([LIBZEND_OTHER_CHECKS],[
|
||||
|
||||
AC_ARG_WITH(zend-vm,
|
||||
[ --with-zend-vm=TYPE Set virtual machine dispatch method. Type is
|
||||
one of "CALL", "SWITCH" or "GOTO" [TYPE=CALL]],[
|
||||
PHP_ZEND_VM=$withval
|
||||
],[
|
||||
PHP_ZEND_VM=CALL
|
||||
])
|
||||
|
||||
AC_ARG_ENABLE(maintainer-zts,
|
||||
[ --enable-maintainer-zts Enable thread safety - for code maintainers only!!],[
|
||||
ZEND_MAINTAINER_ZTS=$enableval
|
||||
@@ -168,6 +176,9 @@ AC_ARG_ENABLE(inline-optimization,
|
||||
ZEND_INLINE_OPTIMIZATION=yes
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING([virtual machine dispatch method])
|
||||
AC_MSG_RESULT($PHP_ZEND_VM)
|
||||
|
||||
AC_MSG_CHECKING(whether to enable thread-safety)
|
||||
AC_MSG_RESULT($ZEND_MAINTAINER_ZTS)
|
||||
|
||||
@@ -177,6 +188,19 @@ AC_MSG_RESULT($ZEND_INLINE_OPTIMIZATION)
|
||||
AC_MSG_CHECKING(whether to enable Zend debugging)
|
||||
AC_MSG_RESULT($ZEND_DEBUG)
|
||||
|
||||
case $PHP_ZEND_VM in
|
||||
SWITCH)
|
||||
AC_DEFINE(ZEND_VM_KIND,ZEND_VM_KIND_SWITCH,[virtual machine dispatch method])
|
||||
;;
|
||||
GOTO)
|
||||
AC_DEFINE(ZEND_VM_KIND,ZEND_VM_KIND_GOTO,[virtual machine dispatch method])
|
||||
;;
|
||||
*)
|
||||
PHP_ZEND_VM=CALL
|
||||
AC_DEFINE(ZEND_VM_KIND,ZEND_VM_KIND_CALL,[virtual machine dispatch method])
|
||||
;;
|
||||
esac
|
||||
|
||||
if test "$ZEND_DEBUG" = "yes"; then
|
||||
AC_DEFINE(ZEND_DEBUG,1,[ ])
|
||||
echo " $CFLAGS" | grep ' -g' >/dev/null || DEBUG_CFLAGS="-g"
|
||||
@@ -401,65 +425,11 @@ if test -r "/dev/urandom" && test -c "/dev/urandom"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(whether /dev/arandom exists)
|
||||
if test -r "/dev/arandom" && test -c "/dev/arandom"; then
|
||||
AC_DEFINE([HAVE_DEV_ARANDOM], 1, [Define if the target system has /dev/arandom device])
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_CHECKING(whether /dev/arandom exists)
|
||||
if test -r "/dev/arandom" && test -c "/dev/arandom"; then
|
||||
AC_DEFINE([HAVE_DEV_ARANDOM], 1, [Define if the target system has /dev/arandom device])
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(gcc-global-regs,
|
||||
[ --disable-gcc-global-regs
|
||||
whether to enable GCC global register variables],[
|
||||
ZEND_GCC_GLOBAL_REGS=$enableval
|
||||
],[
|
||||
ZEND_GCC_GLOBAL_REGS=yes
|
||||
])
|
||||
AC_MSG_CHECKING(for global register variables support)
|
||||
if test "$ZEND_GCC_GLOBAL_REGS" != "no"; then
|
||||
AC_TRY_COMPILE([
|
||||
],[
|
||||
#if defined(__GNUC__)
|
||||
# define ZEND_GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
|
||||
#else
|
||||
# define ZEND_GCC_VERSION 0
|
||||
#endif
|
||||
#if defined(__GNUC__) && ZEND_GCC_VERSION >= 4008 && defined(i386)
|
||||
# define ZEND_VM_FP_GLOBAL_REG "%esi"
|
||||
# define ZEND_VM_IP_GLOBAL_REG "%edi"
|
||||
#elif defined(__GNUC__) && ZEND_GCC_VERSION >= 4008 && defined(__x86_64__)
|
||||
# define ZEND_VM_FP_GLOBAL_REG "%r14"
|
||||
# define ZEND_VM_IP_GLOBAL_REG "%r15"
|
||||
#elif defined(__GNUC__) && ZEND_GCC_VERSION >= 4008 && defined(__powerpc64__)
|
||||
# define ZEND_VM_FP_GLOBAL_REG "r28"
|
||||
# define ZEND_VM_IP_GLOBAL_REG "r29"
|
||||
#else
|
||||
# error "global register variables are not supported"
|
||||
#endif
|
||||
typedef int (*opcode_handler_t)(void);
|
||||
register void *FP __asm__(ZEND_VM_FP_GLOBAL_REG);
|
||||
register const opcode_handler_t *IP __asm__(ZEND_VM_IP_GLOBAL_REG);
|
||||
int emu(const opcode_handler_t *ip, void *fp) {
|
||||
const opcode_handler_t *orig_ip = IP;
|
||||
void *orig_fp = FP;
|
||||
IP = ip;
|
||||
FP = fp;
|
||||
while ((*ip)());
|
||||
FP = orig_fp;
|
||||
IP = orig_ip;
|
||||
}
|
||||
], [
|
||||
ZEND_GCC_GLOBAL_REGS=yes
|
||||
], [
|
||||
ZEND_GCC_GLOBAL_REGS=no
|
||||
])
|
||||
fi
|
||||
if test "$ZEND_GCC_GLOBAL_REGS" = "yes"; then
|
||||
AC_DEFINE([HAVE_GCC_GLOBAL_REGS], 1, [Define if the target system has support for global register variables])
|
||||
else
|
||||
HAVE_GCC_GLOBAL_REGS=no
|
||||
fi
|
||||
AC_MSG_RESULT($ZEND_GCC_GLOBAL_REGS)
|
||||
+740
@@ -0,0 +1,740 @@
|
||||
# Microsoft Developer Studio Project File - Name="ZendTS" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
||||
|
||||
CFG=ZendTS - Win32 Release_TSDbg
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "ZendTS.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "ZendTS.mak" CFG="ZendTS - Win32 Release_TSDbg"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "ZendTS - Win32 Release_TS" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "ZendTS - Win32 Debug_TS" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "ZendTS - Win32 Release_TS_inline" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "ZendTS - Win32 Release_TSDbg" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "ZendTS - Win32 Release_TS"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Output_Dir "Release_TS"
|
||||
# PROP BASE Intermediate_Dir "Release_TS"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Output_Dir "Release_TS"
|
||||
# PROP Intermediate_Dir "Release_TS"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDebug_TS" /D "_MBCS" /D "_LIB" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D ZEND_DEBUG=0 /D _WIN32_WINNT=0x400 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x40d /d "NDebug_TS"
|
||||
# ADD RSC /l 0x40d /d "NDebug_TS"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Debug_TS"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Output_Dir "Debug_TS"
|
||||
# PROP BASE Intermediate_Dir "Debug_TS"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Output_Dir "Debug_TS"
|
||||
# PROP Intermediate_Dir "Debug_TS"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_Debug_TS" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /D "_Debug_TS" /D ZEND_DEBUG=1 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x40d /d "_Debug_TS"
|
||||
# ADD RSC /l 0x40d /d "_Debug_TS"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TS_inline"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Output_Dir "ZendTS___Win32_Release_TS_inline"
|
||||
# PROP BASE Intermediate_Dir "ZendTS___Win32_Release_TS_inline"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Output_Dir "Release_TS_inline"
|
||||
# PROP Intermediate_Dir "Release_TS_inline"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "WIN32" /D "_MBCS" /D ZEND_DEBUG=0 /FR /FD /c
|
||||
# SUBTRACT BASE CPP /YX
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D ZEND_DEBUG=0 /D "ZEND_WIN32_FORCE_INLINE" /D _WIN32_WINNT=0x400 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x40d /d "NDebug_TS"
|
||||
# ADD RSC /l 0x40d /d "NDebug_TS"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TSDbg"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Output_Dir "ZendTS___Win32_Release_TSDbg"
|
||||
# PROP BASE Intermediate_Dir "ZendTS___Win32_Release_TSDbg"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Output_Dir "Release_TSDbg"
|
||||
# PROP Intermediate_Dir "Release_TSDbg"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D ZEND_DEBUG=0 /D _WIN32_WINNT=0x400 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /FD /c
|
||||
# SUBTRACT BASE CPP /YX
|
||||
# ADD CPP /nologo /MD /W3 /GX /Zi /Od /I "." /D "NDebug_TS" /D ZEND_DEBUG=0 /D _WIN32_WINNT=0x400 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x40d /d "NDebug_TS"
|
||||
# ADD RSC /l 0x40d /d "NDebug_TS"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "ZendTS - Win32 Release_TS"
|
||||
# Name "ZendTS - Win32 Debug_TS"
|
||||
# Name "ZendTS - Win32 Release_TS_inline"
|
||||
# Name "ZendTS - Win32 Release_TSDbg"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_alloc.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_API.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_builtin_functions.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_closures.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_compile.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_constants.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_default_classes.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_dynamic_array.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_exceptions.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_execute.c
|
||||
# ADD CPP /I "..\TSRM"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_execute_API.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_extensions.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_generators.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_hash.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_highlight.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_indent.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ini.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ini_parser.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ini_scanner.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_interfaces.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_iterators.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend_language_parser.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend_language_scanner.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_list.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_llist.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_object_handlers.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_objects.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_objects_API.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_opcode.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_operators.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ptr_stack.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_qsort.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_sprintf.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_stack.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_stream.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_string.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_strtod.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ts_hash.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_variables.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\FlexLexer.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_alloc.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_API.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_builtin_functions.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_compile.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_config.w32.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_constants.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_default_classes.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_dynamic_array.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_errors.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_exceptions.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_execute.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_extensions.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_globals.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_globals_macros.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_hash.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_highlight.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_indent.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ini.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ini_parser.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ini_scanner.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_interfaces.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_istdiostream.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_iterators.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend_language_parser.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend_language_scanner.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_list.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_llist.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_modules.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_object_handlers.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_objects.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_objects_API.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_operators.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ptr_stack.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_qsort.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_stack.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_stream.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_string.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_strtod.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ts_hash.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_variables.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Parsers"
|
||||
|
||||
# PROP Default_Filter "y"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ini_parser.y
|
||||
|
||||
!IF "$(CFG)" == "ZendTS - Win32 Release_TS"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=.\zend_ini_parser.y
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend_ini_parser.c -v -d -p ini_ zend_ini_parser.y
|
||||
|
||||
"$(InputDir)\zend_ini_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend_ini_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Debug_TS"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=.\zend_ini_parser.y
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend_ini_parser.c -v -d -p ini_ zend_ini_parser.y
|
||||
|
||||
"$(InputDir)\zend_ini_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend_ini_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TS_inline"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=.\zend_ini_parser.y
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend_ini_parser.c -v -d -p ini_ zend_ini_parser.y
|
||||
|
||||
"$(InputDir)\zend_ini_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend_ini_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TSDbg"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=.\zend_ini_parser.y
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend_ini_parser.c -v -d -p ini_ zend_ini_parser.y
|
||||
|
||||
"$(InputDir)\zend_ini_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend_ini_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend_language_parser.y"
|
||||
|
||||
!IF "$(CFG)" == "ZendTS - Win32 Release_TS"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=".\zend_language_parser.y"
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y
|
||||
|
||||
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Debug_TS"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=".\zend_language_parser.y"
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y
|
||||
|
||||
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TS_inline"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=".\zend_language_parser.y"
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y
|
||||
|
||||
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TSDbg"
|
||||
|
||||
# Begin Custom Build
|
||||
InputDir=.
|
||||
InputPath=".\zend_language_parser.y"
|
||||
|
||||
BuildCmds= \
|
||||
bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y
|
||||
|
||||
"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
$(BuildCmds)
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Scanners"
|
||||
|
||||
# PROP Default_Filter "l"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\flex.skl
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend_ini_scanner.l
|
||||
|
||||
!IF "$(CFG)" == "ZendTS - Win32 Release_TS"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=.\zend_ini_scanner.l
|
||||
|
||||
"zend_ini_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -B -i -Sflex.skl -Pini_ -ozend_ini_scanner.c zend_ini_scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Debug_TS"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=.\zend_ini_scanner.l
|
||||
|
||||
"zend_ini_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -B -i -Sflex.skl -Pini_ -ozend_ini_scanner.c zend_ini_scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TS_inline"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=.\zend_ini_scanner.l
|
||||
|
||||
"zend_ini_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -B -i -Sflex.skl -Pini_ -ozend_ini_scanner.c zend_ini_scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TSDbg"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=.\zend_ini_scanner.l
|
||||
|
||||
"zend_ini_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -B -i -Sflex.skl -Pini_ -ozend_ini_scanner.c zend_ini_scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\zend_language_scanner.l"
|
||||
|
||||
!IF "$(CFG)" == "ZendTS - Win32 Release_TS"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=".\zend_language_scanner.l"
|
||||
|
||||
"zend_language_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -B -i -Sflex.skl -Pzend -ozend_language_scanner.c zend_language_scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Debug_TS"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=".\zend_language_scanner.l"
|
||||
|
||||
"zend_language_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -B -i -Sflex.skl -Pzend -ozend_language_scanner.c zend_language_scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TS_inline"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=".\zend_language_scanner.l"
|
||||
|
||||
"zend_language_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -B -i -Sflex.skl -Pzend -ozend_language_scanner.c zend_language_scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TSDbg"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=".\zend_language_scanner.l"
|
||||
|
||||
"zend_language_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
flex -B -i -Sflex.skl -Pzend -ozend_language_scanner.c zend_language_scanner.l
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Text Files"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\LICENSE
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ZEND_BUGS
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ZEND_CHANGES
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resources"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\zend.ico
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
+10
-19
@@ -3,13 +3,8 @@ dnl
|
||||
dnl This file contains local autoconf functions.
|
||||
|
||||
AC_DEFUN([LIBZEND_BISON_CHECK],[
|
||||
# we only support certain bison versions;
|
||||
# min: 2.4 (i.e. 204, major * 100 + minor for easier comparison)
|
||||
bison_version_min="204"
|
||||
# non-working versions, e.g. "3.0 3.2";
|
||||
# remove "none" when introducing the first incompatible bison version an
|
||||
# separate any following additions by spaces
|
||||
bison_version_exclude=""
|
||||
# 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 2.5.1 2.6 2.6.1 2.6.2"
|
||||
|
||||
# for standalone build of Zend Engine
|
||||
test -z "$SED" && SED=sed
|
||||
@@ -17,27 +12,23 @@ AC_DEFUN([LIBZEND_BISON_CHECK],[
|
||||
bison_version=none
|
||||
if test "$YACC"; then
|
||||
AC_CACHE_CHECK([for bison version], php_cv_bison_version, [
|
||||
bison_version_vars=`$YACC --version 2> /dev/null | grep 'GNU Bison' | cut -d ' ' -f 4 | $SED -e 's/\./ /g' | tr -d a-z`
|
||||
bison_version_vars=`bison --version 2> /dev/null | grep 'GNU Bison' | cut -d ' ' -f 4 | $SED -e 's/\./ /' | tr -d a-z`
|
||||
php_cv_bison_version=invalid
|
||||
if test -n "$bison_version_vars"; then
|
||||
set $bison_version_vars
|
||||
bison_version="${1}.${2}"
|
||||
bison_version_num="`expr ${1} \* 100 + ${2}`"
|
||||
if test $bison_version_num -ge $bison_version_min; then
|
||||
php_cv_bison_version="$bison_version (ok)"
|
||||
for bison_check_version in $bison_version_exclude; do
|
||||
if test "$bison_version" = "$bison_check_version"; then
|
||||
php_cv_bison_version=invalid
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
for bison_check_version in $bison_version_list; do
|
||||
if test "$bison_version" = "$bison_check_version"; then
|
||||
php_cv_bison_version="$bison_check_version (ok)"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
])
|
||||
fi
|
||||
case $php_cv_bison_version in
|
||||
""|invalid[)]
|
||||
bison_msg="This bison version is not supported for regeneration of the Zend/PHP parsers (found: $bison_version, min: $bison_version_min, excluded: $bison_version_exclude)."
|
||||
bison_msg="bison versions supported for regeneration of the Zend/PHP parsers: $bison_version_list (found: $bison_version)."
|
||||
AC_MSG_WARN([$bison_msg])
|
||||
YACC="exit 0;"
|
||||
;;
|
||||
|
||||
+3
-3
@@ -90,10 +90,10 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
#define zend_isinf(a) 0
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_ISFINITE) || defined(isfinite)
|
||||
#define zend_finite(a) isfinite(a)
|
||||
#elif defined(HAVE_FINITE)
|
||||
#ifdef HAVE_FINITE
|
||||
#define zend_finite(a) finite(a)
|
||||
#elif defined(HAVE_ISFINITE) || defined(isfinite)
|
||||
#define zend_finite(a) isfinite(a)
|
||||
#elif defined(fpclassify)
|
||||
#define zend_finite(a) ((fpclassify((a))!=FP_INFINITE&&fpclassify((a))!=FP_NAN)?1:0)
|
||||
#else
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@ int(0)
|
||||
int(2)
|
||||
int(0)
|
||||
|
||||
Warning: Missing argument 2 for test3()%s
|
||||
Warning: Missing argument 2 for test3() in %s on line %d
|
||||
int(1)
|
||||
int(2)
|
||||
int(1)
|
||||
|
||||
+1
-1
@@ -85,7 +85,7 @@ bool(false)
|
||||
Warning: func_get_arg(): Argument 1 not passed to function in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: Missing argument 2 for test3()%s
|
||||
Warning: Missing argument 2 for test3() in %s on line %d
|
||||
int(1)
|
||||
|
||||
Warning: func_get_arg(): Argument 1 not passed to function in %s on line %d
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ array(2) {
|
||||
array(0) {
|
||||
}
|
||||
|
||||
Warning: Missing argument 2 for test3()%s
|
||||
Warning: Missing argument 2 for test3() in %s on line %d
|
||||
array(1) {
|
||||
[0]=>
|
||||
int(1)
|
||||
|
||||
+4
-2
@@ -41,9 +41,11 @@ bool(true)
|
||||
|
||||
Notice: Constant test const already defined in %s on line %d
|
||||
bool(false)
|
||||
bool(true)
|
||||
|
||||
Warning: Constants may only evaluate to scalar values or arrays in %s on line %d
|
||||
Warning: Constants may only evaluate to scalar values in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: Constants may only evaluate to scalar values in %s on line %d
|
||||
bool(false)
|
||||
int(1)
|
||||
int(2)
|
||||
|
||||
+2
-2
@@ -30,10 +30,10 @@ var_dump(get_class($f2));
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Deprecated: Non-static method foo::bar() should not be called statically in %s on line %d
|
||||
Strict Standards: Non-static method foo::bar() should not be called statically in %s on line %d
|
||||
string(3) "foo"
|
||||
|
||||
Deprecated: Non-static method foo::bar() should not be called statically in %s on line %d
|
||||
Strict Standards: Non-static method foo::bar() should not be called statically in %s on line %d
|
||||
string(3) "foo"
|
||||
string(3) "foo"
|
||||
string(3) "foo"
|
||||
|
||||
+3
-3
@@ -201,7 +201,7 @@ class Point
|
||||
var $y;
|
||||
var $lable;
|
||||
|
||||
function __construct($x, $y) {
|
||||
function Point($x, $y) {
|
||||
$this->x = $x;
|
||||
$this->y = $y;
|
||||
}
|
||||
@@ -357,7 +357,7 @@ var_dump($global_var);
|
||||
test_unset3();
|
||||
var_dump($global_var);
|
||||
|
||||
//Note: No error conditions relating to passing arguments can be tested
|
||||
//Note: No error conditions relating to passing arugments can be tested
|
||||
// because these are not functions but statements, it will result in syntax error.
|
||||
?>
|
||||
===DONE===
|
||||
@@ -1271,7 +1271,7 @@ bool(false)
|
||||
bool(true)
|
||||
array(3) {
|
||||
[0]=>
|
||||
string(11) "__construct"
|
||||
string(5) "Point"
|
||||
[1]=>
|
||||
string(8) "setLable"
|
||||
[2]=>
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ var_dump($a++);
|
||||
var_dump(++$b);
|
||||
var_dump($a->$b);
|
||||
var_dump($a->$b);
|
||||
var_dump($a->$b->{$c[1]});
|
||||
var_dump($a->$b->$c[1]);
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
||||
+1
-4
@@ -20,7 +20,4 @@ bool(true)
|
||||
|
||||
Notice: Undefined offset: 2 in %s on line %d
|
||||
|
||||
Fatal error: Uncaught Error: Function name must be a string in %s:%d
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
thrown in %s on line %d
|
||||
Fatal error: Function name must be a string in %s on line %d
|
||||
+2
-2
@@ -22,5 +22,5 @@ switch (1) {
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Switch statements may only contain one default clause in %s on line 13
|
||||
--EXPECT--
|
||||
3
|
||||
+1
-4
@@ -16,7 +16,4 @@ var_dump($x::$x);
|
||||
--EXPECTF--
|
||||
int(1)
|
||||
|
||||
Fatal error: Uncaught Error: Access to undeclared static property: Closure::$x in %s:%d
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
thrown in %s on line %d
|
||||
Fatal error: Access to undeclared static property: Closure::$x in %s on line %d
|
||||
@@ -1,11 +0,0 @@
|
||||
--TEST--
|
||||
Bug #67468 (Segfault in highlight_file()/highlight_string())
|
||||
--SKIPIF--
|
||||
<?php if(!function_exists("leak")) print "skip only for debug builds"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
highlight_string("<?php __CLASS__;", true);
|
||||
echo "done";
|
||||
?>
|
||||
--EXPECT--
|
||||
done
|
||||
@@ -10,4 +10,5 @@ abstract class TestClass
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
|
||||
Strict Standards: Static function TestClass::getName() should not be abstract in %sabstract-static.php on line %d
|
||||
===DONE===
|
||||
@@ -10,4 +10,4 @@ final final class test {
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Multiple final modifiers are not allowed in %s on line %d
|
||||
Parse error: %s error,%sexpecting %s in %s on line %d
|
||||
@@ -28,9 +28,4 @@ new c;
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught Error: Call to private method d::test2() from context 'a' in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(%d): a->test()
|
||||
#1 %s(%d): c->__construct()
|
||||
#2 {main}
|
||||
thrown in %s on line %d
|
||||
Fatal error: Call to private method d::test2() from context 'a' in %s on line %d
|
||||
@@ -1,12 +0,0 @@
|
||||
--TEST--
|
||||
Prevent abstract and final in the same class declaration
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
final abstract class C {
|
||||
private function priv() { }
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Cannot use the final modifier on an abstract class in %s on line %d
|
||||
+1
-14
@@ -8,25 +8,12 @@ $a = array(1,2,3);
|
||||
$o = new stdclass;
|
||||
$o->prop = "value";
|
||||
|
||||
try {
|
||||
var_dump($a + $o);
|
||||
} catch (Error $e) {
|
||||
echo "\nException: " . $e->getMessage() . "\n";
|
||||
}
|
||||
|
||||
$c = $a + $o;
|
||||
var_dump($c);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Notice: Object of class stdClass could not be converted to int in %sadd_002.php on line %d
|
||||
|
||||
Exception: Unsupported operand types
|
||||
|
||||
Notice: Object of class stdClass could not be converted to int in %s on line %d
|
||||
|
||||
Fatal error: Uncaught Error: Unsupported operand types in %s:%d
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
thrown in %s on line %d
|
||||
Fatal error: Unsupported operand types in %s on line %d
|
||||
+1
-14
@@ -8,25 +8,12 @@ $a = array(1,2,3);
|
||||
$o = new stdclass;
|
||||
$o->prop = "value";
|
||||
|
||||
try {
|
||||
var_dump($o + $a);
|
||||
} catch (Error $e) {
|
||||
echo "\nException: " . $e->getMessage() . "\n";
|
||||
}
|
||||
|
||||
$c = $o + $a;
|
||||
var_dump($c);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Notice: Object of class stdClass could not be converted to int in %sadd_003.php on line %d
|
||||
|
||||
Exception: Unsupported operand types
|
||||
|
||||
Notice: Object of class stdClass could not be converted to int in %s on line %d
|
||||
|
||||
Fatal error: Uncaught Error: Unsupported operand types in %s:%d
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
thrown in %s on line %d
|
||||
Fatal error: Unsupported operand types in %s on line %d
|
||||
+1
-12
@@ -5,21 +5,10 @@ adding numbers to arrays
|
||||
|
||||
$a = array(1,2,3);
|
||||
|
||||
try {
|
||||
var_dump($a + 5);
|
||||
} catch (Error $e) {
|
||||
echo "\nException: " . $e->getMessage() . "\n";
|
||||
}
|
||||
|
||||
$c = $a + 5;
|
||||
var_dump($c);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Exception: Unsupported operand types
|
||||
|
||||
Fatal error: Uncaught Error: Unsupported operand types in %s:%d
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
thrown in %s on line %d
|
||||
Fatal error: Unsupported operand types in %s on line %d
|
||||
+1
-12
@@ -7,21 +7,10 @@ $a = array(1,2,3);
|
||||
|
||||
$s1 = "some string";
|
||||
|
||||
try {
|
||||
var_dump($a + $s1);
|
||||
} catch (Error $e) {
|
||||
echo "\nException: " . $e->getMessage() . "\n";
|
||||
}
|
||||
|
||||
$c = $a + $s1;
|
||||
var_dump($c);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Exception: Unsupported operand types
|
||||
|
||||
Fatal error: Uncaught Error: Unsupported operand types in %s:%d
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
thrown in %s on line %d
|
||||
Fatal error: Unsupported operand types in %s on line %d
|
||||
@@ -1,10 +0,0 @@
|
||||
--TEST--
|
||||
declare bare anonymous class
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(new class{});
|
||||
--EXPECTF--
|
||||
object(class@%s)#%d (0) {
|
||||
}
|
||||
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
--TEST--
|
||||
declare anonymous class extending another
|
||||
--FILE--
|
||||
<?php
|
||||
class A{}
|
||||
|
||||
interface B{
|
||||
public function method();
|
||||
}
|
||||
|
||||
$a = new class extends A implements B {
|
||||
public function method(){
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
var_dump($a instanceof A, $a instanceof B);
|
||||
--EXPECTF--
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
--TEST--
|
||||
reusing anonymous classes
|
||||
--FILE--
|
||||
<?php
|
||||
while (@$i++<10) {
|
||||
var_dump(new class($i) {
|
||||
|
||||
public function __construct($i) {
|
||||
$this->i = $i;
|
||||
}
|
||||
});
|
||||
}
|
||||
--EXPECTF--
|
||||
object(class@%s)#1 (1) {
|
||||
["i"]=>
|
||||
int(1)
|
||||
}
|
||||
object(class@%s)#1 (1) {
|
||||
["i"]=>
|
||||
int(2)
|
||||
}
|
||||
object(class@%s)#1 (1) {
|
||||
["i"]=>
|
||||
int(3)
|
||||
}
|
||||
object(class@%s)#1 (1) {
|
||||
["i"]=>
|
||||
int(4)
|
||||
}
|
||||
object(class@%s)#1 (1) {
|
||||
["i"]=>
|
||||
int(5)
|
||||
}
|
||||
object(class@%s)#1 (1) {
|
||||
["i"]=>
|
||||
int(6)
|
||||
}
|
||||
object(class@%s)#1 (1) {
|
||||
["i"]=>
|
||||
int(7)
|
||||
}
|
||||
object(class@%s)#1 (1) {
|
||||
["i"]=>
|
||||
int(8)
|
||||
}
|
||||
object(class@%s)#1 (1) {
|
||||
["i"]=>
|
||||
int(9)
|
||||
}
|
||||
object(class@%s)#1 (1) {
|
||||
["i"]=>
|
||||
int(10)
|
||||
}
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
--TEST--
|
||||
testing anonymous inheritance
|
||||
--FILE--
|
||||
<?php
|
||||
class Outer {
|
||||
protected $data;
|
||||
|
||||
public function __construct($data) {
|
||||
$this->data = $data;
|
||||
}
|
||||
|
||||
public function getArrayAccess() {
|
||||
/* create a proxy object implementing array access */
|
||||
return new class($this->data) extends Outer implements ArrayAccess {
|
||||
public function offsetGet($offset) { return $this->data[$offset]; }
|
||||
public function offsetSet($offset, $data) { return ($this->data[$offset] = $data); }
|
||||
public function offsetUnset($offset) { unset($this->data[$offset]); }
|
||||
public function offsetExists($offset) { return isset($this->data[$offset]); }
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
$outer = new Outer(array(
|
||||
rand(1, 100)
|
||||
));
|
||||
|
||||
/* not null because inheritance */
|
||||
var_dump($outer->getArrayAccess()[0]);
|
||||
--EXPECTF--
|
||||
int(%d)
|
||||
@@ -1,36 +0,0 @@
|
||||
--TEST--
|
||||
testing reusing anons that implement an interface
|
||||
--FILE--
|
||||
<?php
|
||||
class Outer {
|
||||
protected $data;
|
||||
|
||||
public function __construct(&$data) {
|
||||
/* array access will be implemented by the time we get to here */
|
||||
$this->data = &$data;
|
||||
}
|
||||
|
||||
public function getArrayAccess() {
|
||||
/* create a child object implementing array access */
|
||||
/* this grants you access to protected methods and members */
|
||||
return new class($this->data) implements ArrayAccess {
|
||||
public function offsetGet($offset) { return $this->data[$offset]; }
|
||||
public function offsetSet($offset, $data) { return ($this->data[$offset] = $data); }
|
||||
public function offsetUnset($offset) { unset($this->data[$offset]); }
|
||||
public function offsetExists($offset) { return isset($this->data[$offset]); }
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
$data = array(
|
||||
rand(1, 100),
|
||||
rand(2, 200)
|
||||
);
|
||||
|
||||
$outer = new Outer($data);
|
||||
$proxy = $outer->getArrayAccess();
|
||||
|
||||
/* null because no inheritance, so no access to protected member */
|
||||
var_dump(@$outer->getArrayAccess()[0]);
|
||||
--EXPECT--
|
||||
NULL
|
||||
@@ -1,15 +0,0 @@
|
||||
--TEST--
|
||||
testing anon classes inside namespaces
|
||||
--FILE--
|
||||
<?php
|
||||
namespace lone {
|
||||
$hello = new class{} ;
|
||||
}
|
||||
|
||||
namespace {
|
||||
var_dump ($hello);
|
||||
}
|
||||
--EXPECTF--
|
||||
object(class@%s)#1 (0) {
|
||||
}
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
--TEST--
|
||||
testing anon classes in functions outside of classes in namespaces
|
||||
--FILE--
|
||||
<?php
|
||||
namespace lone {
|
||||
function my_factory() {
|
||||
return new class{};
|
||||
}
|
||||
|
||||
class Outer {
|
||||
|
||||
public function __construct() {
|
||||
var_dump(
|
||||
my_factory());
|
||||
}
|
||||
}
|
||||
|
||||
new Outer();
|
||||
}
|
||||
--EXPECTF--
|
||||
object(class@%s)#2 (0) {
|
||||
}
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
--TEST--
|
||||
testing static access for methods and properties in anon classes
|
||||
--FILE--
|
||||
<?php
|
||||
$anonClass = new class("cats", "dogs") {
|
||||
public static $foo;
|
||||
private static $bar;
|
||||
|
||||
public function __construct($foo, $bar) {
|
||||
static::$foo = $foo;
|
||||
static::$bar = $bar;
|
||||
}
|
||||
|
||||
public static function getBar() {
|
||||
return static::$bar;
|
||||
}
|
||||
};
|
||||
|
||||
var_dump($anonClass::$foo);
|
||||
var_dump($anonClass::getBar());
|
||||
--EXPECT--
|
||||
string(4) "cats"
|
||||
string(4) "dogs"
|
||||
@@ -1,18 +0,0 @@
|
||||
--TEST--
|
||||
testing traits in anon classes
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
trait Foo {
|
||||
public function someMethod() {
|
||||
return "bar";
|
||||
}
|
||||
}
|
||||
|
||||
$anonClass = new class {
|
||||
use Foo;
|
||||
};
|
||||
|
||||
var_dump($anonClass->someMethod());
|
||||
--EXPECT--
|
||||
string(3) "bar"
|
||||
@@ -1,23 +0,0 @@
|
||||
--TEST--
|
||||
Trait binding after anon class
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
trait T {
|
||||
public function m1() { return 42; }
|
||||
}
|
||||
|
||||
class C {
|
||||
public function m2() {
|
||||
return new class {};
|
||||
}
|
||||
|
||||
use T;
|
||||
}
|
||||
|
||||
$c = new C;
|
||||
var_dump($c->m1());
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
int(42)
|
||||
@@ -1,110 +0,0 @@
|
||||
--TEST--
|
||||
Basic argument unpacking
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function test(...$args) {
|
||||
var_dump($args);
|
||||
}
|
||||
|
||||
function test2($arg1, $arg2, $arg3 = null) {
|
||||
var_dump($arg1, $arg2, $arg3);
|
||||
}
|
||||
|
||||
function getArray($array) {
|
||||
return $array;
|
||||
}
|
||||
|
||||
function arrayGen($array) {
|
||||
foreach ($array as $element) {
|
||||
yield $element;
|
||||
}
|
||||
}
|
||||
|
||||
$array = [1, 2, 3];
|
||||
|
||||
test(...[]);
|
||||
test(...[1, 2, 3]);
|
||||
test(...$array);
|
||||
test(...getArray([1, 2, 3]));
|
||||
test(...arrayGen([]));
|
||||
test(...arrayGen([1, 2, 3]));
|
||||
|
||||
test(1, ...[2, 3], ...[4, 5]);
|
||||
test(1, ...getArray([2, 3]), ...arrayGen([4, 5]));
|
||||
|
||||
test2(...[1, 2]);
|
||||
test2(...[1, 2, 3]);
|
||||
test2(...[1], ...[], ...[], ...[2, 3], ...[4, 5]);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(0) {
|
||||
}
|
||||
array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
array(0) {
|
||||
}
|
||||
array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
array(5) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
[3]=>
|
||||
int(4)
|
||||
[4]=>
|
||||
int(5)
|
||||
}
|
||||
array(5) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
[3]=>
|
||||
int(4)
|
||||
[4]=>
|
||||
int(5)
|
||||
}
|
||||
int(1)
|
||||
int(2)
|
||||
NULL
|
||||
int(1)
|
||||
int(2)
|
||||
int(3)
|
||||
int(1)
|
||||
int(2)
|
||||
int(3)
|
||||
@@ -1,145 +0,0 @@
|
||||
--TEST--
|
||||
Argument unpacking with by-ref arguments
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
error_reporting(E_ALL);
|
||||
|
||||
function test1(&...$args) {
|
||||
foreach ($args as &$arg) {
|
||||
$arg++;
|
||||
}
|
||||
}
|
||||
|
||||
test1(...[1, 2, 3]);
|
||||
|
||||
$array = [1, 2, 3];
|
||||
test1(...$array);
|
||||
var_dump($array);
|
||||
|
||||
$array1 = [1, 2]; $array2 = [3, 4];
|
||||
test1(...$array1, ...$array2);
|
||||
var_dump($array1, $array2);
|
||||
|
||||
function test2($val1, &$ref1, $val2, &$ref2) {
|
||||
$ref1++;
|
||||
$ref2++;
|
||||
}
|
||||
|
||||
$array = [0, 0, 0, 0];
|
||||
test2(...$array);
|
||||
var_dump($array);
|
||||
|
||||
$array1 = [1, 2]; $array2 = [4, 5];
|
||||
test1(...$array1, ...$array2);
|
||||
var_dump($array1, $array2);
|
||||
|
||||
$a = $b = $c = $d = 0;
|
||||
$array = [0, 0, 0, 0];
|
||||
|
||||
test2($a, ...$array);
|
||||
var_dump($a, $array);
|
||||
|
||||
test2($a, $b, ...$array);
|
||||
var_dump($a, $b, $array);
|
||||
|
||||
test2($a, $b, $c, ...$array);
|
||||
var_dump($a, $b, $c, $array);
|
||||
|
||||
test2($a, $b, $c, $d, ...$array);
|
||||
var_dump($a, $b, $c, $d, $array);
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
array(3) {
|
||||
[0]=>
|
||||
int(2)
|
||||
[1]=>
|
||||
int(3)
|
||||
[2]=>
|
||||
int(4)
|
||||
}
|
||||
array(2) {
|
||||
[0]=>
|
||||
int(2)
|
||||
[1]=>
|
||||
int(3)
|
||||
}
|
||||
array(2) {
|
||||
[0]=>
|
||||
int(4)
|
||||
[1]=>
|
||||
int(5)
|
||||
}
|
||||
array(4) {
|
||||
[0]=>
|
||||
int(0)
|
||||
[1]=>
|
||||
int(1)
|
||||
[2]=>
|
||||
int(0)
|
||||
[3]=>
|
||||
int(1)
|
||||
}
|
||||
array(2) {
|
||||
[0]=>
|
||||
int(2)
|
||||
[1]=>
|
||||
int(3)
|
||||
}
|
||||
array(2) {
|
||||
[0]=>
|
||||
int(5)
|
||||
[1]=>
|
||||
int(6)
|
||||
}
|
||||
int(0)
|
||||
array(4) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(0)
|
||||
[2]=>
|
||||
int(1)
|
||||
[3]=>
|
||||
int(0)
|
||||
}
|
||||
int(0)
|
||||
int(1)
|
||||
array(4) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(1)
|
||||
[2]=>
|
||||
int(1)
|
||||
[3]=>
|
||||
int(0)
|
||||
}
|
||||
int(0)
|
||||
int(2)
|
||||
int(0)
|
||||
array(4) {
|
||||
[0]=>
|
||||
int(2)
|
||||
[1]=>
|
||||
int(1)
|
||||
[2]=>
|
||||
int(1)
|
||||
[3]=>
|
||||
int(0)
|
||||
}
|
||||
int(0)
|
||||
int(3)
|
||||
int(0)
|
||||
int(1)
|
||||
array(4) {
|
||||
[0]=>
|
||||
int(2)
|
||||
[1]=>
|
||||
int(1)
|
||||
[2]=>
|
||||
int(1)
|
||||
[3]=>
|
||||
int(0)
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
--TEST--
|
||||
Unpack arguments for dynamic call
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$fn = function(...$args) {
|
||||
var_dump($args);
|
||||
};
|
||||
|
||||
$fn(...[]);
|
||||
$fn(...[1, 2, 3]);
|
||||
$fn(1, ...[2, 3], ...[], ...[4, 5]);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(0) {
|
||||
}
|
||||
array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
array(5) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
[3]=>
|
||||
int(4)
|
||||
[4]=>
|
||||
int(5)
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
--TEST--
|
||||
Argument unpacking with internal functions
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$arrays = [
|
||||
[1, 2, 3],
|
||||
[4, 5, 6],
|
||||
[7, 8, 9],
|
||||
];
|
||||
var_dump(array_map(null, ...$arrays));
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(3) {
|
||||
[0]=>
|
||||
array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(4)
|
||||
[2]=>
|
||||
int(7)
|
||||
}
|
||||
[1]=>
|
||||
array(3) {
|
||||
[0]=>
|
||||
int(2)
|
||||
[1]=>
|
||||
int(5)
|
||||
[2]=>
|
||||
int(8)
|
||||
}
|
||||
[2]=>
|
||||
array(3) {
|
||||
[0]=>
|
||||
int(3)
|
||||
[1]=>
|
||||
int(6)
|
||||
[2]=>
|
||||
int(9)
|
||||
}
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
--TEST--
|
||||
Only arrays and Traversables can be unpacked
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function test(...$args) {
|
||||
var_dump($args);
|
||||
}
|
||||
|
||||
test(...null);
|
||||
test(...42);
|
||||
test(...new stdClass);
|
||||
|
||||
test(1, 2, 3, ..."foo", ...[4, 5]);
|
||||
test(1, 2, 3, ...new StdClass, ...3.14, ...[4, 5]);
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: Only arrays and Traversables can be unpacked in %s on line %d
|
||||
array(0) {
|
||||
}
|
||||
|
||||
Warning: Only arrays and Traversables can be unpacked in %s on line %d
|
||||
array(0) {
|
||||
}
|
||||
|
||||
Warning: Only arrays and Traversables can be unpacked in %s on line %d
|
||||
array(0) {
|
||||
}
|
||||
|
||||
Warning: Only arrays and Traversables can be unpacked in %s on line %d
|
||||
array(5) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
[3]=>
|
||||
int(4)
|
||||
[4]=>
|
||||
int(5)
|
||||
}
|
||||
|
||||
Warning: Only arrays and Traversables can be unpacked in %s on line %d
|
||||
|
||||
Warning: Only arrays and Traversables can be unpacked in %s on line %d
|
||||
array(5) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
[3]=>
|
||||
int(4)
|
||||
[4]=>
|
||||
int(5)
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
--TEST--
|
||||
Argument unpacking with many arguments
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function fn(...$args) {
|
||||
var_dump(count($args));
|
||||
}
|
||||
|
||||
$array = array_fill(0, 10000, 42);
|
||||
fn(...$array, ...$array);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
int(20000)
|
||||
@@ -1,32 +0,0 @@
|
||||
--TEST--
|
||||
Unpack arguments for method calls
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class Foo {
|
||||
public function test(...$args) {
|
||||
var_dump($args);
|
||||
}
|
||||
|
||||
public static function test2(...$args) {
|
||||
var_dump($args);
|
||||
}
|
||||
}
|
||||
|
||||
$foo = new Foo;
|
||||
Foo::test2(1, 2, ...[3, 4], ...[], ...[5]);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(5) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
[3]=>
|
||||
int(4)
|
||||
[4]=>
|
||||
int(5)
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
--TEST--
|
||||
Unpack arguments for new expression
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class Foo {
|
||||
public function __construct(...$args) {
|
||||
var_dump($args);
|
||||
}
|
||||
}
|
||||
|
||||
new Foo(...[]);
|
||||
new Foo(...[1, 2, 3]);
|
||||
new Foo(...[1], ...[], ...[2, 3]);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(0) {
|
||||
}
|
||||
array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
--TEST--
|
||||
Positional arguments cannot be used after argument unpacking
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
var_dump(...[1, 2, 3], 4);
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Cannot use positional argument after argument unpacking in %s on line %d
|
||||
@@ -1,24 +0,0 @@
|
||||
--TEST--
|
||||
Argument unpacking does not work with string keys (forward compatibility for named args)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
set_error_handler(function($errno, $errstr) {
|
||||
var_dump($errstr);
|
||||
});
|
||||
|
||||
try {
|
||||
var_dump(...[1, 2, "foo" => 3, 4]);
|
||||
} catch (Error $ex) {
|
||||
var_dump($ex->getMessage());
|
||||
}
|
||||
try {
|
||||
var_dump(...new ArrayIterator([1, 2, "foo" => 3, 4]));
|
||||
} catch (Error $ex) {
|
||||
var_dump($ex->getMessage());
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
string(36) "Cannot unpack array with string keys"
|
||||
string(42) "Cannot unpack Traversable with string keys"
|
||||
@@ -1,33 +0,0 @@
|
||||
--TEST--
|
||||
Traversables that throw exceptions are properly handled during argument unpack
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function test(...$args) {
|
||||
var_dump($args);
|
||||
}
|
||||
|
||||
class Foo implements IteratorAggregate {
|
||||
public function getIterator() {
|
||||
throw new Exception('getIterator');
|
||||
}
|
||||
}
|
||||
|
||||
function gen() {
|
||||
yield 1;
|
||||
yield 2;
|
||||
throw new Exception('gen');
|
||||
}
|
||||
|
||||
try {
|
||||
test(1, 2, ...new Foo, ...[3, 4]);
|
||||
} catch (Exception $e) { var_dump($e->getMessage()); }
|
||||
|
||||
try {
|
||||
test(1, 2, ...gen(), ...[3, 4]);
|
||||
} catch (Exception $e) { var_dump($e->getMessage()); }
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
string(11) "getIterator"
|
||||
string(3) "gen"
|
||||
@@ -1,31 +0,0 @@
|
||||
--TEST--
|
||||
Traversables cannot be unpacked into by-reference parameters
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function test($val1, $val2, $val3, &$ref) {
|
||||
$ref = 42;
|
||||
}
|
||||
|
||||
function gen($array) {
|
||||
foreach ($array as $element) {
|
||||
yield $element;
|
||||
}
|
||||
}
|
||||
|
||||
test(1, 2, 3, $b, ...gen([4, 5, 6]));
|
||||
var_dump($b);
|
||||
|
||||
test(...gen([1, 2, 3, 4]));
|
||||
test(1, 2, ...gen([3, 4]));
|
||||
test(...gen([1, 2]), ...gen([3, 4]));
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
int(42)
|
||||
|
||||
Warning: Cannot pass by-reference argument 4 of test() by unpacking a Traversable, passing by-value instead in %s on line %d
|
||||
|
||||
Warning: Cannot pass by-reference argument 4 of test() by unpacking a Traversable, passing by-value instead in %s on line %d
|
||||
|
||||
Warning: Cannot pass by-reference argument 4 of test() by unpacking a Traversable, passing by-value instead in %s on line %d
|
||||
@@ -13,4 +13,4 @@ class Sub extends Base {
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: Declaration of & Sub::test() should be compatible with & Base::test($foo, array $bar, $option = NULL, $extra = 'llllllllll...') in %sargument_restriction_001.php on line %d
|
||||
Strict Standards: Declaration of Sub::test() should be compatible with & Base::test($foo, array $bar, $option = NULL, $extra = 'llllllllll...') in %sargument_restriction_001.php on line %d
|
||||
@@ -13,4 +13,4 @@ class Sub extends Base {
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: Declaration of Sub::test($foo, array &$bar) should be compatible with Base::test($foo, array &$bar, $option = NULL, $extra = 3.1415926535898) in %sargument_restriction_002.php on line %d
|
||||
Strict Standards: Declaration of Sub::test() should be compatible with Base::test($foo, array &$bar, $option = NULL, $extra = 3.1415926535898) in %sargument_restriction_002.php on line %d
|
||||
@@ -16,4 +16,4 @@ class Sub extends Base {
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: Declaration of Sub::test() should be compatible with Base::test(Foo $foo, array $bar, $option = NULL, $extra = 'llllllllll...') in %sargument_restriction_003.php on line %d
|
||||
Strict Standards: Declaration of Sub::test() should be compatible with Base::test(Foo $foo, array $bar, $option = NULL, $extra = 'llllllllll...') in %sargument_restriction_003.php on line %d
|
||||
@@ -13,4 +13,4 @@ class Sub extends Base {
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: Declaration of Sub::test($foo, $extra) should be compatible with Base::test($foo, $extra = Array) in %sargument_restriction_006.php on line %d
|
||||
Strict Standards: Declaration of Sub::test() should be compatible with Base::test($foo, $extra = Array) in %sargument_restriction_006.php on line %d
|
||||
Loaded 100 of 7348 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user