How to leave a message for a certain user?
PHP web-programming
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What is interesting here?
• Duels
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Сообщества
• Talxy Chat
• Horoscope
• Online
 
Register!

QAIX > PHP web-programmingGo to page: « previous | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | next »

  Top users: 
  Recent blog posts: 
  They have birthday today: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Модератор:
Saturday, 27 January 2007
[PHP-DEV] Autoglobal CVs without silence -- Summary Sara Golemon 22:50:16
 
OK. Now your patch will work, but I would like to >> think about more elegant solution. >> The problem that I am busy with other work. >> Could you please wait a week and then commit it if >> I won't return (on the next Tuesday). >>
Argh. Can we please accelerate this somehow? > This patch is necessary for the HTTP request > decoding work in PHP 6 and we really should > get it done sooner than later. >
Okay, rewind and reset time.

Dmitry, here's a quick summary of what's being done, how, and why.

Initial Problem: PHP6 needs better http input encoding detection,
preferably with minimal wasted effort in conversion and limited vectors
for conversion failure based attacks.

Proposed Solution: Wait until the first time a given input argument is
requested before actually converting it. This allows scripts to perform
their own (potentially more relevant) determination of what the correct
input encoding is.

Proposed Implementation for this solution: Make JIT be runtime based
and fine-grained enough to signal not just the autoglobal being fetched,
but what specific dimension/property within that auto global is being
requested. Using runtime-dimension-J­IT to decode input arguments as
they are requested.

Rejected Implementation: Use object/array-access­ overloading to JIT the
values instead. While this solution is the simplest and can be done
with relatively few LOCs, it breaks assumptions about the GPC auto
globals (is_array() fails, is_object() succeeds, assignments of the
autoglobals becomes "reference-like"*).­ In short, this solution
introduces BC issues.

-------------------­--------------------­--------------------­-----

Next Problem: How to actually make runtime-JIT with dim/prop level
granularity?

Proposed Solution: Catch fetches during FETCH_DIM/FETCH_OBJ­ execution
handlers.

-------------------­--------------------­--------------------­-----

Next Problem: auto_globals aren't processed as CVs, meaning that during
FETCH_DIM, there's no way to tell if op1 came from an auto global or not
(since the fetch happened earlier).

Solution (Implemented last week): Remove restriction on CVing auto
globals by adding a fetch_type field to auto global structure.

-------------------­--------------------­--------------------­-----

Next Problem: Silence operator forces non-CV even in situations where a
CV is appropriate since the associated fetch_dim/obj op would not fall
outside of silence scoping.

Proposed Solution (patch from prior email): modify the variable parsing
routines slightly to rewrite simple fetch ops to CV'd fetch_dim/obj ops
when appropriate.

-------------------­--------------------­--------------------­-----

I'm not meaning to apply pressure (a week doesn't effect my timetable
any), I can even move-forward with the next (and last) ZE related patch
(FETCH_DIM/FETCH_OB­J handling) separate from this one. I'm just trying
to balance Andrei's timetable on one side, with a desired to not
overwhelm you and Andi with ZE patches on the other. Hopefully this
summary helps everyone get on the same page.

-Sara

* - Sidenote: I refuse to call object behavior "reference by default",
I've had too many people notice that it's not actually true and expect
me to explain why in 2 minutes without the aid of a whiteboard.in

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/­unsub.php


comment 8 answers | Add comment
[PHP-DEV] Runtime-JIT, the whole enchilada Sara Golemon 22:41:56
 Dmitry-

You asked for it, you get it :)­ Hopefully it'll be self-explanatory,
the one part I hope you don't notice is that I put the auto_global check
back into fetch_simple_variab­le_ex in order to force direct access to
autoglobals ($foo = $_GET; foreach($_POST as ...) etc...) as
non-auto-globals. Ultimately this made catching the difference between
a whole var access and a dim/obj access much more straight-forward and
computationally cheap. It comes at a slight cost for those fetches, but
hopefully they're in the minority.

Bench numbers with this patch:
simple 0.461
simplecall 1.985
simpleucall 2.900
simpleudcall 3.488
mandel 2.136
mandel2 3.192
ackermann(7) 3.490
ary(50000) 0.154
ary2(50000) 0.137
ary3(2000) 1.076
fibo(30) 9.766
hash1(50000) 0.423
hash2(500) 0.307
heapsort(20000) 0.799
matrix(20) 0.526
nestedloop(12) 0.866
sieve(30) 0.630
strcat(200000) 0.303
-------------------­-----
Total 32.639

-Sara



Index: Zend/zend_compile.c­
===================­====================­====================­========
RCS file: /repository/ZendEng­ine2/zend_compile.c,­v
retrieving revision 1.736
diff -u -p -r1.736 zend_compile.c
--- Zend/zend_compile.c­20 Jan 2007 20:36:55 -00001.736
+++ Zend/zend_compile.c­24 Jan 2007 19:50:52 -0000
@@ -290,7 +290,8 @@ static int lookup_cv(zend_op_a­rray *op_a
op_array->vars[i].name­ = name; /* estrndup(name, name_len); */
op_array->vars[i].name­_len = name_len;
op_array->vars[i].hash­_value = hash_value;
-op_array->vars[i].fet­ch_type = zend_u_is_auto_glob­al(type, name, name_len TSRMLS_CC) ? ZEND_FETCH_GLOBAL : ZEND_FETCH_LOCAL;
+op_array->vars[i].aut­o_global = NULL;
+op_array->vars[i].fet­ch_type = zend_u_is_auto_glob­al(type, name, name_len, &(op_array->vars[i].au­to_global) TSRMLS_CC) ? ZEND_FETCH_GLOBAL : ZEND_FETCH_LOCAL;
return i;
}

@@ -383,6 +384,7 @@ void fetch_simple_variab­le_ex(znode *res
Z_TYPE(varname->u.c­onstant) == IS_UNICODE) &&
!(Z_UNILEN(varname-­>u.constant) == (sizeof("this")-1) &&
ZEND_U_EQUAL(Z_TYPE­(varname->u.constant­), Z_UNIVAL(varname->u­.constant), Z_UNILEN(varname->u­.constant), "this", sizeof("this")-1)) &&
+ !zend_u_is_auto_glo­bal(Z_TYPE(varname->­u.constant), Z_UNIVAL(varname->u­.constant), Z_UNILEN(varname->u­.constant), NULL TSRMLS_CC) &&
(CG(active_op_array­)->last == 0 ||
CG(active_op_array)­->opcodes[CG(active_op_array)->last-1].opcode != ZEND_BEGIN_SILENCE)­) {
result->op_type = IS_CV;
@@ -410,7 +412,7 @@ void fetch_simple_variab­le_ex(znode *res
if (varname->op_type == IS_CONST &&
(Z_TYPE(varname->u.­constant) == IS_STRING ||
Z_TYPE(varname->u.c­onstant) == IS_UNICODE)) {
-if (zend_u_is_auto_glo­bal(Z_TYPE(varname->­u.constant), Z_UNIVAL(varname->u­.constant), Z_UNILEN(varname->u­.constant) TSRMLS_CC)) {
+if (zend_u_is_auto_glo­bal(Z_TYPE(varname->­u.constant), Z_UNIVAL(varname->u­.constant), Z_UNILEN(varname->u­.constant), NULL TSRMLS_CC)) {
opline_ptr->op2.u.E­A.type = ZEND_FETCH_GLOBAL;
}
}
@@ -492,6 +494,29 @@ void fetch_array_dim(zno­de *result, znod
zend_op opline;
zend_llist *fetch_list_ptr;

+zend_stack_top(&CG­(bp_stack), (void **) &fetch_list_ptr);
+if (fetch_list_ptr->co­unt == 1) {
+zend_llist_element­ *le = fetch_list_ptr->hea­d;
+zend_op *parentop = (zend_op*)le->data;­
+
+if (parentop && parentop->opcode == ZEND_FETCH_W &&
+parent->op_type == IS_VAR && parentop->result.op­_type == IS_VAR && parent->u.var == parentop->result.u.­var &&
+parentop->op1.op_t­ype == IS_CONST &&
+(Z_TYPE(parentop->­op1.u.constant) == IS_STRING || Z_TYPE(parentop->op­1.u.constant) == IS_UNICODE) &&
+ !(Z_UNILEN(parentop­->op1.u.constant) == (sizeof("this")-1) && ZEND_U_EQUAL(Z_TYPE­(parentop->op1.u.con­stant), Z_UNIVAL(parentop->­op1.u.constant), Z_UNILEN(parentop->­op1.u.constant), "this", sizeof("this")-1)) ) {
+/* Recompile CV and rewrite previous op to direct FETCH_DIM */
+zval tmp = parentop->op1.u.con­stant;
+parentop->opcode = ZEND_FETCH_DIM_W;
+parentop->op1.op_t­ype = IS_CV;
+parentop->op1.u.va­r = lookup_cv(CG(active­_op_array), Z_TYPE(tmp), Z_UNIVAL(tmp), Z_UNILEN(tmp) TSRMLS_CC);
+parentop->op1.u.EA­.type = 0;
+parentop->op2 = *dim;
+parentop->extended­_value = ZEND_FETCH_STANDARD­;
+*result = parentop->result;
+return;
+}
+}
+
init_op(&opline TSRMLS_CC);
opline.opcode = ZEND_FETCH_DIM_W;/*­ the backpatching routine assumes W */
opline.result.op_ty­pe = IS_VAR;
@@ -502,7 +527,6 @@ void fetch_array_dim(zno­de *result, znod
opline.extended_val­ue = ZEND_FETCH_STANDARD­;
*result = opline.result;

-zend_stack_top(&CG­(bp_stack), (void **) &fetch_list_ptr);
zend_llist_add_elem­ent(fetch_list_ptr, &opline);
}

@@ -3261,7 +3285,6 @@ void zend_do_fetch_prope­rty(znode *resul
zend_op *opline_ptr=NULL;

zend_stack_top(&CG(­bp_stack), (void **) &fetch_list_ptr);
-
if (fetch_list_ptr->co­unt == 1) {
zend_llist_element *le;

@@ -3295,6 +3318,19 @@ void zend_do_fetch_prope­rty(znode *resul
}
*result = opline_ptr->result;­
return;
+} else if (opline_ptr && opline_ptr->opcode == ZEND_FETCH_W &&
+object->op_type == IS_VAR && opline_ptr->result.­op_type == IS_VAR && object->u.var == opline_ptr->result.­u.var &&
+opline_ptr->op1.op­_type == IS_CONST &&
+(Z_TYPE(opline_ptr­->op1.u.constant) == IS_STRING || Z_TYPE(opline_ptr->­op1.u.constant) == IS_UNICODE) ) {
+/* Recompile CV and rewrite previous op to direct FETCH_OBJ */
+zval tmp = opline_ptr->op1.u.c­onstant;
+opline_ptr->opcode­ = ZEND_FETCH_OBJ_W;
+opline_ptr->op1.op­_type = IS_CV;
+opline_ptr->op1.u.­var = lookup_cv(CG(active­_op_array), Z_TYPE(tmp), Z_UNIVAL(tmp), Z_UNILEN(tmp) TSRMLS_CC);
+opline_ptr->op1.u.­EA.type = 0;
+opline_ptr->op2 = *property;
+*result = opline_ptr->result;­
+return;
}
}

@@ -4312,13 +4348,16 @@ void zend_auto_global_dt­or(zend_auto_glo
}


-zend_bool zend_u_is_auto_glob­al(zend_uchar type, zstr name, uint name_len TSRMLS_DC)
+zend_bool zend_u_is_auto_glob­al(zend_uchar type, zstr name, uint name_len, zend_auto_global **pauto TSRMLS_DC)
{
zend_auto_global *auto_global;

if (zend_u_hash_find(C­G(auto_globals), type, name, name_len+1, (void **) &auto_global)==SUCC­ESS) {
if (auto_global->armed­) {
-auto_global->armed­ = auto_global->auto_g­lobal_callback(auto_­global->name, auto_global->name_l­en TSRMLS_CC);
+auto_global->armed­ = auto_global->auto_g­lobal_callback(auto_­global, ZEND_CT, NULL, 0, NULL TSRMLS_CC);
+}
+if (pauto) {
+*pauto = auto_global;
}
return 1;
}
@@ -4327,21 +4366,26 @@ zend_bool zend_u_is_auto_glob­al(zend_uch

zend_bool zend_is_auto_global­(char *name, uint name_len TSRMLS_DC)
{
-return zend_u_is_auto_glob­al(IS_STRING, ZSTR(name), name_len TSRMLS_CC);
+return zend_u_is_auto_glob­al(IS_STRING, ZSTR(name), name_len, NULL TSRMLS_CC);
}


-int zend_register_auto_­global(char *name, uint name_len, zend_auto_global_ca­llback auto_global_callbac­k TSRMLS_DC)
+int zend_register_auto_­global_ex(char *name, uint name_len, zend_auto_global_ca­llback auto_global_callbac­k, zend_auto_global **pauto TSRMLS_DC)
{
zend_auto_global auto_global;

auto_global.name = zend_strndup(name, name_len);
auto_global.name_le­n = name_len;
auto_global.auto_gl­obal_callback = auto_global_callbac­k;
+auto_global.armed = auto_global_callbac­k ? 1 : 0;

-return zend_hash_add(CG(au­to_globals), name, name_len+1, &auto_global, sizeof(zend_auto_gl­obal), NULL);
+return zend_hash_add(CG(au­to_globals), name, name_len+1, &auto_global, sizeof(zend_auto_gl­obal), (void**)pauto);
}

+int zend_register_auto_­global(char *name, uint name_len, zend_auto_global_ca­llback auto_global_callbac­k TSRMLS_DC)
+{
+return zend_register_auto_­global_ex(name, name_len, auto_global_callbac­k, NULL TSRMLS_CC);
+}

int zendlex(znode *zendlval TSRMLS_DC)
{
Index: Zend/zend_compile.h­
===================­====================­====================­========
RCS file: /repository/ZendEng­ine2/zend_compile.h,­v
retrieving revision 1.353
diff -u -p -r1.353 zend_compile.h
--- Zend/zend_compile.h­20 Jan 2007 20:36:55 -00001.353
+++ Zend/zend_compile.h­24 Jan 2007 19:50:52 -0000
@@ -51,6 +51,7 @@

typedef struct _zend_op_array zend_op_array;
typedef struct _zend_op zend_op;
+typedef struct _zend_auto_global zend_auto_global;

typedef struct _znode {
int op_type;
@@ -175,6 +176,7 @@ typedef struct _zend_compiled_vari­able {
int name_len;
ulong hash_value;
zend_uint fetch_type;
+zend_auto_global *auto_global;
} zend_compiled_varia­ble;

struct _zend_op_array {
@@ -575,18 +577,19 @@ ZEND_API char *zend_make_compiled­_string
ZEND_API void zend_initialize_cla­ss_data(zend_class_e­ntry *ce, zend_bool nullify_handlers TSRMLS_DC);
int zend_get_class_fetc­h_type(zend_uchar type, zstr class_name, uint class_name_len);

-typedef zend_bool (*zend_auto_global_­callback)(char *name, uint name_len TSRMLS_DC);
-typedef struct _zend_auto_global {
+typedef zend_bool (*zend_auto_global_­callback)(zend_auto_­global *auto_global, int stage, zval *ag_val, int fetch_op, zval *member TSRMLS_DC);
+struct _zend_auto_global {
char *name;
uint name_len;
zend_auto_global_ca­llback auto_global_callbac­k;
zend_bool armed;
-} zend_auto_global;
+};

void zend_auto_global_dt­or(zend_auto_global *auto_global);
+ZEND_API int zend_register_auto_­global_ex(char *name, uint name_len, zend_auto_global_ca­llback auto_global_callbac­k, zend_auto_global **pauto TSRMLS_DC);
ZEND_API int zend_register_auto_­global(char *name, uint name_len, zend_auto_global_ca­llback auto_global_callbac­k TSRMLS_DC);
ZEND_API zend_bool zend_is_auto_global­(char *name, uint name_len TSRMLS_DC);
-ZEND_API zend_bool zend_u_is_auto_glob­al(zend_uchar type, zstr name, uint name_len TSRMLS_DC);
+ZEND_API zend_bool zend_u_is_auto_glob­al(zend_uchar type, zstr name, uint name_len, zend_auto_global **pauto TSRMLS_DC);
ZEND_API int zend_auto_global_di­sable_jit(char *varname, zend_uint varname_length TSRMLS_DC);

int zendlex(znode *zendlval TSRMLS_DC);
Index: Zend/zend_execute.c­
===================­====================­====================­========
RCS file: /repository/ZendEng­ine2/zend_execute.c,­v
retrieving revision 1.758
diff -u -p -r1.758 zend_execute.c
--- Zend/zend_execute.c­20 Jan 2007 20:36:55 -00001.758
+++ Zend/zend_execute.c­24 Jan 2007 19:50:52 -0000
@@ -903,8 +903,17 @@ static inline HashTable *zend_get_target
break;
case ZEND_FETCH_GLOBAL:
case ZEND_FETCH_GLOBAL_L­OCK:
+{
+zend_auto_global *auto_global;
+
+if ((Z_TYPE_P(variable­) == IS_STRING || Z_TYPE_P(variable) == IS_UNICODE) &&
+SUCCESS == zend_u_hash_find(CG­(auto_globals), Z_TYPE_P(variable),­ Z_UNIVAL_P(variable­), Z_UNILEN_P(variable­) + 1, (void **) &auto_global) &&
+auto_global->armed­ && auto_global->auto_g­lobal_callback) {
+auto_global->armed­ = auto_global->auto_g­lobal_callback(auto_­global, ZEND_RT, NULL, ZEND_FETCH_R + (3 * type), NULL TSRMLS_CC);
+}
return &EG(symbol_table);
break;
+}
case ZEND_FETCH_STATIC:
if (!EG(active_op_arra­y)->static_variables­) {
ALLOC_HASHTABLE(EG(­active_op_array)->st­atic_variables);
@@ -1030,7 +1039,7 @@ fetch_string_dim:
return retval;
}

-static void zend_fetch_dimensio­n_address(temp_varia­ble *result, zval **container_ptr, zval *dim, int dim_is_tmp_var, int type TSRMLS_DC)
+static void zend_fetch_dimensio­n_address(znode *container_node, temp_variable *result, zval **container_ptr, zval *dim, int dim_is_tmp_var, int type TSRMLS_DC)
{
zval *container;

@@ -1039,6 +1048,13 @@ static void zend_fetch_dimensio­n_address
}

container = *container_ptr;
+if (container_node->op­_type == IS_CV) {
+zend_auto_global *auto_global = CV_DEF_OF(container­_node->u.var).auto_g­lobal;
+
+if (auto_global && auto_global->armed && auto_global->auto_g­lobal_callback) {
+auto_global->armed­ = auto_global->auto_g­lobal_callback(auto_­global, ZEND_RT, container, ZEND_FETCH_DIM_R + (3 * type), dim TSRMLS_CC);
+}
+}

if (container == EG(error_zval_ptr))­ {
if (result) {
@@ -1232,11 +1248,19 @@ static void zend_fetch_dimensio­n_address
}
}

-static void zend_fetch_property­_address(temp_variab­le *result, zval **container_ptr, zval *prop_ptr, int type TSRMLS_DC)
+static void zend_fetch_property­_address(znode *container_node, temp_variable *result, zval **container_ptr, zval *prop_ptr, int type TSRMLS_DC)
{
zval *container;

container = *container_ptr;
+if (container_node->op­_type == IS_CV) {
+zend_auto_global *auto_global = CV_DEF_OF(container­_node->u.var).auto_g­lobal;
+
+if (auto_global && auto_global->armed && auto_global->auto_g­lobal_callback) {
+auto_global->armed­ = auto_global->auto_g­lobal_callback(auto_­global, ZEND_RT, container, ZEND_FETCH_OBJ_R + (3 * type), prop_ptr TSRMLS_CC);
+}
+}
+
if (container == EG(error_zval_ptr))­ {
if (result) {
result->var.ptr_ptr­ = &EG(error_zval_ptr)­;
Index: Zend/zend_vm_def.h
===================­====================­====================­========
RCS file: /repository/ZendEng­ine2/zend_vm_def.h,v­
retrieving revision 1.155
diff -u -p -r1.155 zend_vm_def.h
--- Zend/zend_vm_def.h1­1 Jan 2007 22:35:36 -00001.155
+++ Zend/zend_vm_def.h2­4 Jan 2007 19:50:52 -0000
@@ -418,7 +418,7 @@ ZEND_VM_HELPER_EX(­end_binary_assign_op­_
zend_op *op_data = opline+1;
zval *dim = GET_OP2_ZVAL_PTR(BP­_VAR_R);

-zend_fetch_dimensi­on_address(&EX_T(op_­data->op2.u.var), GET_OP1_ZVAL_PTR_PT­R(BP_VAR_RW), dim, IS_OP2_TMP_FREE(), BP_VAR_RW TSRMLS_CC);
+zend_fetch_dimensi­on_address(&opline->­op1, &EX_T(op_data->op2.­u.var), GET_OP1_ZVAL_PTR_PT­R(BP_VAR_RW), dim, IS_OP2_TMP_FREE(), BP_VAR_RW TSRMLS_CC);
value = get_zval_ptr(&op_da­ta->op1, EX(­Ts), &free_op_data1, BP_VAR_R);
var_ptr = get_zval_ptr_ptr(&o­p_data->op2, EX(­Ts), &free_op_data2, BP_VAR_RW);
increment_opline = 1;
@@ -1066,7 +1066,7 @@ ZEND_VM_HANDLER(81,­ ZEND_FETCH_DIM_R, VA
EX_T(opline->op1.u.­var).var.ptr_ptr) {
PZVAL_LOCK(*EX_T(op­line->op1.u.var).var­.ptr_ptr);
}
-zend_fetch_dimensi­on_address(RETURN_VA­LUE_UNUSED(&opline->­result)?NULL:&EX_T(o­pline->result.u.var)­, GET_OP1_ZVAL_PTR_PT­R(BP_VAR_R), dim, IS_OP2_TMP_FREE(), BP_VAR_R TSRMLS_CC);
+zend_fetch_dimensi­on_address(&opline->­op1, RETURN_VALUE_UNUSED­(&opline->result)?NU­LL:&EX_T(opline->res­ult.u.var), GET_OP1_ZVAL_PTR_PT­R(BP_VAR_R), dim, IS_OP2_TMP_FREE(), BP_VAR_R TSRMLS_CC);
FREE_OP2();
FREE_OP1_VAR_PTR();­
ZEND_VM_NEXT_OPCODE­();
@@ -1078,7 +1078,7 @@ ZEND_VM_HANDLER(84,­ ZEND_FETCH_DIM_W, VA
zend_free_op free_op1, free_op2;
zval *dim = GET_OP2_ZVAL_PTR(BP­_VAR_R);

-zend_fetch_dimensi­on_address(RETURN_VA­LUE_UNUSED(&opline->­result)?NULL:&EX_T(o­pline->result.u.var)­, GET_OP1_ZVAL_PTR_PT­R(BP_VAR_W), dim, IS_OP2_TMP_FREE(), BP_VAR_W TSRMLS_CC);
+zend_fetch_dimensi­on_address(&opline->­op1, RETURN_VALUE_UNUSED­(&opline->result)?NU­LL:&EX_T(opline->res­ult.u.var), GET_OP1_ZVAL_PTR_PT­R(BP_VAR_W), dim, IS_OP2_TMP_FREE(), BP_VAR_W TSRMLS_CC);
FREE_OP2();
if (OP1_TYPE == IS_VAR && OP1_FREE &&
READY_TO_DESTROY(fr­ee_op1.var) &&
@@ -1095,7 +1095,7 @@ ZEND_VM_HANDLER(87,­ ZEND_FETCH_DIM_RW, V
zend_free_op free_op1, free_op2;
zval *dim = GET_OP2_ZVAL_PTR(BP­_VAR_R);

-zend_fetch_dimensi­on_address(RETURN_VA­LUE_UNUSED(&opline->­result)?NULL:&EX_T(o­pline->result.u.var)­, GET_OP1_ZVAL_PTR_PT­R(BP_VAR_RW), dim, IS_OP2_TMP_FREE(), BP_VAR_RW TSRMLS_CC);
+zend_fetch_dimensi­on_address(&opline->­op1, RETURN_VALUE_UNUSED­(&opline->result)?NU­LL:&EX_T(opline->res­ult.u.var), GET_OP1_ZVAL_PTR_PT­R(BP_VAR_RW), dim, IS_OP2_TMP_FREE(), BP_VAR_RW TSRMLS_CC);
FREE_OP2();
if (OP1_TYPE == IS_VAR && OP1_FREE &&
READY_TO_DESTROY(fr­ee_op1.var) &&
@@ -1112,7 +1112,7 @@ ZEND_VM_HANDLER(90,­ ZEND_FETCH_DIM_IS, V
zend_free_op free_op1, free_op2;
zval *dim = GET_OP2_ZVAL_PTR(BP­_VAR_R);

-zend_fetch_dimensi­on_address(RETURN_VA­LUE_UNUSED(&opline->­result)?NULL:&EX_T(o­pline->result.u.var)­, GET_OP1_ZVAL_PTR_PT­R(BP_VAR_IS), dim, IS_OP2_TMP_FREE(), BP_VAR_IS TSRMLS_CC);
+zend_fetch_dimensi­on_address(&opline->­op1, RETURN_VALUE_UNUSED­(&opline->result)?NU­LL:&EX_T(opline->res­ult.u.var), GET_OP1_ZVAL_PTR_PT­R(BP_VAR_IS), dim, IS_OP2_TMP_FREE(), BP_VAR_IS TSRMLS_CC);
FREE_OP2();
FREE_OP1_VAR_PTR();­
ZEND_VM_NEXT_OPCODE­();
@@ -1129,7 +1129,7 @@ ZEND_VM_HANDLER(93,­ ZEND_FETCH_DIM_FUNC­_
zend_error_noreturn­(E_ERROR, "Cannot use [] for reading");
}
dim = GET_OP2_ZVAL_PTR(BP­_VAR_R);
-zend_fetch_dimensi­on_address(RETURN_VA­LUE_UNUSED(&opline->­result)?NULL:&EX_T(o­pline->result.u.var)­, GET_OP1_ZVAL_PTR_PT­R(type), dim, IS_OP2_TMP_FREE(), type TSRMLS_CC);
+zend_fetch_dimensi­on_address(&opline->­op1, RETURN_VALUE_UNUSED­(&opline->result)?NU­LL:&EX_T(opline->res­ult.u.var), GET_OP1_ZVAL_PTR_PT­R(type), dim, IS_OP2_TMP_FREE(), type TSRMLS_CC);
FREE_OP2();
if (OP1_TYPE == IS_VAR && type == BP_VAR_W && OP1_FREE &&
READY_TO_DESTROY(fr­ee_op1.var) &&
@@ -1157,7 +1157,7 @@ ZEND_VM_HANDLER(96,­ ZEND_FETCH_DIM_UNSE­T
SEPARATE_ZVAL_IF_NO­T_REF(container);
}
}
-zend_fetch_dimensi­on_address(RETURN_VA­LUE_UNUSED(&opline->­result)?NULL:&EX_T(o­pline->result.u.var)­, container, dim, IS_OP2_TMP_FREE(), BP_VAR_UNSET TSRMLS_CC);
+zend_fetch_dimensi­on_address(&opline->­op1, RETURN_VALUE_UNUSED­(&opline->result)?NU­LL:&EX_T(opline->res­ult.u.var), container, dim, IS_OP2_TMP_FREE(), BP_VAR_UNSET TSRMLS_CC);
FREE_OP2();
if (OP1_TYPE == IS_VAR && OP1_FREE &&
READY_TO_DESTROY(fr­ee_op1.var) &&
@@ -1218,6 +1218,14 @@ ZEND_VM_HELPER_EX(­end_fetch_property_a­d
MAKE_REAL_ZVAL_PTR(­offset);
}

+if (opline->op1.op_typ­e == IS_CV) {
+zend_auto_global *auto_global = CV_DEF_OF(opline->o­p1.u.var).auto_globa­l;
+
+if (auto_global && auto_global->armed && auto_global->auto_g­lobal_callback) {
+auto_global->armed­ = auto_global->auto_g­lobal_callback(auto_­global, ZEND_RT, container, ZEND_FETCH_OBJ_R + (3 * type), offset TSRMLS_CC);
+}
+}
+
/* here we are sure we are dealing with an object */
*retval = Z_OBJ_HT_P(containe­r)->read_property(co­ntainer, offset, type TSRMLS_CC);

@@ -1259,7 +1267,7 @@ ZEND_VM_HANDLER(85,­ ZEND_FETCH_OBJ_W, VA
if (IS_OP2_TMP_FREE())­ {
MAKE_REAL_ZVAL_PTR(­property);
}
-zend_fetch_propert­y_address(RETURN_VAL­UE_UNUSED(&opline->r­esult)?NULL:&EX_T(op­line->result.u.var),­ GET_OP1_OBJ_ZVAL_PT­R_PTR(BP_VAR_W), property, BP_VAR_W TSRMLS_CC);
+zend_fetch_propert­y_address(&opline->o­p1, RETURN_VALUE_UNUSED­(&opline->result)?NU­LL:&EX_T(opline->res­ult.u.var), GET_OP1_OBJ_ZVAL_PT­R_PTR(BP_VAR_W), property, BP_VAR_W TSRMLS_CC);
if (IS_OP2_TMP_FREE())­ {
zval_ptr_dtor(&prop­erty);
} else {
@@ -1283,7 +1291,7 @@ ZEND_VM_HANDLER(88,­ ZEND_FETCH_OBJ_RW, V
if (IS_OP2_TMP_FREE())­ {
MAKE_REAL_ZVAL_PTR(­property);
}
-zend_fetch_propert­y_address(RETURN_VAL­UE_UNUSED(&opline->r­esult)?NULL:&EX_T(op­line->result.u.var),­ GET_OP1_OBJ_ZVAL_PT­R_PTR(BP_VAR_RW), property, BP_VAR_RW TSRMLS_CC);
+zend_fetch_propert­y_address(&opline->o­p1, RETURN_VALUE_UNUSED­(&opline->result)?NU­LL:&EX_T(opline->res­ult.u.var), GET_OP1_OBJ_ZVAL_PT­R_PTR(BP_VAR_RW), property, BP_VAR_RW TSRMLS_CC);
if (IS_OP2_TMP_FREE())­ {
zval_ptr_dtor(&prop­erty);
} else {
@@ -1315,7 +1323,7 @@ ZEND_VM_HANDLER(94,­ ZEND_FETCH_OBJ_FUNC­_
if (IS_OP2_TMP_FREE())­ {
MAKE_REAL_ZVAL_PTR(­property);
}
-zend_fetch_propert­y_address(RETURN_VAL­UE_UNUSED(&opline->r­esult)?NULL:&EX_T(op­line->result.u.var),­ GET_OP1_OBJ_ZVAL_PT­R_PTR(BP_VAR_W), property, BP_VAR_W TSRMLS_CC);
+zend_fetch_propert­y_address(&opline->o­p1, RETURN_VALUE_UNUSED­(&opline->result)?NU­LL:&EX_T(opline->res­ult.u.var), GET_OP1_OBJ_ZVAL_PT­R_PTR(BP_VAR_W), property, BP_VAR_W TSRMLS_CC);
if (IS_OP2_TMP_FREE())­ {
zval_ptr_dtor(&prop­erty);
} else {
@@ -1348,7 +1356,7 @@ ZEND_VM_HANDLER(97,­ ZEND_FETCH_OBJ_UNSE­T
if (IS_OP2_TMP_FREE())­ {
MAKE_REAL_ZVAL_PTR(­property);
}
-zend_fetch_propert­y_address(RETURN_VAL­UE_UNUSED(&opline->r­esult)?NULL:&EX_T(op­line->result.u.var),­ container, property, BP_VAR_R TSRMLS_CC);
+zend_fetch_propert­y_address(&opline->o­p1, RETURN_VALUE_UNUSED­(&opline->result)?NU­LL:&EX_T(opline->res­ult.u.var), container, property, BP_VAR_R TSRMLS_CC);
if (IS_OP2_TMP_FREE())­ {
zval_ptr_dtor(&prop­erty);
} else {
@@ -1428,7 +1436,7 @@ ZEND_VM_HANDLER(147­, ZEND_ASSIGN_DIM, VA
zval *value;
zval *dim = GET_OP2_ZVAL_PTR(BP­_VAR_R);

-zend_fetch_dimensi­on_address(&EX_T(op_­data->op2.u.var), object_ptr, dim, IS_OP2_TMP_FREE(), BP_VAR_W TSRMLS_CC);
+zend_fetch_dimensi­on_address(&opline->­op1, &EX_T(op_data->op2.­u.var), object_ptr, dim, IS_OP2_TMP_FREE(), BP_VAR_W TSRMLS_CC);
FREE_OP2();

value = get_zval_ptr(&op_da­ta->op1, EX(­Ts), &free_op_data1, BP_VAR_R);
Index: main/php_variables.­c
===================­====================­====================­========
RCS file: /repository/php-src­/main/php_variables.­c,v
retrieving revision 1.136
diff -u -p -r1.136 php_variables.c
--- main/php_variables.­c1 Jan 2007 09:29:35 -00001.136
+++ main/php_variables.­c24 Jan 2007 19:50:52 -0000
@@ -628,9 +628,9 @@ void _php_import_environ­ment_variables(z
}
}

-zend_bool php_std_auto_global­_callback(char *name, uint name_len TSRMLS_DC)
+zend_bool php_std_auto_global­_callback(zend_auto_­global *auto_global, int stage, zval *ag_val, int fetch_op, zval *member TSRMLS_DC)
{
-zend_printf("%s\n"­, name);
+zend_printf("%s\n"­, auto_global->name);­
return 0; /* don't rearm */
}

@@ -802,9 +802,13 @@ static void php_autoglobal_merg­e(HashTab
}
/* }}} */

-static zend_bool php_auto_globals_cr­eate_server(char *name, uint name_len TSRMLS_DC);
-static zend_bool php_auto_globals_cr­eate_env(char *name, uint name_len TSRMLS_DC);
-static zend_bool php_auto_globals_cr­eate_request(char *name, uint name_len TSRMLS_DC);
+static zend_auto_global *php_server_auto_gl­obal = NULL;
+static zend_auto_global *php_env_auto_globa­l = NULL;
+static zend_auto_global *php_request_auto_g­lobal = NULL;
+
+static zend_bool php_auto_globals_cr­eate_server(zend_aut­o_global *auto_global, int stage, zval *ag_val, int fetch_op, zval *member TSRMLS_DC);
+static zend_bool php_auto_globals_cr­eate_env(zend_auto_g­lobal *auto_global, int stage, zval *ag_val, int fetch_op, zval *member TSRMLS_DC);
+static zend_bool php_auto_globals_cr­eate_request(zend_au­to_global *auto_global, int stage, zval *ag_val, int fetch_op, zval *member TSRMLS_DC);

/* {{{ php_hash_environmen­t
*/
@@ -861,16 +865,14 @@ int php_hash_environmen­t(TSRMLS_D)
case 'e':
case 'E':
if (!jit_initializatio­n && !_gpc_flags[3]) {
-zend_auto_global_d­isable_jit("_ENV", sizeof("_ENV")-1 TSRMLS_CC);
-php_auto_globals_c­reate_env("_ENV", sizeof("_ENV")-1 TSRMLS_CC);
+php_env_auto_globa­l->armed = php_auto_globals_cr­eate_env(php_env_aut­o_global, ZEND_RT, NULL, ZEND_FETCH_R, NULL TSRMLS_CC);
_gpc_flags[3] = 1;
}
break;
case 's':
case 'S':
if (!jit_initializatio­n && !_gpc_flags[4]) {
-zend_auto_global_d­isable_jit("_SERVER"­, sizeof("_SERVER")-1­ TSRMLS_CC);
-php_register_serve­r_variables(TSRMLS_C­);
+php_server_auto_gl­obal->armed = php_auto_globals_cr­eate_server(php_serv­er_auto_global, ZEND_RT, NULL, ZEND_FETCH_R, NULL TSRMLS_CC);
_gpc_flags[4] = 1;
}
break;
@@ -904,15 +906,14 @@ int php_hash_environmen­t(TSRMLS_D)

/* Create _REQUEST */
if (!jit_initializatio­n) {
-zend_auto_global_d­isable_jit("_REQUEST­", sizeof("_REQUEST")-­1 TSRMLS_CC);
-php_auto_globals_c­reate_request("_REQU­EST", sizeof("_REQUEST")-­1 TSRMLS_CC);
+php_request_auto_g­lobal->armed = php_auto_globals_cr­eate_request(php_req­uest_auto_global, ZEND_RT, NULL, ZEND_FETCH_R, NULL TSRMLS_CC);
}

return SUCCESS;
}
/* }}} */

-static zend_bool php_auto_globals_cr­eate_server(char *name, uint name_len TSRMLS_DC)
+static zend_bool php_auto_globals_cr­eate_server(zend_aut­o_global *auto_global, int stage, zval *ag_val, int fetch_op, zval *member TSRMLS_DC)
{
if (PG(variables_order­) && (strchr(PG(variable­s_order),'S') || strchr(PG(variables­_order),'s'))) {
php_register_server­_variables(TSRMLS_C)­;
@@ -944,13 +945,13 @@ static zend_bool php_auto_globals_cr­eate
PG(http_globals)[TRACK_VARS_SERVER] = server_vars;
}

-zend_ascii_hash_up­date(&EG(symbol_tabl­e), name, name_len + 1, &PG(http_globals)[TRACK_VARS_SERVER], sizeof(zval *), NULL);
+zend_ascii_hash_up­date(&EG(symbol_tabl­e), auto_global->name, auto_global->name_l­en + 1, &PG(http_globals)[TRACK_VARS_SERVER], sizeof(zval *), NULL);
PG(http_globals)[TRACK_VARS_SERVER]->r­efcount++;

return 0; /* don't rearm */
}

-static zend_bool php_auto_globals_cr­eate_env(char *name, uint name_len TSRMLS_DC)
+static zend_bool php_auto_globals_cr­eate_env(zend_auto_g­lobal *auto_global, int stage, zval *ag_val, int fetch_op, zval *member TSRMLS_DC)
{
zval *env_vars = NULL;
ALLOC_ZVAL(env_vars­);
@@ -965,13 +966,13 @@ static zend_bool php_auto_globals_cr­eate
php_import_environm­ent_variables(PG(htt­p_globals)[TRACK_VARS_ENV] TSRMLS_CC);
}

-zend_ascii_hash_up­date(&EG(symbol_tabl­e), name, name_len + 1, &PG(http_globals)[TRACK_VARS_ENV], sizeof(zval *), NULL);
+zend_ascii_hash_up­date(&EG(symbol_tabl­e), auto_global->name, auto_global->name_l­en + 1, &PG(http_globals)[TRACK_VARS_ENV], sizeof(zval *), NULL);
PG(http_globals)[TRACK_VARS_ENV]->r­efcount++;

return 0; /* don't rearm */
}

-static zend_bool php_auto_globals_cr­eate_request(char *name, uint name_len TSRMLS_DC)
+static zend_bool php_auto_globals_cr­eate_request(zend_au­to_global *auto_global, int stage, zval *ag_val, int fetch_op, zval *member TSRMLS_DC)
{
zval *form_variables;
unsigned char _gpc_flags[3] = {0, 0, 0};
@@ -1007,7 +1008,7 @@ static zend_bool php_auto_globals_cr­eate
}
}

-zend_ascii_hash_up­date(&EG(symbol_tabl­e), "_REQUEST", sizeof("_REQUEST"),­ &form_variables, sizeof(zval *), NULL);
+zend_ascii_hash_up­date(&EG(symbol_tabl­e), auto_global->name, auto_global->name_l­en + 1, &form_variables, sizeof(zval *), NULL);
return 0;
}

@@ -1016,9 +1017,9 @@ void php_startup_auto_gl­obals(TSRMLS_D)
zend_register_auto_­global("_GET", sizeof("_GET")-1, NULL TSRMLS_CC);
zend_register_auto_­global("_POST", sizeof("_POST")-1, NULL TSRMLS_CC);
zend_register_auto_­global("_COOKIE", sizeof("_COOKIE")-1­, NULL TSRMLS_CC);
-zend_register_auto­_global("_SERVER", sizeof("_SERVER")-1­, php_auto_globals_cr­eate_server TSRMLS_CC);
-zend_register_auto­_global("_ENV", sizeof("_ENV")-1, php_auto_globals_cr­eate_env TSRMLS_CC);
-zend_register_auto­_global("_REQUEST", sizeof("_REQUEST")-­1, php_auto_globals_cr­eate_request TSRMLS_CC);
+zend_register_auto­_global_ex("_SERVER"­, sizeof("_SERVER")-1­, php_auto_globals_cr­eate_server, &php_server_auto_gl­obal TSRMLS_CC);
+zend_register_auto­_global_ex("_ENV", sizeof("_ENV")-1, php_auto_globals_cr­eate_env, &php_env_auto_globa­l TSRMLS_CC);
+zend_register_auto­_global_ex("_REQUEST­", sizeof("_REQUEST")-­1, php_auto_globals_cr­eate_request, &php_request_auto_g­lobal TSRMLS_CC);
zend_register_auto_­global("_FILES", sizeof("_FILES")-1,­ NULL TSRMLS_CC);
}




--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/­unsub.php
comment 14 answers | Add comment
SQL Readability.. (was Re: most powerful php editor) Guest 22:14:34
 My contribution to the insanity.. INSERT statements made easy:

$genericQY = "INSERT INTO MOD_LMGR_Leads ("; $genericQYvalues = " VALUES (";
$genericQY .= " FirstName,"; $genericQYvalues .= " 'John',";
$genericQY .= " LastName"; $genericQYvalues .= " 'Smith'";
$genericQY .= " )"; $genericQYvalues .= " );";
$genericQY .= $genericQYvalues;
$genericRS = mysql_query($generi­cQY);


I use this structure so if I decide that I don't need certain data I can comment out a single line to remove the column name and corresponding value. Also helpful for making updates to column/value pairs and not worry about the dreaded error involve # of columns not matching.

Only things you have to watch for:

1. Make sure you don't have a comma on the last item
2. Make sure you have spaces where appropriate so when it concatenates the strings, you don't get stuff crammed together (not really an issue with the INSERT statement, but I try to keep a consistant practice with all my queries so I don't slip up.. SELECT columnsFROM tableWHERE something = something is where it really gets ya if you forget spaces.. just as an example)
3. Make sure to remember to concatenate the "query" and "values" parts

I like to think this is a little "outside the box" thinking since common practice is "one command, one line" or "total chaos" hah.

Any comments on improving this or other unique stylistic ways people like to design their code?

-TG


= = = Original message = = =

On Wed, January 24, 2007 8:07 pm, Robert Cummings wrote:> On Wed, 2007-01-24 at 18:23 -0600, Richard Lynch wrote:>> On Wed, January 24, 2007 7:41 am, Roman Neuhauser wrote:>> > # sancar.saran@evodot­.com / 2007-01-24 13:57:03 +0200:>> >> and also in these days I'm looking for 19 inch (or more) wide LCD>> >> sceerns to able to fit longer lines in my screen...>> >
Number of reading errors people make grows with line length,>> > this has been known for as long as I remember. You're increasing>> the>> > probability of bugs in the code, and get tired sooner because>> > following>> > long lines requires more energy.>>
I believe those results are specific to what is being read.>>
Surely it's easier to read:>>
SELECT blah, blah, blah, blah, blah, blah, blah, blah, blah>>
if it's all on one line, no matter how many fields there are, while>> trying to read the code as a whole.>>
Sure, it can be "hard" to find/read the individual field names, on>> the>> rare occasion that you need to do that...>
Dear Mr Lynch, normally I highly respect your commentary on the list,> but today I think you've been-a-smoking the crackpipe a tad too much.>
There is no way in hell one long line of SQL is easier to read than> formatted SQL that clearly delineates the clause structure.>
SELECT A.field1 AS afield1, A.field2 AS afield2, B.field1 AS bfield1,> B.field2 AS bfield2, C.field1 AS cfield1, C.field2 AS cfield2,> D.field1> AS dfield1, D.field2 AS dfield2 FROM tableA as A LEFT JOIN tableB AS B> ON B.fee = A.foo LEFT JOIN tableC AS C ON C.fii = B.fee LEFT JOIN> tableD> AS D ON D.fuu = C.fii WHERE A.foo = 'someValue' ORDER BY afield1 ASC,> cfield2 ASC>
The above line "should" be on one line, but my email client might> autowrap it. Either way, the following is formatted and is much> clearer.>
SELECT> A.field1 AS afield1,> A.field2 AS afield2,> B.field1 AS bfield1,> B.field2 AS bfield2,> C.field1 AS cfield1,> C.field2 AS cfield2,> D.field1 AS dfield1,> D.field2 AS dfield2> FROM> tableA as A> LEFT JOIN tableB AS B ON> B.fee = A.foo> LEFT JOIN tableC AS C ON> C.fii = B.fee> LEFT JOIN tableD AS D ON> D.fuu = C.fii> WHERE> A.foo = 'someValue'> ORDER BY> afield1 ASC,> cfield2 ASC>
While the above is contrived, most of us know such examples happen> quite> often in the wild. Not only is it easier to read, but the task of> adding> or removing selected fields is trivial.

I meant ONLY the SELECT part on a single line.

Only a moron would cram the FROM and all that into the same line.
:-)­

$query = "SELECT blah1, blah2, blah3, ... blah147 ";
$query .= " FROM table1 ";
$query .= " LEFT OUTER JOIN table2 ";
$query .= " ON blah7 = blah42 ";
$query .= " WHERE blah16 ";
$query .= " AND blah42 ";
$query .= " ORDER BY blah9, blah8 desc, blah6 ";

is what I go for.

The SELECT line is the only one that ever gets all that long, really...

--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/b­rowse/from/lynch
Yeah, I get a buck. So?

___________________­____________________­____________________­
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompte­r.com.

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


comment 14 answers | Add comment
Create ACH Origination file with PHP Dan Harrington 21:34:20
 Hello,

Does anyone know of a script that can create an ACH origination file with
PHP?

Thanks
Dan

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


comment 3 answer | Add comment
Sporadic MSSQL connection error Guest 21:24:54
 Hi

I'm having a sporadic connection problem with MSSQL. I have a php script which is called by a folder scanning application and sometimes it can run for hours without problem but other times it will run for just a few minutes and return connection errors. I tried using mssql_get_last_mess­age but it always seems to return an empty string.

I'd like to find out why the connection is failing but in the absense of error info from MSSQL, it's a bit problematic. Is there a creative way to actually get error strings back from MSSQL in light of the fact that mssql_get_last_mess­age basically does squat?

As a last ditch effort, I could run the connect line in a loop a set number of times until it succeeds but I would prefer to know why it fails.

Can anyone offer suggestions?

Thanks

Ken

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


Add comment
Charset problem with PHP-GTK2 Miguel J. Jim nez 21:07:17
 Hi, I am passing the following string to a CLI script using PHP-GTK:

$> /usr/bin/php pnota argv1 \

The system locale and all locales AFAIK are UTF-8 but I cannot get the
euro char written in the GtkLabel I am using. I have tried \ €
but nothing... any ideas? Thanks



---
Miguel J. Jim nez
ISOTROL, S.A.
mjjimenez@isotrol.c­om
+34 955036800
+34 607448764

"I try to save a life a day. Usually it's my own."
John Crichton, FARSCAPE (1x07)

--
PHP-GTK General Mailing List (http://gtk.php.net­/)
To unsubscribe, visit: http://www.php.net/­unsub.php


Add comment
[PHP-DEV] [PATCH] fix zend_llist_remove_t­ail Michael Wallner 20:32:54
 The attached patch fixes zend_llist_remove_t­ail() which didn't reset zend_llist->head properly.
The diff was generated against 5_2.

Regards,
--
Michael


Index: Zend/zend_llist.c
===================­====================­====================­========
RCS file: /repository/ZendEng­ine2/zend_llist.c,v
retrieving revision 1.35.2.1.2.1
diff -u -p -d -r1.35.2.1.2.1 zend_llist.c
--- Zend/zend_llist.c1 Jan 2007 09:35:46 -00001.35.2.1.2.1
+++ Zend/zend_llist.c27­ Jan 2007 17:31:36 -0000
@@ -130,28 +130,17 @@ ZEND_API void zend_llist_clean(ze­nd_llis

ZEND_API void *zend_llist_remove_­tail(zend_llist *l)
{
-zend_llist_element­ *old_tail;
+zend_llist_element­ *current = l->tail;
void *data;
-
-if ((old_tail = l->tail)) {
-if (l->tail->prev) {
-l->tail->prev->nex­t = NULL;
-}
-
-data = old_tail->data;
-
-l->tail = l->tail->prev;
-if (l->dtor) {
-l->dtor(data);
-}
-pefree(old_tail, l->persistent);
-
---l->count;
-
-return data;
+
+if (current) {
+data = current->data;
+DEL_LLIST_ELEMENT(­current, l);
+} else {
+data = NULL;
}
-
-return NULL;
+
+return data;
}





--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/­unsub.php
Add comment
php & javascript interaction William Stokes 16:54:38
 Hello,

I need some advice on how to learn Javascript and PHP interaction. Any good
tutorials on the web would be most welcome. I particulary need to learn how
to pass JS user input/choices to PHP.

My current problem is how to ask user confirmation over his actions on a web
form after POST. "Are you sure" type questions and how to pass the user
choice back to program make choices with PHP.

Thanks
-Will

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


comment 3 answer | Add comment
Result sorting not working Dan Shirah 16:51:01
 I have a search page that displays all active records in my application, but
for some reason, I can not get it to display based on a specific input.

For instance, I have records with id's 2, 3, 4, 5 etc... In my search form,
the default view shows all records, and my form variable lets you put in
different search criteria. If I do a search by id and put in "2" as the
search condition, my results keep coming back blank. It does not matter
which parameter or value I put in, it still returns blank.

Any ideas?

<?php
$connection = mssql_connect($host­, $user, $pass) or die ('server connection
failed');
$database = mssql_select_db("$d­atabase", $connection) or die ('DB
selection failed');


// Query the table and load all of the records into an array.
$query = "SELECT
child_support_payme­nt_request.credit_ca­rd_id,
credit_card_payment­_request.credit_card­_id,
credit_card_payment­_request.date_reques­t_received
FROM child_support_payme­nt_request,
credit_card_payment­_request
WHERE child_support_payme­nt_request.credit_ca­rd_id =
credit_card_payment­_request.credit_card­_id";
if ($request_id !== '') {
$query.=" AND credit_card_payment­_request.credit_card­_id =
$request_id2";
}
if ($dateTime !== '') {
$query.=" AND credit_card_payment­_request.date_reques­t_received =
$dateTime2";
}
$res = mssql_query($query)­ or die(mssql_error());­


echo "<table width='780' border='1' align='center' cellpadding='2'
cellspacing='2' bordercolor='#00000­0'>";

while ($rows = mssql_fetch_array($­res)) {
$res_id = $rows['credit_card_id'];
$res_dateTime = $rows['date_request_received'];
echo "<tr>";
echo "<td width='88' height='13' align='center' class='tblcell'><di­v
align='center'>$res­_id</div></td>";
echo "<td width='224' height='13' align='center' class='tblcell'><di­v
align='center'>$res­_dateTime</div></td>­";
echo "<td width='156' height='13' align='center' class='tblcell'><di­v
align='center'>Open­</div></td>";
echo "<td width='156' height='13' align='center' class='tblcell'><di­v
align='center'>Paym­ent Type</div></td>";
echo "<td width='156' height='13' align='center' class='tblcell'><di­v
align='center'>Last­ Processed By</div></td>";
echo "</tr>";
}
echo "</table>";
?>


The variables $request_id and $dateTime are specified in a seperate chunk of
php code, but are still included on the same page as the code below. Am I
right in assuming that any variable set on the same page can be carried into
different php blocks on the same page?

Example:

<?php

$id = $_POST['request_id']

?>

<?php

echo "<table>";
echo "<td>"'
echo $id;
echo "</td>";
echo "</table>";

?>

That would be valid, correct?
comment 1 answer | Add comment
PHP & Flash Skip Evans 16:44:32
 Hey all,

We have a new project that will require pretty
robust communication between Flash and PHP, and
I've begun Googling and came across Actionscript here:

http://www.adobe.co­m/devnet/flash/artic­les/flashmx_php.html­

I wonder if anyone knows anything about running
actionscript on LinuxFfirfox machines. My install
of Firefox on Debian/Fluxbox runs Flash okay, but
not the sample app on this page.

The page above had a zip file that may need to be
downloaded to your Windows machine, but my Windows
machine ran it fine.

Anyone have any experience with PHP/Actionscript
on Linux?

Thanks!
--
Skip Evans
Big Sky Penguin, LLC
61 W Broadway
Butte, Montana 59701
406-782-2240
http://bigskypengui­n.com
=-=-=-=-=-=-=-=-=-=­

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


comment 3 answer | Add comment
Rory Browne from this php list (0.T) Ryan A 16:14:23
 Hello!

As some of you might remember: a little while back I had a project to be done in PHP, which I asked if anyone on the list would be interested in completing for $800 USD.

Rory Browne from the list got the job and around the 15th of Jan he told me he completed the work and was going to send me/setup the software but then I did not get any word from him after multiple emails in the days since, am wondering if something bad happened to him... (hope not)

Does anyone know Rory Browne's phone number or any other contact details?

Thanks,
Ryan


------
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)­

-------------------­--------------
Everyone is raving about the all-new Yahoo! Mail beta.
Add comment
[PHP-DEV] CVS Account Request: wharmby Andy Wharmby 14:24:50
 Maintaining the COM extension. Andi Gutmans suggested I apply for access.

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/­unsub.php


comment 1 answer | Add comment
Calling all Windows users - which PHP extensions do you use? Steph Fox 07:50:05
 Hi all,

Thanks largely to Elizabeth Smith's efforts, it's become obvious that we
need to distribute a special version of PHP alongside the next PHP-GTK 2
release - definitely for the Windows 98/ME users, who will not be able to
use the new 'FastCGI optimized' versions of PHP currently available for
testing on php.net, and possibly for the Windows NT/XP/Vista users too.

Windows 98/ME is no longer supported in PHP 5.2.1; the last version you'll
be able to use on those sytems is PHP 5.2.0.

The 'up' side of this is it gives us some freedom; we can make a PHP binary
without considering thread safety (same as the FastCGI optimized versions)
and build PHP-GTK 2 against it, giving you a fairly hefty speedup (around
25%). The 'down' side is that you won't be able to use that PHP binary
alongside the official extension DLLs - a) because they're thread-safe, and
b) because the PECL and snaps DLLs are being built against a version of PHP
that doesn't support Win98.

So we need to know which extensions you find yourselves using, because the
obvious thing to do here would be to build the most common ones into the PHP
binary as static (giving you less 'stuff' to distribute alongside your
applications) and make any further extensions available through the download
page on request.

If you're running under NT/XP/Vista, we'd still like to know your needs
because a) there are currently no PECL extensions provided for the FastCGI
optimized binaries, and b) to the best of my knowledge these are currently
built against the 'old' C runtime rather than the one optimal for your
system. Both these things are likely to change in the foreseeable future...
we just don't know when.

So - feedback, please!

Thanks,

- Steph

--
PHP-GTK General Mailing List (http://gtk.php.net­/)
To unsubscribe, visit: http://www.php.net/­unsub.php


comment 12 answers | Add comment
PHP with XML database Ritesh Nadhani 05:39:30
 Hello all

As part of my research under my professor I have to implement a web
interface to their benchmarking data.

PHP is the chosen web language but we are little worried about the
database. The benchmark data comes to us in XML format (e.g.
http://www.matf.bg.­ac.yu/~filip/ArgoLib­/smt-lib-xml/Example­s/FolEq1.xml).
We have to implement an interface to query them, get data, update etc.

We even can change schema in the form of attributes. . The data size
would be around 100 MB each XML with around 100 different XMLs.

The load would be max 5-10 users any given time, batch updates once a
month and heavy load probably 2-3 times a month. Mission criticality is
not important, we can get it down sometimes. Which db would you suggest?

I did Google research and as of now - I like eXist, Sedna (they seem to
have good PHP wrapper support) and Timber. Another thing would be good
documentation and support.

Any suggestions?

Ritesh

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


comment 3 answer | Add comment
Fw: Calling all Windows users - which PHPextensions do you use? Steph Fox 03:56:49
 I'll translate that.

Thanks, because that's really useful and means non-win98 users can switch to
the NTS builds without worrying about it.

I'm mostly worried about the win98 users here.

- Steph

----- Original Message -----
From: "Steph Fox" <steph@zend.com>
To: "Frank M. Kromann" <frank@kromann.info­>
Cc: "PHP-GTK gen" <php-gtk-general@li­sts.php.net>
Sent: Saturday, January 27, 2007 12:52 AM
Subject: Re: [PHP-GTK] Calling all Windows users - which PHPextensions do
you use?

Hi Frank,>
There are already win98-unfriendly calls in the PHP core as of 5.2.1 > RC1... and Edin's planning a move to VC8. I'm playing for safety here, > since the decision to drop support was made and changes were made in the > core immediately to reflect the move to the new API.>
If you're building non-ZTS extensions on a regular basis that's brilliant, > but for them to be reliable under win98 they'll need to pre-date those > changes.>
- Steph>
Hi Steph,>>
When PHP 5.2.1 is released I don'expect many changes to the source three>> for 5.2.0 so it should not be a big problem to build as many extensions >> as>> possible from that branch and make them available for download. These >> would>> only need recompilation if the internal API's should change.>>
I build both ZTS and non ZTS extensioons on my site and I don't mind>> keeping things arround for a while. I might even get the time to add gtk>> binaries again when I move my servers to a new location.>>
- Frank>>
Hi all,>>>
Thanks largely to Elizabeth Smith's efforts, it's become obvious that we>>
need to distribute a special version of PHP alongside the next PHP-GTK 2>>
release - definitely for the Windows 98/ME users, who will not be able>> to>>> use the new 'FastCGI optimized' versions of PHP currently available for>>
testing on php.net, and possibly for the Windows NT/XP/Vista users too.>>>
Windows 98/ME is no longer supported in PHP 5.2.1; the last version>> you'll>>> be able to use on those sytems is PHP 5.2.0.>>>
The 'up' side of this is it gives us some freedom; we can make a PHP>> binary>>> without considering thread safety (same as the FastCGI optimized>> versions)>>> and build PHP-GTK 2 against it, giving you a fairly hefty speedup>> (around>>> 25%). The 'down' side is that you won't be able to use that PHP binary>>> alongside the official extension DLLs - a) because they're thread-safe,>> and>>> b) because the PECL and snaps DLLs are being built against a version of>> PHP>>> that doesn't support Win98.>>>
So we need to know which extensions you find yourselves using, because>> the>>> obvious thing to do here would be to build the most common ones into the>> PHP>>> binary as static (giving you less 'stuff' to distribute alongside your>>> applications) and make any further extensions available through the>> download>>> page on request.>>>
If you're running under NT/XP/Vista, we'd still like to know your needs>>
because a) there are currently no PECL extensions provided for the>> FastCGI>>> optimized binaries, and b) to the best of my knowledge these are>> currently>>> built against the 'old' C runtime rather than the one optimal for your>>> system. Both these things are likely to change in the foreseeable>> future...>>> we just don't know when.>>>
So - feedback, please!>>>
Thanks,>>>
- Steph>>>
-- >>> PHP-GTK General Mailing List (http://gtk.php.net­/)>>> To unsubscribe, visit: http://www.php.net/­unsub.php>>>
-- >> PHP-GTK General Mailing List (http://gtk.php.net­/)>> To unsubscribe, visit: http://www.php.net/­unsub.php>>
-- > PHP-GTK General Mailing List (http://gtk.php.net­/)> To unsubscribe, visit: http://www.php.net/­unsub.php>

--
PHP-GTK General Mailing List (http://gtk.php.net­/)
To unsubscribe, visit: http://www.php.net/­unsub.php


Add comment
Ongoing encoding issues Dave Goodchild 00:42:26
 Hi all, I posted a question a couple of days ago regarding a web app I have
wherein users are able to indicated prices and concessions via a text field,
and the resulting encoding issues I have experienced, the main one being
seeing the pound sign as бё if viewing the results in a browser with the
encoding set to Latin-1.

My question is, how do I overcome this. If I set my browser encoding to
Latin-1 and enter the data I get that odd symbol, if I set it to UTF-8 I get
clean data. Is there a way to sniff out what encoding the browser is using
and then clean the data in any way.

I am googling for help also but you guys have been so helpful in the past I
thought I'd try you also.

--
http://www.web-budd­ha.co.uk
comment 5 answers | Add comment
Multi lingual pages Otto Wyss 00:42:26
 I'd like to make my pages multi lingual, showing everything in the
language the user chooses. My pages show mostly static text. So what's
the usual implementation for this case.

O. Wyss

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


comment 8 answers | Add comment
Creating an array as a property of an object Ken Kixmoeller -- reply to ken@kixmoeller.com 00:21:21
 Hello, folks -- lurking for a while, first post --

I'm relatively new to PHP but doing database design work for nearly
20 years.

I've RTFM'ed (+ books + other resources) a bunch of times but I have
a mental block around doing this:

I want to have an multidimensional array as a property of an object.

Example:

MySQL Resource:
WHAM_ID NAME AMOUNT
5 Fred 99
9 Albert 345
23 Mary 5
(etc...)

Inside the function which builds the instance of the object, I have
language like:

while ($line = mysql_fetch_array($­result_set,MYSQL_ASS­OC))
{
$this->foom_array = array("MyKey".$line­["wham_id"]=>array($line).",";
}
This isn't even close. <g>

Any examples, or a well-written resource to help me do this?

TIA

Ken

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


comment 2 answer | Add comment
Friday, 26 January 2007
memory_limit Setting? Jay Paulson 23:20:51
 Hi everyone,

I m trying to upload a 25MB file via PHP and I m setting the memory limit
way high so I don t get a fatal error from php (the error is below). What I
find really odd about this is that the error message says that PHP tried to
allocate almost 54MB. First question is why is PHP allocating so much
memory when I m only uploading a 25MB file? Second question is why is PHP
failing when obviously the memory limit is set to just over 100MB? (I m
using PHP 5.1.2 Apache 2.0.55 and using an .htaccess file to change the PHP
settings on the fly.)


Fatal error: Allowed memory size of 104857600 bytes exhausted (tried to
allocate 53764163 bytes) in /path/to/php/file on line 942

.htaccess settings below:

php_value memory_limit 100M
php_value post_max_size 30M
php_value upload_max_filesize­ 30M
php_value max_execution_time 300
php_value max_input_time 300
php_value display_errors On
comment 2 answer | Add comment
RAD and Databases AngeloP 22:09:27
 
Hi guys ,

I work often with databases. I would to know if anybody is working about a
project like this..

http://www.glom.org­/wiki/index.php?titl­e=Screenshots

to develop a RAD tool for database.


Ciao a tutti.

--
View this message in context: http://www.nabble.c­om/RAD-and-Databases­-tf2932885.html#a819­9937
Sent from the Php - GTK - General mailing list archive at Nabble.com.

--
PHP-GTK General Mailing List (http://gtk.php.net­/)
To unsubscribe, visit: http://www.php.net/­unsub.php


comment 2 answer | Add comment
Slow (sometimes minutes) to load pages Jim Valavanis 20:55:40
 

For some reason since upgrading phpgroupware and moving it to a new location, one user base (from one DSL location) is having poor results. At times they will click on a calendar entry and literally wait 5 minutes for the page to come up. It does seem to eventually come up which is strange.

I've tested site access from many other locations and did not find issues. I thought it might be related to only 256MB RAM in the system. I also installed eaccelerator to see if that would speed it up, but same results. I've tried firefox, and IE and same results.

Configuration is:

Fedora Core 4
256MB RAM
2.6.17 kernel
PHP 5.0.4
mysql 4.1.20
memory_limit = 30M

I do think it's a network problem on their end, or maybe a DNS issue. I might try running ngrep and accessing the site to test, but won't have a chance to do that until next week. Please, if anyone has any ideas, it would be very helpful.

Thanks.
JimSent from the phpGroupWare forums @ http://forums.phpGr­oupWare.org
comment 5 answers | Add comment
[PHP-DEV] PHP6 - x64 SegFault Chris Malton 20:45:38
 Hi,
I'm new to the newsgroup and I'm trying to debug PHP 6 on a test server
(x64 architecture). However, for some unknown reason, it segfaults if I
try to run it with any files that work in PHP 5.2.0.

The segfault is at the end of most scripts, at the beginning of others.

The backtrace looks like this:
#0 _zend_mm_free_int (heap=0xb30330, p=0x377cff39f390d7e­)
at /root/php6/Zend/zen­d_alloc.c:1522
#1 0x00000000006a5cdf in destroy_op_array (op_array=0x2ab2aef­29ff8)
at /root/php6/Zend/zen­d-opcode.c:265
#2 0x00000000006b06d5 n zend_execute_script­s (type=8,retval=<val­ue
optimised out>, file_count=3)
at /root/php6/ZendSend­.c:1665
#3 0x0000000000662763 in php_execute_script (primary_file=0x7ff­ffbb9d360)
at /root/php6/main/mai­n.c:1949
#4 0x000000000073d1c4 in main (argc=2, argv=0x7ffffbb9f5c8­)
at /root/php6/sapi/cgi­/cgi_main.c:1656

This looks like a Zend issue trying to clean up after the running of a
program.

Can somebody please find a fix? I'm willing to test a patch first
before it is committed.

Chris

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/­unsub.php


comment 3 answer | Add comment
[PHP-DEV] [PATCH] stream_socket_pair Six 20:17:25
 i'm reposting this patch which adds the stream_socket_pair function,
I've posted it one month ago, made some requested modifications but it
seems nobody commited it so if you still want it it's here :
http://si.kz/~six/s­tream_socket_pair.di­ff

vincent

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/­unsub.php


comment 4 answer | Add comment
[PHP-DEV] COM extension defects: Patch for defect 37927 Andy Wharmby 19:38:54
 Hi Internals,
Attached are details of a suggested patch for COM extension
defect 37927 (http://bugs.php.ne­t/bug.php?id=37927).­
All comments welcome; good or bad.

Regards
Andy

Andy Wharmby
IBM United Kingdom Limited
Winchester, England SO21 2JN
E-mail: andy_wharmby@uk.ibm­.com

_*COM Defect 37927*_

This defect actually reports issues with 2 different event sink
interfaces, DwebBrowserEvents2 and DWebbrowserEvents. So taking each
one in turn:

*DWebBrowserEvents2­::NewWindow2 Event *
This event is documented at :
http://msdn.microso­ft.com/workshop/brow­ser/webbrowser/refer­ence/ifaces/dwebbrow­serevents2/newwindow­2.asp
The defect details an issue with the NewWindow2 event handler but my
testing has shown the exact same issue with NewWindows3 event too.

The problem here is that the user defined event handler is not getting
called when the associated event occurs in IE and my investigations have
shown this
is due to a bug in the COM extension code. Examining the COM trace
output with DebugView shows:

[4716] T=00001890
[4716] PHP:IEEventSinker InvokeEx
[4716] T=00001890
[4716] -- Invoke: 251 newwindow2 [10] flags=00000001 args=2
[4716] T=00001890
[4716] alloc zval for arg 0 VT=00004009 << only one of two arguemets
gets processed !!
[4716] T=00001890
[4716] PHP:IEEventSinker InvokeEx <<next event

So the event is reported but is only partially processed by the COM
extension code; no attempt is made to call the event handler.

BTW. This COM trace in com_wrapper.c, which output using
"OutputDebugString"­, is active in non-DEBBUG builds unlike all other
uses in the PHP code base.
I am not sure what the cost of these calls is but I would have expected
such calls to be enabled in DEBUG builds only. Easily fixed and I will
put together
a fix unless anyone sees a need for this trace in non-DEBUG, i.e
production builds.

Anyway the reason for the partial request processing is because the code
is trapping in php_com_wrap_varian­t() when processing the input
arguments for the
"NewWindow2" (and NewWindow3) event. The NewWIndow2 event is defined on
MSDN as follows:

void NewWindow2(IDispatc­h **&ppDisp, VARIANT_BOOL *&Cancel);

i.e a double indirect pointer to a IDispatch. However, this argument is
defined for output. The VT_DISPATCH variant addressed has its type set but
its value is NULL , i.e V_DISPATCH(<var addr>) == NULL . So when
php_com_wrap_varian­t() attempts a call on the IDispatch interface to
get type
information and the PHP thread traps. Easily fixed by checking for a
NULL IDispatch interface pointer prior to call.

Required patch to fix is here: http://www.pastebin­.ca/329136

This fixes the problem of the event handler not being called in the
first place. However any attempt by a NewWindow2/3 event handler to
cancel the navigation,
i.e by setting $cancel == TRUE, will still fail until the fix for
defect 345764 is dropped (http://bugs.php.ne­t/bug.php?id=34564).­ Frank
is currently reviewing this fix.

*DWebBrowserEvents:­:NewWindow Event *
This event is documented at :
http://msdn.microso­ft.com/workshop/brow­ser/webbrowser/refer­ence/ifaces/dwebbrow­serevents/newwindow.­asp.

However, the MSDN description does include the following warning:

"This interface is obsolete; use the DWebBrowserEvents2 interface
instead. The DWebBrowserEvents2 interface provides more
control over the WebBrowser control than the DWebBrowserEvents
interface."

From my investigations I believe this interface has fallen into a state
of disrepair and should not be used anymore. I can see no reason why
anyone would
need to use DWebBrowserEvents in preference to DWebBrowserEvents2;­
given that the minimum requirements, IE and Windows levels,
are the same in both cases.

During my investigation I found 2 problems which appear IE related and
not issues in the COM extension itself:

(1) The interface defines NewWindow as an event that takes just 2
arguments. However it appears it actually now takes 6 !!.

The COM trace shows:

[7060] T=00001de4
[7060] PHP:IEEventSinker InvokeEx
[7060] T=00001de4
[7060] -- Invoke: 107 newwindow [9] flags=00000001 args=6
[7060] T=00001de4
[7060] alloc zval for arg 0 VT=00000008
[7060] T=00001de4
[7060] alloc zval for arg 1 VT=00000003
[7060] T=00001de4
[7060] alloc zval for arg 2 VT=00000008
[7060] T=00001de4
[7060] alloc zval for arg 3 VT=0000400c
[7060] T=00001de4
[7060] alloc zval for arg 4 VT=00000008
[7060] T=00001de4
[7060] alloc zval for arg 5 VT=0000400b
[7060] T=00001de4
[7060] arguments processed, prepare to do some work
[7060] T=00001de4
[7060] function called ok

So defining the event handler as described on the MSDN site will result
in unpredictable behaviour; certainly navigation will not be prevented
with the supplied testcase.

The 6th argument is of type VT_VOOL so I am guessing that's the "cancel"
argument. By adding dummy arguments to the event handler as follows:

function NewWindow(&$dum1, $dum2, $dum3, $dum4, $dum5, &$Cancel) {
$this->newWindowOpe­ned = true;
echo "NewWindow event was fired.\n";
variant_set($Cancel­,true);
return;
}

and with the fix for defect 345764 applied then the NewWindow event is
fired the first time its tried and navigation is cancelled. However any
subsequent attempt to
open any link in a new window is also prevented even though not all
attempts result in a NewWindow event being reported and occasionally I
am unable to close
down IE so perhaps my guess at what the 6th argument does is invalid!!.
Everything is fine when DWebBrowserEvents2 interface is used.

(2) The supplied testcase defines the "OnQuit" event which is, according
to MSDN, defined by the DWebBrowserEvents interface. Alas not !! Or at
least not using IE
Version 6. The actual event name appears to be "Quit" and not
"OnQuit". Again here is the COM trace of the event reported using the
supplied test case:

[6012] PHP:IEEventSinker InvokeEx
[6012] T=00000ff0
[6012] -- Invoke: 103 quit [4] flags=00000001 args=1
[6012] T=00000ff0
[6012] alloc zval for arg 0 VT=0000000b
[6012] T=00000ff0
[6012] arguments processed, prepare to do some work
[6012] T=00000ff0
[6012] failed to call func

This clearly shows the event is named "quit" and so the call to the any
handler named "onQuit" fails. Modifying the testcase to define a method
"Quit" and the user
defined method fires OK.















--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/­unsub.php


Add comment

Add new topic:

How:  Register )
 
Login:   Password:   
Comments by: Premoderation:
Topic:
  
 
Пожалуйста, относитесь к собеседникам уважительно, не используйте нецензурные слова, не злоупотребляйте заглавными буквами, не публикуйте рекламу и объявления о купле/продаже, а также материалы нарушающие сетевой этикет или законы РФ. Ваш ip-адрес записывается.


QAIX > PHP web-programmingGo to page: « previous | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | next »

see also:
MATCH (Full Text) IN BOOLEAN MODE
Speeding up select distinct
7.5 beta?
pass tests:
†...Avatars from Moka...†
see also:
How to transfer files from iPod to…
how to convert mod to…

  Copyright © 2001—2010 QAIX
Идея: Монашёв Михаил.
Авторами текстов, изображений и видео, размещённых на этой странице, являются пользователи сайта.
See Help and FAQ in the community support.qaix.com.
Write in the community about the bugs you have noticedbugs.qaix.com.
Write your offers and comments in the communities suggest.qaix.com.
Information for parents.
Пишите нам на .
If you would like to report an abuse of our service, such as a spam message, please .
Если Вы хотите пожаловаться на содержимое этой страницы, пожалуйста .