Minor Zend Engine Niggle

php.internals

l0t3k

22 years ago
ive noticed in all the OOP extensions callbacks for properties that the "member" (property name) is not guaranteed to be a string zval. is there a reason for this, given that any other type should have choked the lexer in the first place ? even if not, then can the casting be done in the engine as opposed to the extensions ? what im referring to is the common idiom if (member->type != IS_STRING) { tmp_member = *member; zval_copy_ctor(&tmp_member); convert_to_string(&tmp_member); member = &tmp_member; } ...... if (member == &tmp_member) { zval_dtor(member); } in read_property and write_property handlers. l0t3k