|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? ????, PHP 6.0
- Unicode support. (Andrei, Dmitriy, et al)
-- Changed "instanceof" operator, is_a() and is_subclass_of() functions to not
- call __autoload(). (Dmitry)
+- Changed "instanceof" and "catch" operators, is_a() and is_subclass_of()
+ functions to not call __autoload(). (Dmitry)
- Added optional parameter to http_build_query() to allow specification of
string separator.
- cURL improvements: (Ilia)
--- /dev/null
+--TEST--
+catch shouldn't call __autoload
+--FILE--
+<?php
+function __autoload($name) {
+ echo("AUTOLOAD '$name'\n");
+ eval("class $name {}");
+}
+
+
+try {
+} catch (A $e) {
+}
+
+try {
+ throw new Exception();
+} catch (B $e) {
+} catch (Exception $e) {
+ echo "ok\n";
+}
+?>
+--EXPECT--
+ok
long catch_op_number = get_next_op_number(CG(active_op_array));
zend_op *opline;
+ if (catch_op_number > 0) {
+ opline = &CG(active_op_array)->opcodes[catch_op_number-1];
+ if (opline->opcode == ZEND_FETCH_CLASS) {
+ opline->extended_value |= ZEND_FETCH_CLASS_NO_AUTOLOAD;
+ }
+ }
+
opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_CATCH;
opline->op1 = *catch_class;