PHP  
 PHP: Test and Code Coverage Analysis
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

LCOV - code coverage report
Current view: top level - Zend - zend_vm_execute.h (source / functions) Hit Total Coverage
Test: PHP Code Coverage Lines: 7406 16587 44.6 %
Date: 2014-11-22 Functions: 639 1300 49.2 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :    +----------------------------------------------------------------------+
       3             :    | Zend Engine                                                          |
       4             :    +----------------------------------------------------------------------+
       5             :    | Copyright (c) 1998-2014 Zend Technologies Ltd. (http://www.zend.com) |
       6             :    +----------------------------------------------------------------------+
       7             :    | This source file is subject to version 2.00 of the Zend license,     |
       8             :    | that is bundled with this package in the file LICENSE, and is        |
       9             :    | available through the world-wide-web at the following url:           |
      10             :    | http://www.zend.com/license/2_00.txt.                                |
      11             :    | If you did not receive a copy of the Zend license and are unable to  |
      12             :    | obtain it through the world-wide-web, please send a note to          |
      13             :    | license@zend.com so we can mail you a copy immediately.              |
      14             :    +----------------------------------------------------------------------+
      15             :    | Authors: Andi Gutmans <andi@zend.com>                                |
      16             :    |          Zeev Suraski <zeev@zend.com>                                |
      17             :    |          Dmitry Stogov <dmitry@zend.com>                             |
      18             :    +----------------------------------------------------------------------+
      19             : */
      20             : 
      21             : #ifdef ZEND_WIN32
      22             : # pragma warning(once : 4101)
      23             : # pragma warning(once : 6235)
      24             : # pragma warning(once : 6237)
      25             : # pragma warning(once : 6239)
      26             : # pragma warning(once : 6240)
      27             : # pragma warning(once : 6285)
      28             : # pragma warning(once : 6286)
      29             : # pragma warning(once : 6326)
      30             : #endif
      31             : static user_opcode_handler_t zend_user_opcode_handlers[256] = {
      32             :         (user_opcode_handler_t)NULL,
      33             :         (user_opcode_handler_t)NULL,
      34             :         (user_opcode_handler_t)NULL,
      35             :         (user_opcode_handler_t)NULL,
      36             :         (user_opcode_handler_t)NULL,
      37             :         (user_opcode_handler_t)NULL,
      38             :         (user_opcode_handler_t)NULL,
      39             :         (user_opcode_handler_t)NULL,
      40             :         (user_opcode_handler_t)NULL,
      41             :         (user_opcode_handler_t)NULL,
      42             :         (user_opcode_handler_t)NULL,
      43             :         (user_opcode_handler_t)NULL,
      44             :         (user_opcode_handler_t)NULL,
      45             :         (user_opcode_handler_t)NULL,
      46             :         (user_opcode_handler_t)NULL,
      47             :         (user_opcode_handler_t)NULL,
      48             :         (user_opcode_handler_t)NULL,
      49             :         (user_opcode_handler_t)NULL,
      50             :         (user_opcode_handler_t)NULL,
      51             :         (user_opcode_handler_t)NULL,
      52             :         (user_opcode_handler_t)NULL,
      53             :         (user_opcode_handler_t)NULL,
      54             :         (user_opcode_handler_t)NULL,
      55             :         (user_opcode_handler_t)NULL,
      56             :         (user_opcode_handler_t)NULL,
      57             :         (user_opcode_handler_t)NULL,
      58             :         (user_opcode_handler_t)NULL,
      59             :         (user_opcode_handler_t)NULL,
      60             :         (user_opcode_handler_t)NULL,
      61             :         (user_opcode_handler_t)NULL,
      62             :         (user_opcode_handler_t)NULL,
      63             :         (user_opcode_handler_t)NULL,
      64             :         (user_opcode_handler_t)NULL,
      65             :         (user_opcode_handler_t)NULL,
      66             :         (user_opcode_handler_t)NULL,
      67             :         (user_opcode_handler_t)NULL,
      68             :         (user_opcode_handler_t)NULL,
      69             :         (user_opcode_handler_t)NULL,
      70             :         (user_opcode_handler_t)NULL,
      71             :         (user_opcode_handler_t)NULL,
      72             :         (user_opcode_handler_t)NULL,
      73             :         (user_opcode_handler_t)NULL,
      74             :         (user_opcode_handler_t)NULL,
      75             :         (user_opcode_handler_t)NULL,
      76             :         (user_opcode_handler_t)NULL,
      77             :         (user_opcode_handler_t)NULL,
      78             :         (user_opcode_handler_t)NULL,
      79             :         (user_opcode_handler_t)NULL,
      80             :         (user_opcode_handler_t)NULL,
      81             :         (user_opcode_handler_t)NULL,
      82             :         (user_opcode_handler_t)NULL,
      83             :         (user_opcode_handler_t)NULL,
      84             :         (user_opcode_handler_t)NULL,
      85             :         (user_opcode_handler_t)NULL,
      86             :         (user_opcode_handler_t)NULL,
      87             :         (user_opcode_handler_t)NULL,
      88             :         (user_opcode_handler_t)NULL,
      89             :         (user_opcode_handler_t)NULL,
      90             :         (user_opcode_handler_t)NULL,
      91             :         (user_opcode_handler_t)NULL,
      92             :         (user_opcode_handler_t)NULL,
      93             :         (user_opcode_handler_t)NULL,
      94             :         (user_opcode_handler_t)NULL,
      95             :         (user_opcode_handler_t)NULL,
      96             :         (user_opcode_handler_t)NULL,
      97             :         (user_opcode_handler_t)NULL,
      98             :         (user_opcode_handler_t)NULL,
      99             :         (user_opcode_handler_t)NULL,
     100             :         (user_opcode_handler_t)NULL,
     101             :         (user_opcode_handler_t)NULL,
     102             :         (user_opcode_handler_t)NULL,
     103             :         (user_opcode_handler_t)NULL,
     104             :         (user_opcode_handler_t)NULL,
     105             :         (user_opcode_handler_t)NULL,
     106             :         (user_opcode_handler_t)NULL,
     107             :         (user_opcode_handler_t)NULL,
     108             :         (user_opcode_handler_t)NULL,
     109             :         (user_opcode_handler_t)NULL,
     110             :         (user_opcode_handler_t)NULL,
     111             :         (user_opcode_handler_t)NULL,
     112             :         (user_opcode_handler_t)NULL,
     113             :         (user_opcode_handler_t)NULL,
     114             :         (user_opcode_handler_t)NULL,
     115             :         (user_opcode_handler_t)NULL,
     116             :         (user_opcode_handler_t)NULL,
     117             :         (user_opcode_handler_t)NULL,
     118             :         (user_opcode_handler_t)NULL,
     119             :         (user_opcode_handler_t)NULL,
     120             :         (user_opcode_handler_t)NULL,
     121             :         (user_opcode_handler_t)NULL,
     122             :         (user_opcode_handler_t)NULL,
     123             :         (user_opcode_handler_t)NULL,
     124             :         (user_opcode_handler_t)NULL,
     125             :         (user_opcode_handler_t)NULL,
     126             :         (user_opcode_handler_t)NULL,
     127             :         (user_opcode_handler_t)NULL,
     128             :         (user_opcode_handler_t)NULL,
     129             :         (user_opcode_handler_t)NULL,
     130             :         (user_opcode_handler_t)NULL,
     131             :         (user_opcode_handler_t)NULL,
     132             :         (user_opcode_handler_t)NULL,
     133             :         (user_opcode_handler_t)NULL,
     134             :         (user_opcode_handler_t)NULL,
     135             :         (user_opcode_handler_t)NULL,
     136             :         (user_opcode_handler_t)NULL,
     137             :         (user_opcode_handler_t)NULL,
     138             :         (user_opcode_handler_t)NULL,
     139             :         (user_opcode_handler_t)NULL,
     140             :         (user_opcode_handler_t)NULL,
     141             :         (user_opcode_handler_t)NULL,
     142             :         (user_opcode_handler_t)NULL,
     143             :         (user_opcode_handler_t)NULL,
     144             :         (user_opcode_handler_t)NULL,
     145             :         (user_opcode_handler_t)NULL,
     146             :         (user_opcode_handler_t)NULL,
     147             :         (user_opcode_handler_t)NULL,
     148             :         (user_opcode_handler_t)NULL,
     149             :         (user_opcode_handler_t)NULL,
     150             :         (user_opcode_handler_t)NULL,
     151             :         (user_opcode_handler_t)NULL,
     152             :         (user_opcode_handler_t)NULL,
     153             :         (user_opcode_handler_t)NULL,
     154             :         (user_opcode_handler_t)NULL,
     155             :         (user_opcode_handler_t)NULL,
     156             :         (user_opcode_handler_t)NULL,
     157             :         (user_opcode_handler_t)NULL,
     158             :         (user_opcode_handler_t)NULL,
     159             :         (user_opcode_handler_t)NULL,
     160             :         (user_opcode_handler_t)NULL,
     161             :         (user_opcode_handler_t)NULL,
     162             :         (user_opcode_handler_t)NULL,
     163             :         (user_opcode_handler_t)NULL,
     164             :         (user_opcode_handler_t)NULL,
     165             :         (user_opcode_handler_t)NULL,
     166             :         (user_opcode_handler_t)NULL,
     167             :         (user_opcode_handler_t)NULL,
     168             :         (user_opcode_handler_t)NULL,
     169             :         (user_opcode_handler_t)NULL,
     170             :         (user_opcode_handler_t)NULL,
     171             :         (user_opcode_handler_t)NULL,
     172             :         (user_opcode_handler_t)NULL,
     173             :         (user_opcode_handler_t)NULL,
     174             :         (user_opcode_handler_t)NULL,
     175             :         (user_opcode_handler_t)NULL,
     176             :         (user_opcode_handler_t)NULL,
     177             :         (user_opcode_handler_t)NULL,
     178             :         (user_opcode_handler_t)NULL,
     179             :         (user_opcode_handler_t)NULL,
     180             :         (user_opcode_handler_t)NULL,
     181             :         (user_opcode_handler_t)NULL,
     182             :         (user_opcode_handler_t)NULL,
     183             :         (user_opcode_handler_t)NULL,
     184             :         (user_opcode_handler_t)NULL,
     185             :         (user_opcode_handler_t)NULL,
     186             :         (user_opcode_handler_t)NULL,
     187             :         (user_opcode_handler_t)NULL,
     188             :         (user_opcode_handler_t)NULL,
     189             :         (user_opcode_handler_t)NULL,
     190             :         (user_opcode_handler_t)NULL,
     191             :         (user_opcode_handler_t)NULL,
     192             :         (user_opcode_handler_t)NULL,
     193             :         (user_opcode_handler_t)NULL,
     194             :         (user_opcode_handler_t)NULL,
     195             :         (user_opcode_handler_t)NULL,
     196             :         (user_opcode_handler_t)NULL,
     197             :         (user_opcode_handler_t)NULL,
     198             :         (user_opcode_handler_t)NULL,
     199             :         (user_opcode_handler_t)NULL,
     200             :         (user_opcode_handler_t)NULL,
     201             :         (user_opcode_handler_t)NULL,
     202             :         (user_opcode_handler_t)NULL,
     203             :         (user_opcode_handler_t)NULL,
     204             :         (user_opcode_handler_t)NULL,
     205             :         (user_opcode_handler_t)NULL,
     206             :         (user_opcode_handler_t)NULL,
     207             :         (user_opcode_handler_t)NULL,
     208             :         (user_opcode_handler_t)NULL,
     209             :         (user_opcode_handler_t)NULL,
     210             :         (user_opcode_handler_t)NULL,
     211             :         (user_opcode_handler_t)NULL,
     212             :         (user_opcode_handler_t)NULL,
     213             :         (user_opcode_handler_t)NULL,
     214             :         (user_opcode_handler_t)NULL,
     215             :         (user_opcode_handler_t)NULL,
     216             :         (user_opcode_handler_t)NULL,
     217             :         (user_opcode_handler_t)NULL,
     218             :         (user_opcode_handler_t)NULL,
     219             :         (user_opcode_handler_t)NULL,
     220             :         (user_opcode_handler_t)NULL,
     221             :         (user_opcode_handler_t)NULL,
     222             :         (user_opcode_handler_t)NULL,
     223             :         (user_opcode_handler_t)NULL,
     224             :         (user_opcode_handler_t)NULL,
     225             :         (user_opcode_handler_t)NULL,
     226             :         (user_opcode_handler_t)NULL,
     227             :         (user_opcode_handler_t)NULL,
     228             :         (user_opcode_handler_t)NULL,
     229             :         (user_opcode_handler_t)NULL,
     230             :         (user_opcode_handler_t)NULL,
     231             :         (user_opcode_handler_t)NULL,
     232             :         (user_opcode_handler_t)NULL,
     233             :         (user_opcode_handler_t)NULL,
     234             :         (user_opcode_handler_t)NULL,
     235             :         (user_opcode_handler_t)NULL,
     236             :         (user_opcode_handler_t)NULL,
     237             :         (user_opcode_handler_t)NULL,
     238             :         (user_opcode_handler_t)NULL,
     239             :         (user_opcode_handler_t)NULL,
     240             :         (user_opcode_handler_t)NULL,
     241             :         (user_opcode_handler_t)NULL,
     242             :         (user_opcode_handler_t)NULL,
     243             :         (user_opcode_handler_t)NULL,
     244             :         (user_opcode_handler_t)NULL,
     245             :         (user_opcode_handler_t)NULL,
     246             :         (user_opcode_handler_t)NULL,
     247             :         (user_opcode_handler_t)NULL,
     248             :         (user_opcode_handler_t)NULL,
     249             :         (user_opcode_handler_t)NULL,
     250             :         (user_opcode_handler_t)NULL,
     251             :         (user_opcode_handler_t)NULL,
     252             :         (user_opcode_handler_t)NULL,
     253             :         (user_opcode_handler_t)NULL,
     254             :         (user_opcode_handler_t)NULL,
     255             :         (user_opcode_handler_t)NULL,
     256             :         (user_opcode_handler_t)NULL,
     257             :         (user_opcode_handler_t)NULL,
     258             :         (user_opcode_handler_t)NULL,
     259             :         (user_opcode_handler_t)NULL,
     260             :         (user_opcode_handler_t)NULL,
     261             :         (user_opcode_handler_t)NULL,
     262             :         (user_opcode_handler_t)NULL,
     263             :         (user_opcode_handler_t)NULL,
     264             :         (user_opcode_handler_t)NULL,
     265             :         (user_opcode_handler_t)NULL,
     266             :         (user_opcode_handler_t)NULL,
     267             :         (user_opcode_handler_t)NULL,
     268             :         (user_opcode_handler_t)NULL,
     269             :         (user_opcode_handler_t)NULL,
     270             :         (user_opcode_handler_t)NULL,
     271             :         (user_opcode_handler_t)NULL,
     272             :         (user_opcode_handler_t)NULL,
     273             :         (user_opcode_handler_t)NULL,
     274             :         (user_opcode_handler_t)NULL,
     275             :         (user_opcode_handler_t)NULL,
     276             :         (user_opcode_handler_t)NULL,
     277             :         (user_opcode_handler_t)NULL,
     278             :         (user_opcode_handler_t)NULL,
     279             :         (user_opcode_handler_t)NULL,
     280             :         (user_opcode_handler_t)NULL,
     281             :         (user_opcode_handler_t)NULL,
     282             :         (user_opcode_handler_t)NULL,
     283             :         (user_opcode_handler_t)NULL,
     284             :         (user_opcode_handler_t)NULL,
     285             :         (user_opcode_handler_t)NULL,
     286             :         (user_opcode_handler_t)NULL,
     287             :         (user_opcode_handler_t)NULL
     288             : };
     289             : 
     290             : static zend_uchar zend_user_opcodes[256] = {0,
     291             :         1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,
     292             :         17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,
     293             :         33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,
     294             :         49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,
     295             :         65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,
     296             :         81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,
     297             :         97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,
     298             :         113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,
     299             :         129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,
     300             :         145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,
     301             :         161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,
     302             :         177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,
     303             :         193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,
     304             :         209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,
     305             :         225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,
     306             :         241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
     307             : };
     308             : 
     309             : static opcode_handler_t zend_vm_get_opcode_handler(zend_uchar opcode, const zend_op* op);
     310             : 
     311             : 
     312             : #undef OPLINE
     313             : #undef DCL_OPLINE
     314             : #undef USE_OPLINE
     315             : #undef LOAD_OPLINE
     316             : #undef SAVE_OPLINE
     317             : #define OPLINE EX(opline)
     318             : #define DCL_OPLINE
     319             : #define USE_OPLINE const zend_op *opline = EX(opline);
     320             : #define LOAD_OPLINE()
     321             : #define SAVE_OPLINE()
     322             : #undef CHECK_EXCEPTION
     323             : #undef HANDLE_EXCEPTION
     324             : #undef HANDLE_EXCEPTION_LEAVE
     325             : #define CHECK_EXCEPTION() LOAD_OPLINE()
     326             : #define HANDLE_EXCEPTION() LOAD_OPLINE(); ZEND_VM_CONTINUE()
     327             : #define HANDLE_EXCEPTION_LEAVE() LOAD_OPLINE(); ZEND_VM_LEAVE()
     328             : #define ZEND_VM_CONTINUE()         return  0
     329             : #define ZEND_VM_RETURN()           return -1
     330             : #define ZEND_VM_ENTER()            return  1
     331             : #define ZEND_VM_LEAVE()            return  2
     332             : #define ZEND_VM_DISPATCH(opcode, opline) return zend_vm_get_opcode_handler(opcode, opline)(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
     333             : 
     334             : #define ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_INTERNAL execute_data TSRMLS_CC
     335             : 
     336   191991373 : ZEND_API void execute_ex(zend_execute_data *execute_data TSRMLS_DC)
     337             : {
     338             :         DCL_OPLINE
     339             : 
     340             : 
     341             : 
     342             :         LOAD_OPLINE();
     343             : 
     344             :         while (1) {
     345             :         int ret;
     346             : #ifdef ZEND_WIN32
     347             :                 if (EG(timed_out)) {
     348             :                         zend_timeout(0);
     349             :                 }
     350             : #endif
     351             : 
     352   191991373 :                 if (UNEXPECTED((ret = OPLINE->handler(execute_data TSRMLS_CC)) != 0)) {
     353     3741572 :                         if (EXPECTED(ret > 0)) {
     354     3249812 :                                 execute_data = EG(current_execute_data);
     355             :                         } else {
     356      491760 :                                 return;
     357             :                         }
     358             :                 }
     359             : 
     360   191498011 :         }
     361             :         zend_error_noreturn(E_ERROR, "Arrived at end of main loop which shouldn't happen");
     362             : }
     363             : 
     364       20374 : ZEND_API void zend_execute(zend_op_array *op_array, zval *return_value TSRMLS_DC)
     365             : {
     366             :         zend_execute_data *execute_data;
     367             : 
     368       20374 :         if (EG(exception) != NULL) {
     369           0 :                 return;
     370             :         }
     371             : 
     372       61428 :         execute_data = zend_vm_stack_push_call_frame(VM_FRAME_TOP_CODE,
     373       41054 :                 (zend_function*)op_array, 0, EG(current_execute_data) ? EG(current_execute_data)->called_scope : NULL, EG(current_execute_data) ? Z_OBJ(EG(current_execute_data)->This) : NULL, NULL TSRMLS_CC);
     374       20374 :         if (EG(current_execute_data)) {
     375         153 :                 execute_data->symbol_table = zend_rebuild_symbol_table(TSRMLS_C);
     376             :         } else {
     377       20221 :                 execute_data->symbol_table = &EG(symbol_table);
     378             :         }
     379       20374 :         EX(prev_execute_data) = EG(current_execute_data);
     380             :         i_init_execute_data(execute_data, op_array, return_value TSRMLS_CC);
     381       20374 :         zend_execute_ex(execute_data TSRMLS_CC);
     382             : }
     383             : 
     384     2116347 : static int ZEND_FASTCALL zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS)
     385             : {
     386     2116347 :         vm_frame_kind frame_kind = VM_FRAME_KIND(EX(frame_info));
     387             : 
     388     2116347 :         if (frame_kind == VM_FRAME_NESTED_FUNCTION) {
     389             :                 zend_object *object;
     390             : 
     391             :                 i_free_compiled_variables(execute_data TSRMLS_CC);
     392     1615852 :                 if (UNEXPECTED(EX(symbol_table) != NULL)) {
     393       87751 :                         zend_clean_and_cache_symbol_table(EX(symbol_table) TSRMLS_CC);
     394             :                 }
     395             :                 zend_vm_stack_free_extra_args(execute_data TSRMLS_CC);
     396     1615852 :                 EG(current_execute_data) = EX(prev_execute_data);
     397     1615852 :                 if (UNEXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_CLOSURE) != 0) && EX(func)->op_array.prototype) {
     398           6 :                         OBJ_RELEASE((zend_object*)EX(func)->op_array.prototype);
     399             :                 }
     400     1615852 :                 object = Z_OBJ(EX(This));
     401             :                 zend_vm_stack_free_call_frame(execute_data TSRMLS_CC);
     402             : 
     403     1615852 :                 execute_data = EG(current_execute_data);
     404             : 
     405     1615852 :                 if (object) {
     406      100790 :                         if (UNEXPECTED(EG(exception) != NULL) && (EX(opline)->op1.num & ZEND_CALL_CTOR)) {
     407          23 :                                 if (!(EX(opline)->op1.num & ZEND_CALL_CTOR_RESULT_UNUSED)) {
     408          20 :                                         GC_REFCOUNT(object)--;
     409             :                                 }
     410          23 :                                 if (GC_REFCOUNT(object) == 1) {
     411          22 :                                         zend_object_store_ctor_failed(object TSRMLS_CC);
     412             :                                 }
     413             :                         }
     414             :                         OBJ_RELEASE(object);
     415             :                 }
     416     1615852 :                 EG(scope) = EX(scope);
     417             : 
     418     1615852 :                 if (UNEXPECTED(EG(exception) != NULL)) {
     419         162 :                         const zend_op *opline = EX(opline);
     420         162 :                         zend_throw_exception_internal(NULL TSRMLS_CC);
     421         162 :                         if (RETURN_VALUE_USED(opline)) {
     422          28 :                                 zval_ptr_dtor(EX_VAR(opline->result.var));
     423             :                         }
     424         162 :                         HANDLE_EXCEPTION_LEAVE();
     425             :                 }
     426             : 
     427             :                 LOAD_OPLINE();
     428     1615690 :                 ZEND_VM_INC_OPCODE();
     429     1615690 :                 ZEND_VM_LEAVE();
     430      500495 :         } else if (frame_kind == VM_FRAME_NESTED_CODE) {
     431        8935 :                 zend_detach_symbol_table(execute_data);
     432        8935 :                 destroy_op_array(&EX(func)->op_array TSRMLS_CC);
     433        8935 :                 efree_size(EX(func), sizeof(zend_op_array));
     434        8935 :                 EG(current_execute_data) = EX(prev_execute_data);
     435             :                 zend_vm_stack_free_call_frame(execute_data TSRMLS_CC);
     436             : 
     437        8935 :                 execute_data = EG(current_execute_data);
     438        8935 :                 zend_attach_symbol_table(execute_data);
     439        8935 :                 if (UNEXPECTED(EG(exception) != NULL)) {
     440          21 :                         zend_throw_exception_internal(NULL TSRMLS_CC);
     441          21 :                         HANDLE_EXCEPTION_LEAVE();
     442             :                 }
     443             : 
     444             :                 LOAD_OPLINE();
     445        8914 :                 ZEND_VM_INC_OPCODE();
     446        8914 :                 ZEND_VM_LEAVE();
     447             :         } else {
     448      491560 :                 if (frame_kind == VM_FRAME_TOP_FUNCTION) {
     449             :                         i_free_compiled_variables(execute_data TSRMLS_CC);
     450      472736 :                         if (UNEXPECTED(EX(symbol_table) != NULL)) {
     451          80 :                                 zend_clean_and_cache_symbol_table(EX(symbol_table) TSRMLS_CC);
     452             :                         }
     453             :                         zend_vm_stack_free_extra_args(execute_data TSRMLS_CC);
     454      472736 :                         EG(current_execute_data) = EX(prev_execute_data);
     455      472736 :                         if ((EX(func)->op_array.fn_flags & ZEND_ACC_CLOSURE) && EX(func)->op_array.prototype) {
     456           0 :                                 OBJ_RELEASE((zend_object*)EX(func)->op_array.prototype);
     457             :                         }
     458             :                 } else /* if (frame_kind == VM_FRAME_TOP_CODE) */ {
     459       18824 :                         zend_array *symbol_table = EX(symbol_table);
     460             :                         zend_execute_data *old_execute_data;
     461             : 
     462       18824 :                         zend_detach_symbol_table(execute_data);
     463       18824 :                         old_execute_data = EX(prev_execute_data);
     464       37802 :                         while (old_execute_data) {
     465         304 :                                 if (old_execute_data->func && ZEND_USER_CODE(old_execute_data->func->op_array.type)) {
     466         150 :                                         if (old_execute_data->symbol_table == symbol_table) {
     467         150 :                                                 zend_attach_symbol_table(old_execute_data);
     468             :                                         }
     469         150 :                                         break;
     470             :                                 }
     471         154 :                                 old_execute_data = old_execute_data->prev_execute_data;
     472             :                         }
     473       18824 :                         EG(current_execute_data) = EX(prev_execute_data);
     474             :                 }
     475             :                 zend_vm_stack_free_call_frame(execute_data TSRMLS_CC);
     476             : 
     477      491560 :                 ZEND_VM_RETURN();
     478             :         }
     479             : }
     480             : 
     481    10019786 : static int ZEND_FASTCALL  ZEND_JMP_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
     482             : {
     483    10019786 :         USE_OPLINE
     484             : 
     485    10019786 :         ZEND_VM_SET_OPCODE(opline->op1.jmp_addr);
     486    10019786 :         ZEND_VM_CONTINUE();
     487             : }
     488             : 
     489    18198182 : static int ZEND_FASTCALL  ZEND_DO_FCALL_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
     490             : {
     491    18198182 :         USE_OPLINE
     492    18198182 :         zend_execute_data *call = EX(call);
     493    18198182 :         zend_function *fbc = call->func;
     494    18198182 :         zend_object *object = Z_OBJ(call->This);
     495             : 
     496             :         SAVE_OPLINE();
     497    18198182 :         EX(call) = call->prev_execute_data;
     498    18198182 :         if (UNEXPECTED((fbc->common.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_DEPRECATED)) != 0)) {
     499        1117 :                 if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_ABSTRACT) != 0)) {
     500           3 :                         zend_error_noreturn(E_ERROR, "Cannot call abstract method %s::%s()", fbc->common.scope->name->val, fbc->common.function_name->val);
     501             :                 }
     502        1114 :                 if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_DEPRECATED) != 0)) {
     503        3342 :                         zend_error(E_DEPRECATED, "Function %s%s%s() is deprecated",
     504        1114 :                                 fbc->common.scope ? fbc->common.scope->name->val : "",
     505        1114 :                                 fbc->common.scope ? "::" : "",
     506        1114 :                                 fbc->common.function_name->val);
     507        1114 :                         if (UNEXPECTED(EG(exception) != NULL)) {
     508           0 :                                 HANDLE_EXCEPTION();
     509             :                         }
     510             :                 }
     511             :         }
     512             : 
     513             :         LOAD_OPLINE();
     514             : 
     515    18198179 :         if (UNEXPECTED(fbc->type == ZEND_INTERNAL_FUNCTION)) {
     516    16582139 :                 int should_change_scope = 0;
     517             :                 zval *ret;
     518             : 
     519    16582139 :                 if (fbc->common.scope) {
     520      594360 :                         should_change_scope = 1;
     521             :                         /* TODO: we don't set scope if we call an object method ??? */
     522             :                         /* See: ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt */
     523             : #if 1
     524      594360 :                         EG(scope) = object ? NULL : fbc->common.scope;
     525             : #else
     526             :                         EG(scope) = fbc->common.scope;
     527             : #endif
     528             :                 } else {
     529    15987779 :                         call->called_scope = EX(called_scope);
     530    15987779 :                         Z_OBJ(call->This) = Z_OBJ(EX(This));
     531             :                 }
     532             : 
     533    16582139 :                 call->prev_execute_data = execute_data;
     534    16582139 :                 EG(current_execute_data) = call;
     535             : 
     536    16582139 :                 if (fbc->common.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) {
     537             :                         uint32_t i;
     538        1362 :                         zval *p = ZEND_CALL_ARG(call, 1);
     539             : 
     540        3527 :                         for (i = 0; i < call->num_args; ++i) {
     541        2206 :                                 zend_verify_arg_type(fbc, i + 1, p TSRMLS_CC);
     542        2165 :                                 p++;
     543             :                         }
     544        1321 :                         if (UNEXPECTED(EG(exception) != NULL)) {
     545           1 :                                 EG(current_execute_data) = call->prev_execute_data;
     546             :                                 zend_vm_stack_free_args(call TSRMLS_CC);
     547             :                                 zend_vm_stack_free_call_frame(call TSRMLS_CC);
     548           1 :                                 if (RETURN_VALUE_USED(opline)) {
     549           1 :                                         ZVAL_UNDEF(EX_VAR(opline->result.var));
     550             :                                 }
     551           1 :                                 if (UNEXPECTED(should_change_scope)) {
     552           0 :                                         goto fcall_end_change_scope;
     553             :                                 } else {
     554           1 :                                         goto fcall_end;
     555             :                                 }
     556             :                         }
     557             :                 }
     558             : 
     559    16582097 :                 ret = EX_VAR(opline->result.var);
     560    16582097 :                 ZVAL_NULL(ret);
     561    16582097 :                 Z_VAR_FLAGS_P(ret) = (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0 ? IS_VAR_RET_REF : 0;
     562             : 
     563    16582097 :                 if (!zend_execute_internal) {
     564             :                         /* saves one function call if zend_execute_internal is not used */
     565    16582097 :                         fbc->internal_function.handler(call, ret TSRMLS_CC);
     566             :                 } else {
     567           0 :                         zend_execute_internal(call, ret TSRMLS_CC);
     568             :                 }
     569    16581913 :                 EG(current_execute_data) = call->prev_execute_data;
     570             :                 zend_vm_stack_free_args(call TSRMLS_CC);
     571             :                 zend_vm_stack_free_call_frame(call TSRMLS_CC);
     572             : 
     573    16581913 :                 if (!RETURN_VALUE_USED(opline)) {
     574             :                         zval_ptr_dtor(ret);
     575             :                 }
     576             : 
     577    16581913 :                 if (UNEXPECTED(should_change_scope)) {
     578      594195 :                         goto fcall_end_change_scope;
     579             :                 } else {
     580    15987718 :                         goto fcall_end;
     581             :                 }
     582     1616040 :         } else if (EXPECTED(fbc->type == ZEND_USER_FUNCTION)) {
     583     1616040 :                 call->scope = EG(scope) = fbc->common.scope;
     584     1616040 :                 if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_GENERATOR) != 0)) {
     585          81 :                         if (RETURN_VALUE_USED(opline)) {
     586          80 :                                 zend_generator_create_zval(call, &fbc->op_array, EX_VAR(opline->result.var) TSRMLS_CC);
     587             :                         } else {
     588             :                                 zend_vm_stack_free_args(call TSRMLS_CC);
     589             :                         }
     590             : 
     591             :                         zend_vm_stack_free_call_frame(call TSRMLS_CC);
     592             :                 } else {
     593     1615959 :                         zval *return_value = NULL;
     594             : 
     595     1615959 :                         call->symbol_table = NULL;
     596     1615959 :                         if (RETURN_VALUE_USED(opline)) {
     597     1325053 :                                 return_value = EX_VAR(opline->result.var);
     598             : 
     599     1325053 :                                 ZVAL_NULL(return_value);
     600     1325053 :                                 Z_VAR_FLAGS_P(return_value) = 0;
     601             :                         }
     602             : 
     603     1615959 :                         call->prev_execute_data = execute_data;
     604     1615959 :                         i_init_func_execute_data(call, &fbc->op_array, return_value TSRMLS_CC);
     605             : 
     606     1615959 :                         if (EXPECTED(zend_execute_ex == execute_ex)) {
     607     1615959 :                                 ZEND_VM_ENTER();
     608             :                         } else {
     609           0 :                                 call->frame_info = VM_FRAME_INFO(
     610             :                                         VM_FRAME_TOP_FUNCTION,
     611             :                                         VM_FRAME_FLAGS(call->frame_info));
     612           0 :                                 zend_execute_ex(call TSRMLS_CC);
     613             :                         }
     614             :                 }
     615             :         } else { /* ZEND_OVERLOADED_FUNCTION */
     616           0 :                 EG(scope) = fbc->common.scope;
     617             : 
     618           0 :                 ZVAL_NULL(EX_VAR(opline->result.var));
     619             : 
     620             :                 /* Not sure what should be done here if it's a static method */
     621           0 :                 if (EXPECTED(object != NULL)) {
     622           0 :                         call->prev_execute_data = execute_data;
     623           0 :                         EG(current_execute_data) = call;
     624           0 :                         object->handlers->call_method(fbc->common.function_name, object, call, EX_VAR(opline->result.var) TSRMLS_CC);
     625           0 :                         EG(current_execute_data) = call->prev_execute_data;
     626             :                 } else {
     627           0 :                         zend_error_noreturn(E_ERROR, "Cannot call overloaded function for non-object");
     628             :                 }
     629             : 
     630             :                 zend_vm_stack_free_args(call TSRMLS_CC);
     631             : 
     632             :                 zend_vm_stack_free_call_frame(call TSRMLS_CC);
     633             : 
     634           0 :                 if (fbc->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY) {
     635           0 :                         zend_string_release(fbc->common.function_name);
     636             :                 }
     637           0 :                 efree(fbc);
     638             : 
     639           0 :                 if (!RETURN_VALUE_USED(opline)) {
     640           0 :                         zval_ptr_dtor(EX_VAR(opline->result.var));
     641             :                 } else {
     642             : //???                   Z_UNSET_ISREF_P(EX_T(opline->result.var).var.ptr);
     643             : //???                   Z_SET_REFCOUNT_P(EX_T(opline->result.var).var.ptr, 1);
     644           0 :                         Z_VAR_FLAGS_P(EX_VAR(opline->result.var)) = 0;
     645             :                 }
     646             :         }
     647             : 
     648             : fcall_end_change_scope:
     649      594276 :         if (object) {
     650      591164 :                 if (UNEXPECTED(EG(exception) != NULL) && (opline->op1.num & ZEND_CALL_CTOR)) {
     651         301 :                         if (!(opline->op1.num & ZEND_CALL_CTOR_RESULT_UNUSED)) {
     652         235 :                                 GC_REFCOUNT(object)--;
     653             :                         }
     654         301 :                         if (GC_REFCOUNT(object) == 1) {
     655         218 :                                 zend_object_store_ctor_failed(object TSRMLS_CC);
     656             :                         }
     657             :                 }
     658             :                 OBJ_RELEASE(object);
     659             :         }
     660      594276 :         EG(scope) = EX(scope);
     661             : 
     662             : fcall_end:
     663    16581995 :         if (UNEXPECTED(EG(exception) != NULL)) {
     664         982 :                 zend_throw_exception_internal(NULL TSRMLS_CC);
     665         982 :                 if (RETURN_VALUE_USED(opline)) {
     666         280 :                         zval_ptr_dtor(EX_VAR(opline->result.var));
     667             :                 }
     668         982 :                 HANDLE_EXCEPTION();
     669             :         }
     670             : 
     671    16581013 :         ZEND_VM_NEXT_OPCODE();
     672             : }
     673             : 
     674          57 : static int ZEND_FASTCALL  ZEND_GENERATOR_RETURN_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
     675             : {
     676             :         /* The generator object is stored in EX(return_value) */
     677          57 :         zend_generator *generator = (zend_generator *) EX(return_value);
     678             : 
     679             :         /* Close the generator to free up resources */
     680          57 :         zend_generator_close(generator, 1 TSRMLS_CC);
     681             : 
     682             :         /* Pass execution back to handling code */
     683          57 :         ZEND_VM_RETURN();
     684             : }
     685             : 
     686          61 : static int ZEND_FASTCALL  ZEND_SEND_UNPACK_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
     687             : {
     688          61 :         USE_OPLINE
     689             :         zend_free_op free_op1;
     690             :         zval *args;
     691             :         int arg_num;
     692             :         SAVE_OPLINE();
     693             : 
     694          61 :         args = get_zval_ptr(opline->op1_type, &opline->op1, execute_data, &free_op1, BP_VAR_R);
     695          61 :         arg_num = EX(call)->num_args + 1;
     696             : 
     697             : send_again:
     698          61 :         switch (Z_TYPE_P(args)) {
     699             :                 case IS_ARRAY: {
     700          44 :                         HashTable *ht = Z_ARRVAL_P(args);
     701             :                         zval *arg, *top;
     702             :                         zend_string *name;
     703             : 
     704          44 :                         zend_vm_stack_extend_call_frame(&EX(call), arg_num - 1, zend_hash_num_elements(ht) TSRMLS_CC);
     705             : 
     706          44 :                         if (opline->op1_type != IS_CONST && opline->op1_type != IS_TMP_VAR && Z_IMMUTABLE_P(args)) {
     707             :                                 uint32_t i;
     708           0 :                                 int separate = 0;
     709             : 
     710             :                                 /* check if any of arguments are going to be passed by reference */
     711           0 :                                 for (i = 0; i < zend_hash_num_elements(ht); i++) {
     712           0 :                                         if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, arg_num + i)) {
     713           0 :                                                 separate = 1;
     714           0 :                                                 break;
     715             :                                         }
     716             :                                 }
     717           0 :                                 if (separate) {
     718             :                                         zval_copy_ctor(args);
     719           0 :                                         ht = Z_ARRVAL_P(args);
     720             :                                 }
     721             :                         }
     722             : 
     723       40213 :                         ZEND_HASH_FOREACH_STR_KEY_VAL(ht, name, arg) {
     724       20085 :                                 if (name) {
     725           1 :                                         zend_error(E_RECOVERABLE_ERROR, "Cannot unpack array with string keys");
     726           1 :                                         FREE_OP(free_op1);
     727             :                                         CHECK_EXCEPTION();
     728           1 :                                         ZEND_VM_NEXT_OPCODE();
     729             :                                 }
     730             : 
     731       20084 :                                 top = ZEND_CALL_ARG(EX(call), arg_num);
     732       40168 :                                 if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, arg_num)) {
     733          20 :                                         if (!Z_IMMUTABLE_P(args)) {
     734          40 :                                                 ZVAL_MAKE_REF(arg);
     735             :                                                 Z_ADDREF_P(arg);
     736          20 :                                                 ZVAL_REF(top, Z_REF_P(arg));
     737             :                                         } else {
     738           0 :                                                 ZVAL_DUP(top, arg);
     739             :                                         }
     740       20064 :                                 } else if (Z_ISREF_P(arg)) {
     741           7 :                                         ZVAL_COPY(top, Z_REFVAL_P(arg));
     742             :                                 } else {
     743       20057 :                                         ZVAL_COPY(top, arg);
     744             :                                 }
     745             : 
     746       20084 :                                 EX(call)->num_args++;
     747       20084 :                                 arg_num++;
     748             :                         } ZEND_HASH_FOREACH_END();
     749             : 
     750          43 :                         break;
     751             :                 }
     752             :                 case IS_OBJECT: {
     753          13 :                         zend_class_entry *ce = Z_OBJCE_P(args);
     754             :                         zend_object_iterator *iter;
     755             : 
     756          13 :                         if (!ce || !ce->get_iterator) {
     757           2 :                                 zend_error(E_WARNING, "Only arrays and Traversables can be unpacked");
     758           2 :                                 break;
     759             :                         }
     760             : 
     761          11 :                         iter = ce->get_iterator(ce, args, 0 TSRMLS_CC);
     762          11 :                         if (UNEXPECTED(!iter)) {
     763           1 :                                 FREE_OP(free_op1);
     764           1 :                                 if (!EG(exception)) {
     765           0 :                                         zend_throw_exception_ex(
     766           0 :                                                 NULL, 0 TSRMLS_CC, "Object of type %s did not create an Iterator", ce->name->val
     767             :                                         );
     768             :                                 }
     769           1 :                                 HANDLE_EXCEPTION();
     770             :                         }
     771             : 
     772          10 :                         if (iter->funcs->rewind) {
     773          10 :                                 iter->funcs->rewind(iter TSRMLS_CC);
     774          10 :                                 if (UNEXPECTED(EG(exception) != NULL)) {
     775           0 :                                         goto unpack_iter_dtor;
     776             :                                 }
     777             :                         }
     778             : 
     779          31 :                         for (; iter->funcs->valid(iter TSRMLS_CC) == SUCCESS; ++arg_num) {
     780             :                                 zval *arg, *top;
     781             : 
     782          23 :                                 if (UNEXPECTED(EG(exception) != NULL)) {
     783           0 :                                         goto unpack_iter_dtor;
     784             :                                 }
     785             : 
     786          23 :                                 arg = iter->funcs->get_current_data(iter TSRMLS_CC);
     787          23 :                                 if (UNEXPECTED(EG(exception) != NULL)) {
     788           0 :                                         goto unpack_iter_dtor;
     789             :                                 }
     790             : 
     791          23 :                                 if (iter->funcs->get_current_key) {
     792             :                                         zval key;
     793          23 :                                         iter->funcs->get_current_key(iter, &key TSRMLS_CC);
     794          23 :                                         if (UNEXPECTED(EG(exception) != NULL)) {
     795           0 :                                                 goto unpack_iter_dtor;
     796             :                                         }
     797             : 
     798          23 :                                         if (Z_TYPE(key) == IS_STRING) {
     799           1 :                                                 zend_error(E_RECOVERABLE_ERROR,
     800             :                                                         "Cannot unpack Traversable with string keys");
     801             :                                                 zval_dtor(&key);
     802           1 :                                                 goto unpack_iter_dtor;
     803             :                                         }
     804             : 
     805             :                                         zval_dtor(&key);
     806             :                                 }
     807             : 
     808          44 :                                 if (ARG_MUST_BE_SENT_BY_REF(EX(call)->func, arg_num)) {
     809           9 :                                         zend_error(
     810             :                                                 E_WARNING, "Cannot pass by-reference argument %d of %s%s%s()"
     811             :                                                 " by unpacking a Traversable, passing by-value instead", arg_num,
     812           3 :                                                 EX(call)->func->common.scope ? EX(call)->func->common.scope->name->val : "",
     813           3 :                                                 EX(call)->func->common.scope ? "::" : "",
     814           3 :                                                 EX(call)->func->common.function_name->val
     815             :                                         );
     816             :                                 }
     817             : 
     818          22 :                                 if (Z_ISREF_P(arg)) {
     819           0 :                                         ZVAL_DUP(arg, Z_REFVAL_P(arg));
     820             :                                 } else {
     821          22 :                                         if (Z_REFCOUNTED_P(arg)) Z_ADDREF_P(arg);
     822             :                                 }
     823             : 
     824          22 :                                 zend_vm_stack_extend_call_frame(&EX(call), arg_num - 1, 1 TSRMLS_CC);
     825          22 :                                 top = ZEND_CALL_ARG(EX(call), arg_num);
     826          22 :                                 ZVAL_COPY_VALUE(top, arg);
     827          22 :                                 EX(call)->num_args++;
     828             : 
     829          22 :                                 iter->funcs->move_forward(iter TSRMLS_CC);
     830          22 :                                 if (UNEXPECTED(EG(exception) != NULL)) {
     831           1 :                                         goto unpack_iter_dtor;
     832             :                                 }
     833             :                         }
     834             : 
     835             : unpack_iter_dtor:
     836          10 :                         zend_iterator_dtor(iter TSRMLS_CC);
     837          10 :                         break;
     838             :                 }
     839             :                 case IS_REFERENCE:
     840           0 :                         args = Z_REFVAL_P(args);
     841           0 :                         goto send_again;
     842             :                         break;
     843             :                 default:
     844           4 :                         zend_error(E_WARNING, "Only arrays and Traversables can be unpacked");
     845             :         }
     846             : 
     847          59 :         FREE_OP(free_op1);
     848             :         CHECK_EXCEPTION();
     849          59 :         ZEND_VM_NEXT_OPCODE();
     850             : }
     851             : 
     852         163 : static int ZEND_FASTCALL  ZEND_SEND_ARRAY_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
     853             : {
     854         163 :         USE_OPLINE
     855             :         zend_free_op free_op1;
     856             :         zval *args;
     857             :         SAVE_OPLINE();
     858             : 
     859         163 :         args = get_zval_ptr_deref(opline->op1_type, &opline->op1, execute_data, &free_op1, BP_VAR_R);
     860             : 
     861         163 :         if (Z_TYPE_P(args) != IS_ARRAY) {
     862          25 :                 zend_error(E_WARNING, "call_user_func_array() expects parameter 2 to be array, %s given", zend_get_type_by_const(Z_TYPE_P(args)));
     863          25 :                 if (EX(call)->func->common.fn_flags & ZEND_ACC_CLOSURE) {
     864           0 :                         OBJ_RELEASE((zend_object*)EX(call)->func->common.prototype);
     865             :                 }
     866          25 :                 if (Z_OBJ(EX(call)->This)) {
     867           0 :                         OBJ_RELEASE(Z_OBJ(EX(call)->This));
     868             :                 }
     869          25 :                 EX(call)->func = (zend_function*)&zend_pass_function;
     870          25 :                 EX(call)->called_scope = NULL;
     871          25 :                 Z_OBJ(EX(call)->This) = NULL;
     872             :         } else {
     873         138 :                 uint32_t arg_num = 1;
     874             : 
     875         138 :                 HashTable *ht = Z_ARRVAL_P(args);
     876             :                 zval *arg, *param, tmp;
     877             : 
     878         138 :                 zend_vm_stack_extend_call_frame(&EX(call), 0, zend_hash_num_elements(ht) TSRMLS_CC);
     879             : 
     880         138 :                 if (opline->op1_type != IS_CONST && opline->op1_type != IS_TMP_VAR && Z_IMMUTABLE_P(args)) {
     881             :                         uint32_t i;
     882           0 :                         int separate = 0;
     883             : 
     884             :                         /* check if any of arguments are going to be passed by reference */
     885           0 :                         for (i = 0; i < zend_hash_num_elements(ht); i++) {
     886           0 :                                 if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, arg_num + i)) {
     887           0 :                                         separate = 1;
     888           0 :                                         break;
     889             :                                 }
     890             :                         }
     891           0 :                         if (separate) {
     892             :                                 zval_copy_ctor(args);
     893           0 :                                 ht = Z_ARRVAL_P(args);
     894             :                         }
     895             :                 }
     896             : 
     897         138 :                 param = ZEND_CALL_ARG(EX(call), arg_num);
     898      133815 :                 ZEND_HASH_FOREACH_VAL(ht, arg) {
     899      133680 :                         if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, arg_num)) {
     900             :                                 // TODO: Scalar values don't have reference counters anymore.
     901             :                                 // They are assumed to be 1, and they may be easily passed by
     902             :                                 // reference now. However, previously scalars with refcount==1
     903             :                                 // might be passed and with refcount>1 might not. We can support
     904             :                                 // only single behavior ???
     905             : #if 0
     906             :                                 if (Z_REFCOUNTED_P(arg) &&
     907             :                                         // This solution breaks the following test (omit warning message) ???
     908             :                                         // Zend/tests/bug61273.phpt
     909             :                                         // ext/reflection/tests/bug42976.phpt
     910             :                                         // ext/standard/tests/general_functions/call_user_func_array_variation_001.phpt
     911             : #else
     912      133083 :                                 if (!Z_REFCOUNTED_P(arg) ||
     913             :                                         // This solution breaks the following test (emit warning message) ???
     914             :                                         // ext/pdo_sqlite/tests/pdo_005.phpt
     915             : #endif
     916             :                                     (!Z_ISREF_P(arg) && Z_REFCOUNT_P(arg) > 1)) {
     917             : 
     918           8 :                                         if (!ARG_MAY_BE_SENT_BY_REF(EX(call)->func, arg_num)) {
     919             : 
     920           9 :                                                 zend_error(E_WARNING, "Parameter %d to %s%s%s() expected to be a reference, value given",
     921             :                                                         arg_num,
     922           3 :                                                         EX(call)->func->common.scope ? EX(call)->func->common.scope->name->val : "",
     923           3 :                                                         EX(call)->func->common.scope ? "::" : "",
     924           3 :                                                         EX(call)->func->common.function_name->val);
     925             : 
     926           3 :                                                 if (EX(call)->func->common.fn_flags & ZEND_ACC_CLOSURE) {
     927           1 :                                                         OBJ_RELEASE((zend_object*)EX(call)->func->common.prototype);
     928             :                                                 }
     929           3 :                                                 if (Z_OBJ(EX(call)->This)) {
     930           0 :                                                         OBJ_RELEASE(Z_OBJ(EX(call)->This));
     931             :                                                 }
     932           3 :                                                 EX(call)->func = (zend_function*)&zend_pass_function;
     933           3 :                                                 EX(call)->called_scope = NULL;
     934           3 :                                                 Z_OBJ(EX(call)->This) = NULL;
     935             : 
     936           3 :                                                 break;
     937             :                                         }
     938             : 
     939           1 :                                         if (Z_REFCOUNTED_P(arg)) {
     940             :                                                 Z_DELREF_P(arg);
     941             :                                         }
     942           1 :                                         ZVAL_DUP(&tmp, arg);
     943           1 :                                         ZVAL_NEW_REF(arg, &tmp);
     944             :                                         Z_ADDREF_P(arg);
     945       66536 :                                 } else if (!Z_ISREF_P(arg)) {
     946           0 :                                         ZVAL_NEW_REF(arg, arg);
     947             :                                         Z_ADDREF_P(arg);
     948       66536 :                                 } else if (Z_REFCOUNTED_P(arg)) {
     949             :                                         Z_ADDREF_P(arg);
     950             :                                 }
     951       66537 :                                 ZVAL_COPY_VALUE(param, arg);
     952         320 :                         } else if (Z_ISREF_P(arg) &&
     953             :                            /* don't separate references for __call */
     954          11 :                            (EX(call)->func->common.fn_flags & ZEND_ACC_CALL_VIA_HANDLER) == 0) {
     955           9 :                                 ZVAL_DUP(param, Z_REFVAL_P(arg));
     956             :                         } else {
     957         291 :                                 ZVAL_COPY(param, arg);
     958             :                         }
     959       66837 :                         EX(call)->num_args++;
     960       66837 :                         arg_num++;
     961       66837 :                         param++;
     962             :                 } ZEND_HASH_FOREACH_END();
     963             :         }
     964         163 :         FREE_OP(free_op1);
     965             :         CHECK_EXCEPTION();
     966         163 :         ZEND_VM_NEXT_OPCODE();
     967             : }
     968             : 
     969         811 : static int ZEND_FASTCALL  ZEND_RECV_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
     970             : {
     971         811 :         USE_OPLINE
     972         811 :         uint32_t arg_num = opline->op1.num;
     973             : 
     974             :         SAVE_OPLINE();
     975         811 :         if (UNEXPECTED(arg_num > EX(num_args))) {
     976          75 :                 zend_verify_missing_arg(execute_data, arg_num TSRMLS_CC);
     977             :                 CHECK_EXCEPTION();
     978         736 :         } else if (UNEXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) != 0)) {
     979        1472 :                 zval *param = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->result.var TSRMLS_CC);
     980             : 
     981         736 :                 zend_verify_arg_type(EX(func), arg_num, param TSRMLS_CC);
     982             :                 CHECK_EXCEPTION();
     983             :         }
     984             : 
     985         794 :         ZEND_VM_NEXT_OPCODE();
     986             : }
     987             : 
     988          45 : static int ZEND_FASTCALL  ZEND_RECV_VARIADIC_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
     989             : {
     990          45 :         USE_OPLINE
     991          45 :         uint32_t arg_num = opline->op1.num;
     992          45 :         uint32_t arg_count = EX(num_args);
     993             :         zval *params;
     994             : 
     995             :         SAVE_OPLINE();
     996             : 
     997          90 :         params = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->result.var TSRMLS_CC);
     998             : 
     999          45 :         if (arg_num <= arg_count) {
    1000             :                 zval *param;
    1001             : 
    1002          30 :                 array_init_size(params, arg_count - arg_num + 1);
    1003          30 :                 param = EX_VAR_NUM(EX(func)->op_array.last_var + EX(func)->op_array.T);
    1004          30 :                 if (UNEXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) != 0)) {
    1005             :                         do {
    1006           9 :                                 zend_verify_arg_type(EX(func), arg_num, param TSRMLS_CC);
    1007           8 :                                 zend_hash_next_index_insert_new(Z_ARRVAL_P(params), param);
    1008           8 :                                 if (Z_REFCOUNTED_P(param)) Z_ADDREF_P(param);
    1009           8 :                                 param++;
    1010           8 :                         } while (++arg_num <= arg_count);
    1011             :                 } else {
    1012             :                         do {
    1013       20083 :                                 zend_hash_next_index_insert_new(Z_ARRVAL_P(params), param);
    1014       20083 :                                 if (Z_REFCOUNTED_P(param)) Z_ADDREF_P(param);
    1015       20083 :                                 param++;
    1016       20083 :                         } while (++arg_num <= arg_count);
    1017             :                 }
    1018             :         } else {
    1019          15 :                 array_init(params);
    1020             :         }
    1021             : 
    1022             :         CHECK_EXCEPTION();
    1023          44 :         ZEND_VM_NEXT_OPCODE();
    1024             : }
    1025             : 
    1026     1472964 : static int ZEND_FASTCALL  ZEND_BEGIN_SILENCE_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1027             : {
    1028     1472964 :         USE_OPLINE
    1029             : 
    1030             :         SAVE_OPLINE();
    1031     1472964 :         ZVAL_LONG(EX_VAR(opline->result.var), EG(error_reporting));
    1032     1472964 :         if (EX(silence_op_num) == -1) {
    1033     1472951 :                 EX(silence_op_num) = opline->op2.num;
    1034     1472951 :                 EX(old_error_reporting) = EG(error_reporting);
    1035             :         }
    1036             : 
    1037     1472964 :         if (EG(error_reporting)) {
    1038             :                 do {
    1039     1245352 :                         EG(error_reporting) = 0;
    1040     1245352 :                         if (!EG(error_reporting_ini_entry)) {
    1041        4780 :                                 zend_ini_entry *p = zend_hash_str_find_ptr(EG(ini_directives), "error_reporting", sizeof("error_reporting")-1);
    1042        2390 :                                 if (p) {
    1043        2390 :                                         EG(error_reporting_ini_entry) = p;
    1044             :                                 } else {
    1045           0 :                                         break;
    1046             :                                 }
    1047             :                         }
    1048     1245352 :                         if (!EG(error_reporting_ini_entry)->modified) {
    1049        2319 :                                 if (!EG(modified_ini_directives)) {
    1050        1636 :                                         ALLOC_HASHTABLE(EG(modified_ini_directives));
    1051        1636 :                                         zend_hash_init(EG(modified_ini_directives), 8, NULL, NULL, 0);
    1052             :                                 }
    1053        4638 :                                 if (EXPECTED(zend_hash_str_add_ptr(EG(modified_ini_directives), "error_reporting", sizeof("error_reporting")-1, EG(error_reporting_ini_entry)) != NULL)) {
    1054        2319 :                                         EG(error_reporting_ini_entry)->orig_value = EG(error_reporting_ini_entry)->value;
    1055        2319 :                                         EG(error_reporting_ini_entry)->orig_modifiable = EG(error_reporting_ini_entry)->modifiable;
    1056        2319 :                                         EG(error_reporting_ini_entry)->modified = 1;
    1057             :                                 }
    1058             :                         }
    1059             :                 } while (0);
    1060             :         }
    1061             :         CHECK_EXCEPTION();
    1062     1472964 :         ZEND_VM_NEXT_OPCODE();
    1063             : }
    1064             : 
    1065           0 : static int ZEND_FASTCALL  ZEND_EXT_STMT_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1066             : {
    1067             :         SAVE_OPLINE();
    1068           0 :         if (!EG(no_extensions)) {
    1069           0 :                 zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_statement_handler, EX(func) TSRMLS_CC);
    1070             :         }
    1071             :         CHECK_EXCEPTION();
    1072           0 :         ZEND_VM_NEXT_OPCODE();
    1073             : }
    1074             : 
    1075           0 : static int ZEND_FASTCALL  ZEND_EXT_FCALL_BEGIN_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1076             : {
    1077             :         SAVE_OPLINE();
    1078           0 :         if (!EG(no_extensions)) {
    1079           0 :                 zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_fcall_begin_handler, EX(func) TSRMLS_CC);
    1080             :         }
    1081             :         CHECK_EXCEPTION();
    1082           0 :         ZEND_VM_NEXT_OPCODE();
    1083             : }
    1084             : 
    1085           0 : static int ZEND_FASTCALL  ZEND_EXT_FCALL_END_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1086             : {
    1087             :         SAVE_OPLINE();
    1088           0 :         if (!EG(no_extensions)) {
    1089           0 :                 zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_fcall_end_handler, EX(func) TSRMLS_CC);
    1090             :         }
    1091             :         CHECK_EXCEPTION();
    1092           0 :         ZEND_VM_NEXT_OPCODE();
    1093             : }
    1094             : 
    1095         416 : static int ZEND_FASTCALL  ZEND_DECLARE_CLASS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1096             : {
    1097         416 :         USE_OPLINE
    1098             : 
    1099             :         SAVE_OPLINE();
    1100         416 :         Z_CE_P(EX_VAR(opline->result.var)) = do_bind_class(&EX(func)->op_array, opline, EG(class_table), 0 TSRMLS_CC);
    1101             :         CHECK_EXCEPTION();
    1102         414 :         ZEND_VM_NEXT_OPCODE();
    1103             : }
    1104             : 
    1105        1279 : static int ZEND_FASTCALL  ZEND_DECLARE_INHERITED_CLASS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1106             : {
    1107        1279 :         USE_OPLINE
    1108             : 
    1109             :         SAVE_OPLINE();
    1110        1279 :         Z_CE_P(EX_VAR(opline->result.var)) = do_bind_inherited_class(&EX(func)->op_array, opline, EG(class_table), Z_CE_P(EX_VAR(opline->extended_value)), 0 TSRMLS_CC);
    1111             :         CHECK_EXCEPTION();
    1112        1276 :         ZEND_VM_NEXT_OPCODE();
    1113             : }
    1114             : 
    1115           0 : static int ZEND_FASTCALL  ZEND_DECLARE_INHERITED_CLASS_DELAYED_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1116             : {
    1117           0 :         USE_OPLINE
    1118             :         zval *zce, *orig_zce;
    1119             : 
    1120             :         SAVE_OPLINE();
    1121           0 :         if ((zce = zend_hash_find(EG(class_table), Z_STR_P(opline->op2.zv))) == NULL ||
    1122           0 :             ((orig_zce = zend_hash_find(EG(class_table), Z_STR_P(opline->op1.zv))) != NULL &&
    1123           0 :              Z_CE_P(zce) != Z_CE_P(orig_zce))) {
    1124           0 :                 do_bind_inherited_class(&EX(func)->op_array, opline, EG(class_table), Z_CE_P(EX_VAR(opline->extended_value)), 0 TSRMLS_CC);
    1125             :         }
    1126             :         CHECK_EXCEPTION();
    1127           0 :         ZEND_VM_NEXT_OPCODE();
    1128             : }
    1129             : 
    1130        3054 : static int ZEND_FASTCALL  ZEND_DECLARE_FUNCTION_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1131             : {
    1132        3054 :         USE_OPLINE
    1133             : 
    1134             :         SAVE_OPLINE();
    1135        3054 :         do_bind_function(&EX(func)->op_array, opline, EG(function_table), 0 TSRMLS_CC);
    1136             :         CHECK_EXCEPTION();
    1137        3054 :         ZEND_VM_NEXT_OPCODE();
    1138             : }
    1139             : 
    1140          34 : static int ZEND_FASTCALL  ZEND_TICKS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1141             : {
    1142          34 :         USE_OPLINE
    1143             : 
    1144             :         SAVE_OPLINE();
    1145          34 :         if (++EG(ticks_count)>=opline->extended_value) {
    1146          34 :                 EG(ticks_count)=0;
    1147          34 :                 if (zend_ticks_function) {
    1148          34 :                         zend_ticks_function(opline->extended_value TSRMLS_CC);
    1149             :                 }
    1150             :         }
    1151             :         CHECK_EXCEPTION();
    1152          34 :         ZEND_VM_NEXT_OPCODE();
    1153             : }
    1154             : 
    1155           0 : static int ZEND_FASTCALL  ZEND_EXT_NOP_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1156             : {
    1157           0 :         ZEND_VM_NEXT_OPCODE();
    1158             : }
    1159             : 
    1160       19702 : static int ZEND_FASTCALL  ZEND_NOP_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1161             : {
    1162       19702 :         ZEND_VM_NEXT_OPCODE();
    1163             : }
    1164             : 
    1165         233 : static int ZEND_FASTCALL  ZEND_ADD_TRAIT_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1166             : {
    1167         233 :         USE_OPLINE
    1168         233 :         zend_class_entry *ce = Z_CE_P(EX_VAR(opline->op1.var));
    1169             :         zend_class_entry *trait;
    1170             : 
    1171             :         SAVE_OPLINE();
    1172         233 :         if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv))) {
    1173           0 :                 trait = CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv));
    1174             :         } else {
    1175         233 :                 trait = zend_fetch_class_by_name(Z_STR_P(opline->op2.zv),
    1176             :                                                  opline->op2.zv + 1,
    1177             :                                                  ZEND_FETCH_CLASS_TRAIT TSRMLS_CC);
    1178         231 :                 if (UNEXPECTED(trait == NULL)) {
    1179             :                         CHECK_EXCEPTION();
    1180           0 :                         ZEND_VM_NEXT_OPCODE();
    1181             :                 }
    1182         231 :                 if (!((trait->ce_flags & ZEND_ACC_TRAIT) == ZEND_ACC_TRAIT)) {
    1183           4 :                         zend_error_noreturn(E_ERROR, "%s cannot use %s - it is not a trait", ce->name->val, trait->name->val);
    1184             :                 }
    1185         227 :                 CACHE_PTR(Z_CACHE_SLOT_P(opline->op2.zv), trait);
    1186             :         }
    1187             : 
    1188         227 :         zend_do_implement_trait(ce, trait TSRMLS_CC);
    1189             : 
    1190             :         CHECK_EXCEPTION();
    1191         227 :         ZEND_VM_NEXT_OPCODE();
    1192             : }
    1193             : 
    1194         168 : static int ZEND_FASTCALL  ZEND_BIND_TRAITS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1195             : {
    1196         168 :         USE_OPLINE
    1197         168 :         zend_class_entry *ce = Z_CE_P(EX_VAR(opline->op1.var));
    1198             : 
    1199             :         SAVE_OPLINE();
    1200         168 :         zend_do_bind_traits(ce TSRMLS_CC);
    1201             :         CHECK_EXCEPTION();
    1202         126 :         ZEND_VM_NEXT_OPCODE();
    1203             : }
    1204             : 
    1205        1618 : static int ZEND_FASTCALL  ZEND_HANDLE_EXCEPTION_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1206             : {
    1207        1618 :         uint32_t op_num = EG(opline_before_exception) - EX(func)->op_array.opcodes;
    1208             :         int i;
    1209        1618 :         uint32_t catch_op_num = 0, finally_op_num = 0, finally_op_end = 0;
    1210             : 
    1211        4304 :         for (i = 0; i < EX(func)->op_array.last_try_catch; i++) {
    1212        3117 :                 if (EX(func)->op_array.try_catch_array[i].try_op > op_num) {
    1213             :                         /* further blocks will not be relevant... */
    1214         431 :                         break;
    1215             :                 }
    1216        2686 :                 if (op_num < EX(func)->op_array.try_catch_array[i].catch_op) {
    1217        1145 :                         catch_op_num = EX(func)->op_array.try_catch_array[i].catch_op;
    1218             :                 }
    1219        2686 :                 if (op_num < EX(func)->op_array.try_catch_array[i].finally_op) {
    1220          48 :                         finally_op_num = EX(func)->op_array.try_catch_array[i].finally_op;
    1221             :                 }
    1222        5324 :                 if (op_num >= EX(func)->op_array.try_catch_array[i].finally_op &&
    1223        2638 :                                 op_num < EX(func)->op_array.try_catch_array[i].finally_end) {
    1224          12 :                         finally_op_end = EX(func)->op_array.try_catch_array[i].finally_end;
    1225             :                 }
    1226             :         }
    1227             : 
    1228        1618 :         if (EX(call)) {
    1229         356 :                 zend_execute_data *call = EX(call);
    1230             :                 do {
    1231             :                         /* If the exception was thrown during a function call there might be
    1232             :                          * arguments pushed to the stack that have to be dtor'ed. */
    1233         369 :                         zend_vm_stack_free_args(EX(call) TSRMLS_CC);
    1234             : 
    1235         369 :                         if (Z_OBJ(call->This)) {
    1236          12 :                                 if (call->frame_info & ZEND_CALL_CTOR) {
    1237           5 :                                         if (!(call->frame_info & ZEND_CALL_CTOR_RESULT_UNUSED)) {
    1238           4 :                                                 GC_REFCOUNT(Z_OBJ(call->This))--;
    1239             :                                         }
    1240           5 :                                         if (GC_REFCOUNT(Z_OBJ(call->This)) == 1) {
    1241           5 :                                                 zend_object_store_ctor_failed(Z_OBJ(call->This) TSRMLS_CC);
    1242             :                                         }
    1243             :                                 }
    1244          12 :                                 OBJ_RELEASE(Z_OBJ(call->This));
    1245             :                         }
    1246         369 :                         EX(call) = call->prev_execute_data;
    1247             :                         zend_vm_stack_free_call_frame(call TSRMLS_CC);
    1248         369 :                         call = EX(call);
    1249         369 :                 } while (call);
    1250             :         }
    1251             : 
    1252        2097 :         for (i = 0; i < EX(func)->op_array.last_brk_cont; i++) {
    1253         568 :                 if (EX(func)->op_array.brk_cont_array[i].start < 0) {
    1254         110 :                         continue;
    1255         458 :                 } else if (EX(func)->op_array.brk_cont_array[i].start > op_num) {
    1256             :                         /* further blocks will not be relevant... */
    1257          89 :                         break;
    1258         369 :                 } else if (op_num < EX(func)->op_array.brk_cont_array[i].brk) {
    1259         449 :                         if (!catch_op_num ||
    1260         223 :                             catch_op_num >= EX(func)->op_array.brk_cont_array[i].brk) {
    1261           7 :                                 zend_op *brk_opline = &EX(func)->op_array.opcodes[EX(func)->op_array.brk_cont_array[i].brk];
    1262             : 
    1263           7 :                                 if (brk_opline->opcode == ZEND_FREE) {
    1264           6 :                                         if (!(brk_opline->extended_value & EXT_TYPE_FREE_ON_RETURN)) {
    1265           6 :                                                 zval_ptr_dtor_nogc(EX_VAR(brk_opline->op1.var));
    1266             :                                         }
    1267             :                                 }
    1268             :                         }
    1269             :                 }
    1270             :         }
    1271             : 
    1272             :         /* restore previous error_reporting value */
    1273        1618 :         if (!EG(error_reporting) && EX(silence_op_num) != -1 && EX(old_error_reporting) != 0) {
    1274          26 :                 EG(error_reporting) = EX(old_error_reporting);
    1275             :         }
    1276        1618 :         EX(silence_op_num) = -1;
    1277             : 
    1278        1618 :         if (finally_op_num && (!catch_op_num || catch_op_num >= finally_op_num)) {
    1279          14 :                 if (EX(delayed_exception)) {
    1280           0 :                         zend_exception_set_previous(EG(exception), EX(delayed_exception) TSRMLS_CC);
    1281             :                 }
    1282          14 :                 EX(delayed_exception) = EG(exception);
    1283          14 :                 EG(exception) = NULL;
    1284          14 :                 EX(fast_ret) = NULL;
    1285          14 :                 ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[finally_op_num]);
    1286          14 :                 ZEND_VM_CONTINUE();
    1287        1604 :         } else if (catch_op_num) {
    1288        1114 :                 if (finally_op_end && catch_op_num > finally_op_end) {
    1289             :                         /* we are going out of current finally scope */
    1290           5 :                         if (EX(delayed_exception)) {
    1291           1 :                                 zend_exception_set_previous(EG(exception), EX(delayed_exception) TSRMLS_CC);
    1292           1 :                                 EX(delayed_exception) = NULL;
    1293             :                         }
    1294             :                 }
    1295        1114 :                 ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[catch_op_num]);
    1296        1114 :                 ZEND_VM_CONTINUE();
    1297             :         } else {
    1298         490 :                 if (EX(delayed_exception)) {
    1299           1 :                         zend_exception_set_previous(EG(exception), EX(delayed_exception) TSRMLS_CC);
    1300           1 :                         EX(delayed_exception) = NULL;
    1301             :                 }
    1302         490 :                 if (UNEXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_GENERATOR) != 0)) {
    1303           7 :                         return ZEND_GENERATOR_RETURN_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    1304             :                 } else {
    1305         483 :                         return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    1306             :                 }
    1307             :         }
    1308             : }
    1309             : 
    1310         248 : static int ZEND_FASTCALL  ZEND_VERIFY_ABSTRACT_CLASS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1311             : {
    1312         248 :         USE_OPLINE
    1313             : 
    1314             :         SAVE_OPLINE();
    1315         248 :         zend_verify_abstract_class(Z_CE_P(EX_VAR(opline->op1.var)) TSRMLS_CC);
    1316             :         CHECK_EXCEPTION();
    1317         243 :         ZEND_VM_NEXT_OPCODE();
    1318             : }
    1319             : 
    1320           0 : static int ZEND_FASTCALL  ZEND_USER_OPCODE_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1321             : {
    1322           0 :         USE_OPLINE
    1323             :         int ret;
    1324             : 
    1325             :         SAVE_OPLINE();
    1326           0 :         ret = zend_user_opcode_handlers[opline->opcode](ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_INTERNAL);
    1327             :         LOAD_OPLINE();
    1328             : 
    1329           0 :         switch (ret) {
    1330             :                 case ZEND_USER_OPCODE_CONTINUE:
    1331           0 :                         ZEND_VM_CONTINUE();
    1332             :                 case ZEND_USER_OPCODE_RETURN:
    1333           0 :                         if (UNEXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_GENERATOR) != 0)) {
    1334           0 :                                 return ZEND_GENERATOR_RETURN_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    1335             :                         } else {
    1336           0 :                                 return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    1337             :                         }
    1338             :                 case ZEND_USER_OPCODE_ENTER:
    1339           0 :                         ZEND_VM_ENTER();
    1340             :                 case ZEND_USER_OPCODE_LEAVE:
    1341           0 :                         ZEND_VM_LEAVE();
    1342             :                 case ZEND_USER_OPCODE_DISPATCH:
    1343           0 :                         ZEND_VM_DISPATCH(opline->opcode, opline);
    1344             :                 default:
    1345           0 :                         ZEND_VM_DISPATCH((zend_uchar)(ret & 0xff), opline);
    1346             :         }
    1347             : }
    1348             : 
    1349           7 : static int ZEND_FASTCALL  ZEND_DISCARD_EXCEPTION_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1350             : {
    1351           7 :         if (EX(delayed_exception) != NULL) {
    1352             :                 /* discard the previously thrown exception */
    1353           1 :                 OBJ_RELEASE(EX(delayed_exception));
    1354           1 :                 EX(delayed_exception) = NULL;
    1355             :         }
    1356             : 
    1357           7 :         ZEND_VM_NEXT_OPCODE();
    1358             : }
    1359             : 
    1360          54 : static int ZEND_FASTCALL  ZEND_FAST_CALL_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1361             : {
    1362          54 :         USE_OPLINE
    1363             : 
    1364          61 :         if ((opline->extended_value & ZEND_FAST_CALL_FROM_CATCH) &&
    1365           7 :             UNEXPECTED(EG(prev_exception) != NULL)) {
    1366             :             /* in case of unhandled exception jump to catch block instead of finally */
    1367           0 :                 ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[opline->op2.opline_num]);
    1368           0 :                 ZEND_VM_CONTINUE();
    1369             :         }
    1370          54 :         EX(fast_ret) = opline;
    1371          54 :         EX(delayed_exception) = NULL;
    1372          54 :         ZEND_VM_SET_OPCODE(opline->op1.jmp_addr);
    1373          54 :         ZEND_VM_CONTINUE();
    1374             : }
    1375             : 
    1376          53 : static int ZEND_FASTCALL  ZEND_FAST_RET_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1377             : {
    1378          53 :         if (EX(fast_ret)) {
    1379          36 :                 ZEND_VM_SET_OPCODE(EX(fast_ret) + 1);
    1380          36 :                 if ((EX(fast_ret)->extended_value & ZEND_FAST_CALL_FROM_FINALLY)) {
    1381           7 :                         EX(fast_ret) = &EX(func)->op_array.opcodes[EX(fast_ret)->op2.opline_num];
    1382             :                 }
    1383          36 :                 ZEND_VM_CONTINUE();
    1384             :         } else {
    1385             :                 /* special case for unhandled exceptions */
    1386          17 :                 USE_OPLINE
    1387             : 
    1388          17 :                 if (opline->extended_value == ZEND_FAST_RET_TO_FINALLY) {
    1389           5 :                         ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[opline->op2.opline_num]);
    1390           5 :                         ZEND_VM_CONTINUE();
    1391             :                 } else {
    1392          12 :                         EG(exception) = EX(delayed_exception);
    1393          12 :                         EX(delayed_exception) = NULL;
    1394          12 :                         if (opline->extended_value == ZEND_FAST_RET_TO_CATCH) {
    1395           5 :                                 ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[opline->op2.opline_num]);
    1396           5 :                                 ZEND_VM_CONTINUE();
    1397           7 :                         } else if (UNEXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_GENERATOR) != 0)) {
    1398           3 :                                 return ZEND_GENERATOR_RETURN_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    1399             :                         } else {
    1400           4 :                                 return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    1401             :                         }
    1402             :                 }
    1403             :         }
    1404             : }
    1405             : 
    1406        1281 : static int ZEND_FASTCALL  ZEND_FETCH_CLASS_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1407             : {
    1408        1281 :         USE_OPLINE
    1409             : 
    1410             :         SAVE_OPLINE();
    1411        1281 :         if (EG(exception)) {
    1412           0 :                 zend_exception_save(TSRMLS_C);
    1413             :         }
    1414        1281 :         if (IS_CONST == IS_UNUSED) {
    1415             :                 Z_CE_P(EX_VAR(opline->result.var)) = zend_fetch_class(NULL, opline->extended_value TSRMLS_CC);
    1416             :                 CHECK_EXCEPTION();
    1417             :                 ZEND_VM_NEXT_OPCODE();
    1418             :         } else {
    1419             : 
    1420        1281 :                 zval *class_name = opline->op2.zv;
    1421             : 
    1422             :                 if (IS_CONST == IS_CONST) {
    1423        1281 :                         if (CACHED_PTR(Z_CACHE_SLOT_P(class_name))) {
    1424           0 :                                 Z_CE_P(EX_VAR(opline->result.var)) = CACHED_PTR(Z_CACHE_SLOT_P(class_name));
    1425             :                         } else {
    1426        1281 :                                 Z_CE_P(EX_VAR(opline->result.var)) = zend_fetch_class_by_name(Z_STR_P(class_name), opline->op2.zv + 1, opline->extended_value TSRMLS_CC);
    1427        1280 :                                 CACHE_PTR(Z_CACHE_SLOT_P(class_name), Z_CE_P(EX_VAR(opline->result.var)));
    1428             :                         }
    1429             :                 } else if (Z_TYPE_P(class_name) == IS_OBJECT) {
    1430             :                         Z_CE_P(EX_VAR(opline->result.var)) = Z_OBJCE_P(class_name);
    1431             :                 } else if (Z_TYPE_P(class_name) == IS_STRING) {
    1432             :                         Z_CE_P(EX_VAR(opline->result.var)) = zend_fetch_class(Z_STR_P(class_name), opline->extended_value TSRMLS_CC);
    1433             :                 } else {
    1434             :                         if (UNEXPECTED(EG(exception) != NULL)) {
    1435             :                                 HANDLE_EXCEPTION();
    1436             :                         }
    1437             :                         zend_error_noreturn(E_ERROR, "Class name must be a valid object or a string");
    1438             :                 }
    1439             : 
    1440             :                 CHECK_EXCEPTION();
    1441        1280 :                 ZEND_VM_NEXT_OPCODE();
    1442             :         }
    1443             : }
    1444             : 
    1445      363739 : static int ZEND_FASTCALL  ZEND_INIT_FCALL_BY_NAME_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1446             : {
    1447      363739 :         USE_OPLINE
    1448             :         zend_function *fbc;
    1449             :         zval *function_name, *func;
    1450             : 
    1451      727478 :         if (IS_CONST == IS_CONST && Z_TYPE_P(opline->op2.zv) == IS_STRING) {
    1452      363738 :                 function_name = (zval*)(opline->op2.zv+1);
    1453      363738 :                 if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv))) {
    1454      360966 :                         fbc = CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv));
    1455        2772 :                 } else if (UNEXPECTED((func = zend_hash_find(EG(function_table), Z_STR_P(function_name))) == NULL)) {
    1456             :                         SAVE_OPLINE();
    1457          14 :                         zend_error_noreturn(E_ERROR, "Call to undefined function %s()", Z_STRVAL_P(opline->op2.zv));
    1458             :                 } else {
    1459        2758 :                         fbc = Z_FUNC_P(func);
    1460        2758 :                         CACHE_PTR(Z_CACHE_SLOT_P(opline->op2.zv), fbc);
    1461             :                 }
    1462             : 
    1463     1091172 :                 EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
    1464      363724 :                         fbc, opline->extended_value, NULL, NULL, EX(call) TSRMLS_CC);
    1465             : 
    1466             :                 /*CHECK_EXCEPTION();*/
    1467      363724 :                 ZEND_VM_NEXT_OPCODE();
    1468             :         } else {
    1469             :                 zend_string *lcname;
    1470             : 
    1471             :                 zend_class_entry *called_scope;
    1472             :                 zend_object *object;
    1473             :                 zval *function_name_ptr;
    1474             : 
    1475             :                 SAVE_OPLINE();
    1476           1 :                 function_name_ptr = function_name = opline->op2.zv;
    1477             : 
    1478           1 :                 ZVAL_DEREF(function_name);
    1479           1 :                 if (EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
    1480           0 :                         if (Z_STRVAL_P(function_name)[0] == '\\') {
    1481           0 :                                 lcname = zend_string_alloc(Z_STRLEN_P(function_name) - 1, 0);
    1482           0 :                                 zend_str_tolower_copy(lcname->val, Z_STRVAL_P(function_name) + 1, Z_STRLEN_P(function_name) - 1);
    1483             :                         } else {
    1484           0 :                                 lcname = zend_string_alloc(Z_STRLEN_P(function_name), 0);
    1485           0 :                                 zend_str_tolower_copy(lcname->val, Z_STRVAL_P(function_name), Z_STRLEN_P(function_name));
    1486             :                         }
    1487           0 :                         if (UNEXPECTED((func = zend_hash_find(EG(function_table), lcname)) == NULL)) {
    1488           0 :                                 zend_error_noreturn(E_ERROR, "Call to undefined function %s()", Z_STRVAL_P(function_name));
    1489             :                         }
    1490             :                         zend_string_free(lcname);
    1491             : 
    1492           0 :                         fbc = Z_FUNC_P(func);
    1493           0 :                         called_scope = NULL;
    1494           0 :                         object = NULL;
    1495           1 :                 } else if (IS_CONST != IS_CONST &&
    1496             :                     EXPECTED(Z_TYPE_P(function_name) == IS_OBJECT) &&
    1497             :                         Z_OBJ_HANDLER_P(function_name, get_closure) &&
    1498             :                         Z_OBJ_HANDLER_P(function_name, get_closure)(function_name, &called_scope, &fbc, &object TSRMLS_CC) == SUCCESS) {
    1499             :                         if (object) {
    1500             :                                 GC_REFCOUNT(object)++;
    1501             :                         }
    1502             :                         if (IS_CONST == IS_VAR && 0 && Z_REFCOUNT_P(function_name) == 1 &&
    1503             :                             fbc->common.fn_flags & ZEND_ACC_CLOSURE) {
    1504             :                                 /* Delay closure destruction until its invocation */
    1505             :                                 fbc->common.prototype = (zend_function*)Z_OBJ_P(function_name_ptr);
    1506             :                         } else if (IS_CONST == IS_CV) {
    1507             : 
    1508             :                         }
    1509           3 :                 } else if (EXPECTED(Z_TYPE_P(function_name) == IS_ARRAY) &&
    1510           1 :                                 zend_hash_num_elements(Z_ARRVAL_P(function_name)) == 2) {
    1511             :                         zval *obj;
    1512             :                         zval *method;
    1513             : 
    1514           1 :                         obj = zend_hash_index_find(Z_ARRVAL_P(function_name), 0);
    1515           1 :                         method = zend_hash_index_find(Z_ARRVAL_P(function_name), 1);
    1516             : 
    1517           1 :                         if (!obj || !method) {
    1518           0 :                                 zend_error_noreturn(E_ERROR, "Array callback has to contain indices 0 and 1");
    1519             :                         }
    1520             : 
    1521           1 :                         ZVAL_DEREF(obj);
    1522           1 :                         if (Z_TYPE_P(obj) != IS_STRING && Z_TYPE_P(obj) != IS_OBJECT) {
    1523           0 :                                 zend_error_noreturn(E_ERROR, "First array member is not a valid class name or object");
    1524             :                         }
    1525             : 
    1526           1 :                         ZVAL_DEREF(method);
    1527           1 :                         if (Z_TYPE_P(method) != IS_STRING) {
    1528           0 :                                 zend_error_noreturn(E_ERROR, "Second array member is not a valid method");
    1529             :                         }
    1530             : 
    1531           1 :                         if (Z_TYPE_P(obj) == IS_STRING) {
    1532           1 :                                 object = NULL;
    1533           1 :                                 called_scope = zend_fetch_class_by_name(Z_STR_P(obj), NULL, 0 TSRMLS_CC);
    1534           1 :                                 if (UNEXPECTED(called_scope == NULL)) {
    1535             :                                         CHECK_EXCEPTION();
    1536           0 :                                         ZEND_VM_NEXT_OPCODE();
    1537             :                                 }
    1538             : 
    1539           1 :                                 if (called_scope->get_static_method) {
    1540           0 :                                         fbc = called_scope->get_static_method(called_scope, Z_STR_P(method) TSRMLS_CC);
    1541             :                                 } else {
    1542           1 :                                         fbc = zend_std_get_static_method(called_scope, Z_STR_P(method), NULL TSRMLS_CC);
    1543             :                                 }
    1544           1 :                                 if (UNEXPECTED(fbc == NULL)) {
    1545           0 :                                         zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", called_scope->name->val, Z_STRVAL_P(method));
    1546             :                                 }
    1547           1 :                                 if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
    1548           0 :                                         if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
    1549           0 :                                                 zend_error(E_STRICT,
    1550             :                                                 "Non-static method %s::%s() should not be called statically",
    1551           0 :                                                 fbc->common.scope->name->val, fbc->common.function_name->val);
    1552             :                                         } else {
    1553           0 :                                                 zend_error_noreturn(
    1554             :                                                         E_ERROR,
    1555             :                                                         "Non-static method %s::%s() cannot be called statically",
    1556           0 :                                                         fbc->common.scope->name->val, fbc->common.function_name->val);
    1557             :                                         }
    1558             :                                 }
    1559             :                         } else {
    1560           0 :                                 called_scope = Z_OBJCE_P(obj);
    1561           0 :                                 object = Z_OBJ_P(obj);
    1562             : 
    1563           0 :                                 fbc = Z_OBJ_HT_P(obj)->get_method(&object, Z_STR_P(method), NULL TSRMLS_CC);
    1564           0 :                                 if (UNEXPECTED(fbc == NULL)) {
    1565           0 :                                         zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", object->ce->name->val, Z_STRVAL_P(method));
    1566             :                                 }
    1567             : 
    1568           0 :                                 if ((fbc->common.fn_flags & ZEND_ACC_STATIC) != 0) {
    1569           0 :                                         object = NULL;
    1570             :                                 } else {
    1571           0 :                                         GC_REFCOUNT(object)++; /* For $this pointer */
    1572             :                                 }
    1573             :                         }
    1574             : 
    1575             :                 } else {
    1576           0 :                         if (UNEXPECTED(EG(exception) != NULL)) {
    1577           0 :                                 HANDLE_EXCEPTION();
    1578             :                         }
    1579           0 :                         zend_error_noreturn(E_ERROR, "Function name must be a string");
    1580             :                         ZEND_VM_CONTINUE(); /* Never reached */
    1581             :                 }
    1582           3 :                 EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
    1583           1 :                         fbc, opline->extended_value, called_scope, object, EX(call) TSRMLS_CC);
    1584             : 
    1585             :                 CHECK_EXCEPTION();
    1586           1 :                 ZEND_VM_NEXT_OPCODE();
    1587             :         }
    1588             : }
    1589             : 
    1590         301 : static int ZEND_FASTCALL  ZEND_INIT_NS_FCALL_BY_NAME_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1591             : {
    1592         301 :         USE_OPLINE
    1593             :         zval *func_name;
    1594             :         zval *func;
    1595             :         zend_function *fbc;
    1596             : 
    1597         301 :         func_name = opline->op2.zv + 1;
    1598         301 :         if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv))) {
    1599           8 :                 fbc = CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv));
    1600         293 :         } else if ((func = zend_hash_find(EG(function_table), Z_STR_P(func_name))) == NULL) {
    1601         243 :                 func_name++;
    1602         243 :                 if (UNEXPECTED((func = zend_hash_find(EG(function_table), Z_STR_P(func_name))) == NULL)) {
    1603             :                         SAVE_OPLINE();
    1604           0 :                         zend_error_noreturn(E_ERROR, "Call to undefined function %s()", Z_STRVAL_P(opline->op2.zv));
    1605             :                 } else {
    1606         243 :                         fbc = Z_FUNC_P(func);
    1607         243 :                         CACHE_PTR(Z_CACHE_SLOT_P(opline->op2.zv), fbc);
    1608             :                 }
    1609             :         } else {
    1610          50 :                 fbc = Z_FUNC_P(func);
    1611          50 :                 CACHE_PTR(Z_CACHE_SLOT_P(opline->op2.zv), fbc);
    1612             :         }
    1613             : 
    1614         903 :         EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
    1615         301 :                 fbc, opline->extended_value, NULL, NULL, EX(call) TSRMLS_CC);
    1616             : 
    1617         301 :         ZEND_VM_NEXT_OPCODE();
    1618             : }
    1619             : 
    1620    17122971 : static int ZEND_FASTCALL  ZEND_INIT_FCALL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1621             : {
    1622    17122971 :         USE_OPLINE
    1623             : 
    1624    17122971 :         zval *fname = opline->op2.zv;
    1625             :         zval *func;
    1626             :         zend_function *fbc;
    1627             : 
    1628    17122971 :         if (CACHED_PTR(Z_CACHE_SLOT_P(fname))) {
    1629    16968244 :                 fbc = CACHED_PTR(Z_CACHE_SLOT_P(fname));
    1630      154727 :         } else if (UNEXPECTED((func = zend_hash_find(EG(function_table), Z_STR_P(fname))) == NULL)) {
    1631             :             SAVE_OPLINE();
    1632           2 :                 zend_error_noreturn(E_ERROR, "Call to undefined function %s()", Z_STRVAL_P(fname));
    1633             :         } else {
    1634      154725 :                 fbc = Z_FUNC_P(func);
    1635      154725 :                 CACHE_PTR(Z_CACHE_SLOT_P(fname), fbc);
    1636             :         }
    1637             : 
    1638    51368907 :         EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
    1639    17122969 :                 fbc, opline->extended_value, NULL, NULL, EX(call) TSRMLS_CC);
    1640             : 
    1641    17122969 :         ZEND_VM_NEXT_OPCODE();
    1642             : }
    1643             : 
    1644      185955 : static int ZEND_FASTCALL  ZEND_RECV_INIT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1645             : {
    1646      185955 :         USE_OPLINE
    1647      185955 :         uint32_t arg_num = opline->op1.num;
    1648             :         zval *param;
    1649             : 
    1650             :         SAVE_OPLINE();
    1651      371910 :         param = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->result.var TSRMLS_CC);
    1652      185955 :         if (arg_num > EX(num_args)) {
    1653       98489 :                 ZVAL_COPY_VALUE(param, opline->op2.zv);
    1654       98489 :                 if (Z_OPT_CONSTANT_P(param)) {
    1655         101 :                         zval_update_constant(param, 0 TSRMLS_CC);
    1656             :                 } else {
    1657             :                         /* IS_CONST can't be IS_OBJECT, IS_RESOURCE or IS_REFERENCE */
    1658       98388 :                         if (UNEXPECTED(Z_OPT_COPYABLE_P(param))) {
    1659          29 :                                 zval_copy_ctor_func(param);
    1660             :                         }
    1661             :                 }
    1662             :         }
    1663             : 
    1664      185935 :         if (UNEXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) != 0)) {
    1665       87527 :                 zend_verify_arg_type(EX(func), arg_num, param TSRMLS_CC);
    1666             :         }
    1667             : 
    1668             :         CHECK_EXCEPTION();
    1669      185933 :         ZEND_VM_NEXT_OPCODE();
    1670             : }
    1671             : 
    1672       33723 : static int ZEND_FASTCALL  ZEND_BRK_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1673             : {
    1674       33723 :         USE_OPLINE
    1675             :         zend_brk_cont_element *el;
    1676             : 
    1677             :         SAVE_OPLINE();
    1678       33723 :         el = zend_brk_cont(Z_LVAL_P(opline->op2.zv), opline->op1.opline_num,
    1679       33723 :                            &EX(func)->op_array, execute_data TSRMLS_CC);
    1680       33722 :         ZEND_VM_JMP(EX(func)->op_array.opcodes + el->brk);
    1681             : }
    1682             : 
    1683       45561 : static int ZEND_FASTCALL  ZEND_CONT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1684             : {
    1685       45561 :         USE_OPLINE
    1686             :         zend_brk_cont_element *el;
    1687             : 
    1688             :         SAVE_OPLINE();
    1689       45561 :         el = zend_brk_cont(Z_LVAL_P(opline->op2.zv), opline->op1.opline_num,
    1690       45561 :                            &EX(func)->op_array, execute_data TSRMLS_CC);
    1691       45561 :         ZEND_VM_JMP(EX(func)->op_array.opcodes + el->cont);
    1692             : }
    1693             : 
    1694           2 : static int ZEND_FASTCALL  ZEND_GOTO_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1695             : {
    1696             :         zend_op *brk_opline;
    1697           2 :         USE_OPLINE
    1698             :         zend_brk_cont_element *el;
    1699             : 
    1700             :         SAVE_OPLINE();
    1701           2 :         el = zend_brk_cont(Z_LVAL_P(opline->op2.zv), opline->extended_value,
    1702           2 :                            &EX(func)->op_array, execute_data TSRMLS_CC);
    1703             : 
    1704           2 :         brk_opline = EX(func)->op_array.opcodes + el->brk;
    1705             : 
    1706           2 :         if (brk_opline->opcode == ZEND_FREE) {
    1707           1 :                 if (!(brk_opline->extended_value & EXT_TYPE_FREE_ON_RETURN)) {
    1708           1 :                         zval_ptr_dtor_nogc(EX_VAR(brk_opline->op1.var));
    1709             :                 }
    1710             :         }
    1711           2 :         ZEND_VM_JMP(opline->op1.jmp_addr);
    1712             : }
    1713             : 
    1714         364 : static int ZEND_FASTCALL  ZEND_ADD_INTERFACE_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1715             : {
    1716         364 :         USE_OPLINE
    1717         364 :         zend_class_entry *ce = Z_CE_P(EX_VAR(opline->op1.var));
    1718             :         zend_class_entry *iface;
    1719             : 
    1720             :         SAVE_OPLINE();
    1721         364 :         if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv))) {
    1722           0 :                 iface = CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv));
    1723             :         } else {
    1724         364 :                 iface = zend_fetch_class_by_name(Z_STR_P(opline->op2.zv), opline->op2.zv + 1, ZEND_FETCH_CLASS_INTERFACE TSRMLS_CC);
    1725         362 :                 if (UNEXPECTED(iface == NULL)) {
    1726             :                         CHECK_EXCEPTION();
    1727           1 :                         ZEND_VM_NEXT_OPCODE();
    1728             :                 }
    1729         361 :                 CACHE_PTR(Z_CACHE_SLOT_P(opline->op2.zv), iface);
    1730             :         }
    1731             : 
    1732         361 :         if (UNEXPECTED((iface->ce_flags & ZEND_ACC_INTERFACE) == 0)) {
    1733           4 :                 zend_error_noreturn(E_ERROR, "%s cannot implement %s - it is not an interface", ce->name->val, iface->name->val);
    1734             :         }
    1735         357 :         zend_do_implement_interface(ce, iface TSRMLS_CC);
    1736             : 
    1737             :         CHECK_EXCEPTION();
    1738         334 :         ZEND_VM_NEXT_OPCODE();
    1739             : }
    1740             : 
    1741           0 : static int ZEND_FASTCALL  ZEND_FETCH_CLASS_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1742             : {
    1743           0 :         USE_OPLINE
    1744             : 
    1745             :         SAVE_OPLINE();
    1746           0 :         if (EG(exception)) {
    1747           0 :                 zend_exception_save(TSRMLS_C);
    1748             :         }
    1749           0 :         if (IS_TMP_VAR == IS_UNUSED) {
    1750             :                 Z_CE_P(EX_VAR(opline->result.var)) = zend_fetch_class(NULL, opline->extended_value TSRMLS_CC);
    1751             :                 CHECK_EXCEPTION();
    1752             :                 ZEND_VM_NEXT_OPCODE();
    1753             :         } else {
    1754             :                 zend_free_op free_op2;
    1755           0 :                 zval *class_name = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2);
    1756             : 
    1757           0 :                 if (IS_TMP_VAR == IS_CONST) {
    1758             :                         if (CACHED_PTR(Z_CACHE_SLOT_P(class_name))) {
    1759             :                                 Z_CE_P(EX_VAR(opline->result.var)) = CACHED_PTR(Z_CACHE_SLOT_P(class_name));
    1760             :                         } else {
    1761             :                                 Z_CE_P(EX_VAR(opline->result.var)) = zend_fetch_class_by_name(Z_STR_P(class_name), opline->op2.zv + 1, opline->extended_value TSRMLS_CC);
    1762             :                                 CACHE_PTR(Z_CACHE_SLOT_P(class_name), Z_CE_P(EX_VAR(opline->result.var)));
    1763             :                         }
    1764           0 :                 } else if (Z_TYPE_P(class_name) == IS_OBJECT) {
    1765           0 :                         Z_CE_P(EX_VAR(opline->result.var)) = Z_OBJCE_P(class_name);
    1766           0 :                 } else if (Z_TYPE_P(class_name) == IS_STRING) {
    1767           0 :                         Z_CE_P(EX_VAR(opline->result.var)) = zend_fetch_class(Z_STR_P(class_name), opline->extended_value TSRMLS_CC);
    1768             :                 } else {
    1769           0 :                         if (UNEXPECTED(EG(exception) != NULL)) {
    1770           0 :                                 HANDLE_EXCEPTION();
    1771             :                         }
    1772           0 :                         zend_error_noreturn(E_ERROR, "Class name must be a valid object or a string");
    1773             :                 }
    1774             : 
    1775           0 :                 zval_ptr_dtor_nogc(free_op2);
    1776             :                 CHECK_EXCEPTION();
    1777           0 :                 ZEND_VM_NEXT_OPCODE();
    1778             :         }
    1779             : }
    1780             : 
    1781           2 : static int ZEND_FASTCALL  ZEND_INIT_FCALL_BY_NAME_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1782             : {
    1783           2 :         USE_OPLINE
    1784             :         zend_function *fbc;
    1785             :         zval *function_name, *func;
    1786             : 
    1787           2 :         if (IS_TMP_VAR == IS_CONST && Z_TYPE_P(opline->op2.zv) == IS_STRING) {
    1788             :                 function_name = (zval*)(opline->op2.zv+1);
    1789             :                 if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv))) {
    1790             :                         fbc = CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv));
    1791             :                 } else if (UNEXPECTED((func = zend_hash_find(EG(function_table), Z_STR_P(function_name))) == NULL)) {
    1792             :                         SAVE_OPLINE();
    1793             :                         zend_error_noreturn(E_ERROR, "Call to undefined function %s()", Z_STRVAL_P(opline->op2.zv));
    1794             :                 } else {
    1795             :                         fbc = Z_FUNC_P(func);
    1796             :                         CACHE_PTR(Z_CACHE_SLOT_P(opline->op2.zv), fbc);
    1797             :                 }
    1798             : 
    1799             :                 EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
    1800             :                         fbc, opline->extended_value, NULL, NULL, EX(call) TSRMLS_CC);
    1801             : 
    1802             :                 /*CHECK_EXCEPTION();*/
    1803             :                 ZEND_VM_NEXT_OPCODE();
    1804             :         } else {
    1805             :                 zend_string *lcname;
    1806             :                 zend_free_op free_op2;
    1807             :                 zend_class_entry *called_scope;
    1808             :                 zend_object *object;
    1809             :                 zval *function_name_ptr;
    1810             : 
    1811             :                 SAVE_OPLINE();
    1812           4 :                 function_name_ptr = function_name = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2);
    1813             : 
    1814           2 :                 ZVAL_DEREF(function_name);
    1815           2 :                 if (EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
    1816           0 :                         if (Z_STRVAL_P(function_name)[0] == '\\') {
    1817           0 :                                 lcname = zend_string_alloc(Z_STRLEN_P(function_name) - 1, 0);
    1818           0 :                                 zend_str_tolower_copy(lcname->val, Z_STRVAL_P(function_name) + 1, Z_STRLEN_P(function_name) - 1);
    1819             :                         } else {
    1820           0 :                                 lcname = zend_string_alloc(Z_STRLEN_P(function_name), 0);
    1821           0 :                                 zend_str_tolower_copy(lcname->val, Z_STRVAL_P(function_name), Z_STRLEN_P(function_name));
    1822             :                         }
    1823           0 :                         if (UNEXPECTED((func = zend_hash_find(EG(function_table), lcname)) == NULL)) {
    1824           0 :                                 zend_error_noreturn(E_ERROR, "Call to undefined function %s()", Z_STRVAL_P(function_name));
    1825             :                         }
    1826             :                         zend_string_free(lcname);
    1827           0 :                         zval_ptr_dtor_nogc(free_op2);
    1828             : 
    1829           0 :                         fbc = Z_FUNC_P(func);
    1830           0 :                         called_scope = NULL;
    1831           0 :                         object = NULL;
    1832           5 :                 } else if (IS_TMP_VAR != IS_CONST &&
    1833           2 :                     EXPECTED(Z_TYPE_P(function_name) == IS_OBJECT) &&
    1834           1 :                         Z_OBJ_HANDLER_P(function_name, get_closure) &&
    1835           1 :                         Z_OBJ_HANDLER_P(function_name, get_closure)(function_name, &called_scope, &fbc, &object TSRMLS_CC) == SUCCESS) {
    1836           1 :                         if (object) {
    1837           0 :                                 GC_REFCOUNT(object)++;
    1838             :                         }
    1839           1 :                         if (IS_TMP_VAR == IS_VAR && 1 && Z_REFCOUNT_P(function_name) == 1 &&
    1840             :                             fbc->common.fn_flags & ZEND_ACC_CLOSURE) {
    1841             :                                 /* Delay closure destruction until its invocation */
    1842             :                                 fbc->common.prototype = (zend_function*)Z_OBJ_P(function_name_ptr);
    1843           1 :                         } else if (IS_TMP_VAR == IS_CV) {
    1844             :                                 zval_ptr_dtor_nogc(free_op2);
    1845             :                         }
    1846           3 :                 } else if (EXPECTED(Z_TYPE_P(function_name) == IS_ARRAY) &&
    1847           1 :                                 zend_hash_num_elements(Z_ARRVAL_P(function_name)) == 2) {
    1848             :                         zval *obj;
    1849             :                         zval *method;
    1850             : 
    1851           1 :                         obj = zend_hash_index_find(Z_ARRVAL_P(function_name), 0);
    1852           1 :                         method = zend_hash_index_find(Z_ARRVAL_P(function_name), 1);
    1853             : 
    1854           1 :                         if (!obj || !method) {
    1855           0 :                                 zend_error_noreturn(E_ERROR, "Array callback has to contain indices 0 and 1");
    1856             :                         }
    1857             : 
    1858           1 :                         ZVAL_DEREF(obj);
    1859           2 :                         if (Z_TYPE_P(obj) != IS_STRING && Z_TYPE_P(obj) != IS_OBJECT) {
    1860           0 :                                 zend_error_noreturn(E_ERROR, "First array member is not a valid class name or object");
    1861             :                         }
    1862             : 
    1863           1 :                         ZVAL_DEREF(method);
    1864           1 :                         if (Z_TYPE_P(method) != IS_STRING) {
    1865           0 :                                 zend_error_noreturn(E_ERROR, "Second array member is not a valid method");
    1866             :                         }
    1867             : 
    1868           1 :                         if (Z_TYPE_P(obj) == IS_STRING) {
    1869           0 :                                 object = NULL;
    1870           0 :                                 called_scope = zend_fetch_class_by_name(Z_STR_P(obj), NULL, 0 TSRMLS_CC);
    1871           0 :                                 if (UNEXPECTED(called_scope == NULL)) {
    1872             :                                         CHECK_EXCEPTION();
    1873           0 :                                         ZEND_VM_NEXT_OPCODE();
    1874             :                                 }
    1875             : 
    1876           0 :                                 if (called_scope->get_static_method) {
    1877           0 :                                         fbc = called_scope->get_static_method(called_scope, Z_STR_P(method) TSRMLS_CC);
    1878             :                                 } else {
    1879           0 :                                         fbc = zend_std_get_static_method(called_scope, Z_STR_P(method), NULL TSRMLS_CC);
    1880             :                                 }
    1881           0 :                                 if (UNEXPECTED(fbc == NULL)) {
    1882           0 :                                         zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", called_scope->name->val, Z_STRVAL_P(method));
    1883             :                                 }
    1884           0 :                                 if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
    1885           0 :                                         if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
    1886           0 :                                                 zend_error(E_STRICT,
    1887             :                                                 "Non-static method %s::%s() should not be called statically",
    1888           0 :                                                 fbc->common.scope->name->val, fbc->common.function_name->val);
    1889             :                                         } else {
    1890           0 :                                                 zend_error_noreturn(
    1891             :                                                         E_ERROR,
    1892             :                                                         "Non-static method %s::%s() cannot be called statically",
    1893           0 :                                                         fbc->common.scope->name->val, fbc->common.function_name->val);
    1894             :                                         }
    1895             :                                 }
    1896             :                         } else {
    1897           1 :                                 called_scope = Z_OBJCE_P(obj);
    1898           1 :                                 object = Z_OBJ_P(obj);
    1899             : 
    1900           1 :                                 fbc = Z_OBJ_HT_P(obj)->get_method(&object, Z_STR_P(method), NULL TSRMLS_CC);
    1901           1 :                                 if (UNEXPECTED(fbc == NULL)) {
    1902           0 :                                         zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", object->ce->name->val, Z_STRVAL_P(method));
    1903             :                                 }
    1904             : 
    1905           1 :                                 if ((fbc->common.fn_flags & ZEND_ACC_STATIC) != 0) {
    1906           1 :                                         object = NULL;
    1907             :                                 } else {
    1908           0 :                                         GC_REFCOUNT(object)++; /* For $this pointer */
    1909             :                                 }
    1910             :                         }
    1911           1 :                         zval_ptr_dtor_nogc(free_op2);
    1912             :                 } else {
    1913           0 :                         if (UNEXPECTED(EG(exception) != NULL)) {
    1914           0 :                                 HANDLE_EXCEPTION();
    1915             :                         }
    1916           0 :                         zend_error_noreturn(E_ERROR, "Function name must be a string");
    1917             :                         ZEND_VM_CONTINUE(); /* Never reached */
    1918             :                 }
    1919           6 :                 EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
    1920           2 :                         fbc, opline->extended_value, called_scope, object, EX(call) TSRMLS_CC);
    1921             : 
    1922             :                 CHECK_EXCEPTION();
    1923           2 :                 ZEND_VM_NEXT_OPCODE();
    1924             :         }
    1925             : }
    1926             : 
    1927          17 : static int ZEND_FASTCALL  ZEND_FETCH_CLASS_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1928             : {
    1929          17 :         USE_OPLINE
    1930             : 
    1931             :         SAVE_OPLINE();
    1932          17 :         if (EG(exception)) {
    1933           0 :                 zend_exception_save(TSRMLS_C);
    1934             :         }
    1935          17 :         if (IS_VAR == IS_UNUSED) {
    1936             :                 Z_CE_P(EX_VAR(opline->result.var)) = zend_fetch_class(NULL, opline->extended_value TSRMLS_CC);
    1937             :                 CHECK_EXCEPTION();
    1938             :                 ZEND_VM_NEXT_OPCODE();
    1939             :         } else {
    1940             :                 zend_free_op free_op2;
    1941          34 :                 zval *class_name = _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2);
    1942             : 
    1943          17 :                 if (IS_VAR == IS_CONST) {
    1944             :                         if (CACHED_PTR(Z_CACHE_SLOT_P(class_name))) {
    1945             :                                 Z_CE_P(EX_VAR(opline->result.var)) = CACHED_PTR(Z_CACHE_SLOT_P(class_name));
    1946             :                         } else {
    1947             :                                 Z_CE_P(EX_VAR(opline->result.var)) = zend_fetch_class_by_name(Z_STR_P(class_name), opline->op2.zv + 1, opline->extended_value TSRMLS_CC);
    1948             :                                 CACHE_PTR(Z_CACHE_SLOT_P(class_name), Z_CE_P(EX_VAR(opline->result.var)));
    1949             :                         }
    1950          17 :                 } else if (Z_TYPE_P(class_name) == IS_OBJECT) {
    1951           2 :                         Z_CE_P(EX_VAR(opline->result.var)) = Z_OBJCE_P(class_name);
    1952          15 :                 } else if (Z_TYPE_P(class_name) == IS_STRING) {
    1953          15 :                         Z_CE_P(EX_VAR(opline->result.var)) = zend_fetch_class(Z_STR_P(class_name), opline->extended_value TSRMLS_CC);
    1954             :                 } else {
    1955           0 :                         if (UNEXPECTED(EG(exception) != NULL)) {
    1956           0 :                                 HANDLE_EXCEPTION();
    1957             :                         }
    1958           0 :                         zend_error_noreturn(E_ERROR, "Class name must be a valid object or a string");
    1959             :                 }
    1960             : 
    1961          17 :                 zval_ptr_dtor_nogc(free_op2);
    1962             :                 CHECK_EXCEPTION();
    1963          17 :                 ZEND_VM_NEXT_OPCODE();
    1964             :         }
    1965             : }
    1966             : 
    1967          65 : static int ZEND_FASTCALL  ZEND_INIT_FCALL_BY_NAME_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1968             : {
    1969          65 :         USE_OPLINE
    1970             :         zend_function *fbc;
    1971             :         zval *function_name, *func;
    1972             : 
    1973          65 :         if (IS_VAR == IS_CONST && Z_TYPE_P(opline->op2.zv) == IS_STRING) {
    1974             :                 function_name = (zval*)(opline->op2.zv+1);
    1975             :                 if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv))) {
    1976             :                         fbc = CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv));
    1977             :                 } else if (UNEXPECTED((func = zend_hash_find(EG(function_table), Z_STR_P(function_name))) == NULL)) {
    1978             :                         SAVE_OPLINE();
    1979             :                         zend_error_noreturn(E_ERROR, "Call to undefined function %s()", Z_STRVAL_P(opline->op2.zv));
    1980             :                 } else {
    1981             :                         fbc = Z_FUNC_P(func);
    1982             :                         CACHE_PTR(Z_CACHE_SLOT_P(opline->op2.zv), fbc);
    1983             :                 }
    1984             : 
    1985             :                 EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
    1986             :                         fbc, opline->extended_value, NULL, NULL, EX(call) TSRMLS_CC);
    1987             : 
    1988             :                 /*CHECK_EXCEPTION();*/
    1989             :                 ZEND_VM_NEXT_OPCODE();
    1990             :         } else {
    1991             :                 zend_string *lcname;
    1992             :                 zend_free_op free_op2;
    1993             :                 zend_class_entry *called_scope;
    1994             :                 zend_object *object;
    1995             :                 zval *function_name_ptr;
    1996             : 
    1997             :                 SAVE_OPLINE();
    1998         130 :                 function_name_ptr = function_name = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
    1999             : 
    2000          65 :                 ZVAL_DEREF(function_name);
    2001          65 :                 if (EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
    2002          48 :                         if (Z_STRVAL_P(function_name)[0] == '\\') {
    2003           0 :                                 lcname = zend_string_alloc(Z_STRLEN_P(function_name) - 1, 0);
    2004           0 :                                 zend_str_tolower_copy(lcname->val, Z_STRVAL_P(function_name) + 1, Z_STRLEN_P(function_name) - 1);
    2005             :                         } else {
    2006          96 :                                 lcname = zend_string_alloc(Z_STRLEN_P(function_name), 0);
    2007          48 :                                 zend_str_tolower_copy(lcname->val, Z_STRVAL_P(function_name), Z_STRLEN_P(function_name));
    2008             :                         }
    2009          48 :                         if (UNEXPECTED((func = zend_hash_find(EG(function_table), lcname)) == NULL)) {
    2010           0 :                                 zend_error_noreturn(E_ERROR, "Call to undefined function %s()", Z_STRVAL_P(function_name));
    2011             :                         }
    2012             :                         zend_string_free(lcname);
    2013          48 :                         zval_ptr_dtor_nogc(free_op2);
    2014             : 
    2015          48 :                         fbc = Z_FUNC_P(func);
    2016          48 :                         called_scope = NULL;
    2017          48 :                         object = NULL;
    2018          56 :                 } else if (IS_VAR != IS_CONST &&
    2019          17 :                     EXPECTED(Z_TYPE_P(function_name) == IS_OBJECT) &&
    2020          13 :                         Z_OBJ_HANDLER_P(function_name, get_closure) &&
    2021          13 :                         Z_OBJ_HANDLER_P(function_name, get_closure)(function_name, &called_scope, &fbc, &object TSRMLS_CC) == SUCCESS) {
    2022          13 :                         if (object) {
    2023           3 :                                 GC_REFCOUNT(object)++;
    2024             :                         }
    2025          32 :                         if (IS_VAR == IS_VAR && (free_op2 != NULL) && Z_REFCOUNT_P(function_name) == 1 &&
    2026           3 :                             fbc->common.fn_flags & ZEND_ACC_CLOSURE) {
    2027             :                                 /* Delay closure destruction until its invocation */
    2028           3 :                                 fbc->common.prototype = (zend_function*)Z_OBJ_P(function_name_ptr);
    2029          10 :                         } else if (IS_VAR == IS_CV) {
    2030             :                                 zval_ptr_dtor_nogc(free_op2);
    2031             :                         }
    2032          10 :                 } else if (EXPECTED(Z_TYPE_P(function_name) == IS_ARRAY) &&
    2033           3 :                                 zend_hash_num_elements(Z_ARRVAL_P(function_name)) == 2) {
    2034             :                         zval *obj;
    2035             :                         zval *method;
    2036             : 
    2037           3 :                         obj = zend_hash_index_find(Z_ARRVAL_P(function_name), 0);
    2038           3 :                         method = zend_hash_index_find(Z_ARRVAL_P(function_name), 1);
    2039             : 
    2040           3 :                         if (!obj || !method) {
    2041           0 :                                 zend_error_noreturn(E_ERROR, "Array callback has to contain indices 0 and 1");
    2042             :                         }
    2043             : 
    2044           3 :                         ZVAL_DEREF(obj);
    2045           3 :                         if (Z_TYPE_P(obj) != IS_STRING && Z_TYPE_P(obj) != IS_OBJECT) {
    2046           0 :                                 zend_error_noreturn(E_ERROR, "First array member is not a valid class name or object");
    2047             :                         }
    2048             : 
    2049           3 :                         ZVAL_DEREF(method);
    2050           3 :                         if (Z_TYPE_P(method) != IS_STRING) {
    2051           0 :                                 zend_error_noreturn(E_ERROR, "Second array member is not a valid method");
    2052             :                         }
    2053             : 
    2054           3 :                         if (Z_TYPE_P(obj) == IS_STRING) {
    2055           3 :                                 object = NULL;
    2056           3 :                                 called_scope = zend_fetch_class_by_name(Z_STR_P(obj), NULL, 0 TSRMLS_CC);
    2057           3 :                                 if (UNEXPECTED(called_scope == NULL)) {
    2058             :                                         CHECK_EXCEPTION();
    2059           0 :                                         ZEND_VM_NEXT_OPCODE();
    2060             :                                 }
    2061             : 
    2062           3 :                                 if (called_scope->get_static_method) {
    2063           0 :                                         fbc = called_scope->get_static_method(called_scope, Z_STR_P(method) TSRMLS_CC);
    2064             :                                 } else {
    2065           3 :                                         fbc = zend_std_get_static_method(called_scope, Z_STR_P(method), NULL TSRMLS_CC);
    2066             :                                 }
    2067           3 :                                 if (UNEXPECTED(fbc == NULL)) {
    2068           0 :                                         zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", called_scope->name->val, Z_STRVAL_P(method));
    2069             :                                 }
    2070           3 :                                 if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
    2071           0 :                                         if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
    2072           0 :                                                 zend_error(E_STRICT,
    2073             :                                                 "Non-static method %s::%s() should not be called statically",
    2074           0 :                                                 fbc->common.scope->name->val, fbc->common.function_name->val);
    2075             :                                         } else {
    2076           0 :                                                 zend_error_noreturn(
    2077             :                                                         E_ERROR,
    2078             :                                                         "Non-static method %s::%s() cannot be called statically",
    2079           0 :                                                         fbc->common.scope->name->val, fbc->common.function_name->val);
    2080             :                                         }
    2081             :                                 }
    2082             :                         } else {
    2083           0 :                                 called_scope = Z_OBJCE_P(obj);
    2084           0 :                                 object = Z_OBJ_P(obj);
    2085             : 
    2086           0 :                                 fbc = Z_OBJ_HT_P(obj)->get_method(&object, Z_STR_P(method), NULL TSRMLS_CC);
    2087           0 :                                 if (UNEXPECTED(fbc == NULL)) {
    2088           0 :                                         zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", object->ce->name->val, Z_STRVAL_P(method));
    2089             :                                 }
    2090             : 
    2091           0 :                                 if ((fbc->common.fn_flags & ZEND_ACC_STATIC) != 0) {
    2092           0 :                                         object = NULL;
    2093             :                                 } else {
    2094           0 :                                         GC_REFCOUNT(object)++; /* For $this pointer */
    2095             :                                 }
    2096             :                         }
    2097           3 :                         zval_ptr_dtor_nogc(free_op2);
    2098             :                 } else {
    2099           1 :                         if (UNEXPECTED(EG(exception) != NULL)) {
    2100           0 :                                 HANDLE_EXCEPTION();
    2101             :                         }
    2102           1 :                         zend_error_noreturn(E_ERROR, "Function name must be a string");
    2103             :                         ZEND_VM_CONTINUE(); /* Never reached */
    2104             :                 }
    2105         192 :                 EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
    2106          64 :                         fbc, opline->extended_value, called_scope, object, EX(call) TSRMLS_CC);
    2107             : 
    2108             :                 CHECK_EXCEPTION();
    2109          64 :                 ZEND_VM_NEXT_OPCODE();
    2110             :         }
    2111             : }
    2112             : 
    2113        3071 : static int ZEND_FASTCALL  ZEND_FETCH_CLASS_SPEC_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2114             : {
    2115        3071 :         USE_OPLINE
    2116             : 
    2117             :         SAVE_OPLINE();
    2118        3071 :         if (EG(exception)) {
    2119           0 :                 zend_exception_save(TSRMLS_C);
    2120             :         }
    2121             :         if (IS_UNUSED == IS_UNUSED) {
    2122        3071 :                 Z_CE_P(EX_VAR(opline->result.var)) = zend_fetch_class(NULL, opline->extended_value TSRMLS_CC);
    2123             :                 CHECK_EXCEPTION();
    2124        3071 :                 ZEND_VM_NEXT_OPCODE();
    2125             :         } else {
    2126             : 
    2127             :                 zval *class_name = NULL;
    2128             : 
    2129             :                 if (IS_UNUSED == IS_CONST) {
    2130             :                         if (CACHED_PTR(Z_CACHE_SLOT_P(class_name))) {
    2131             :                                 Z_CE_P(EX_VAR(opline->result.var)) = CACHED_PTR(Z_CACHE_SLOT_P(class_name));
    2132             :                         } else {
    2133             :                                 Z_CE_P(EX_VAR(opline->result.var)) = zend_fetch_class_by_name(Z_STR_P(class_name), opline->op2.zv + 1, opline->extended_value TSRMLS_CC);
    2134             :                                 CACHE_PTR(Z_CACHE_SLOT_P(class_name), Z_CE_P(EX_VAR(opline->result.var)));
    2135             :                         }
    2136             :                 } else if (Z_TYPE_P(class_name) == IS_OBJECT) {
    2137             :                         Z_CE_P(EX_VAR(opline->result.var)) = Z_OBJCE_P(class_name);
    2138             :                 } else if (Z_TYPE_P(class_name) == IS_STRING) {
    2139             :                         Z_CE_P(EX_VAR(opline->result.var)) = zend_fetch_class(Z_STR_P(class_name), opline->extended_value TSRMLS_CC);
    2140             :                 } else {
    2141             :                         if (UNEXPECTED(EG(exception) != NULL)) {
    2142             :                                 HANDLE_EXCEPTION();
    2143             :                         }
    2144             :                         zend_error_noreturn(E_ERROR, "Class name must be a valid object or a string");
    2145             :                 }
    2146             : 
    2147             :                 CHECK_EXCEPTION();
    2148             :                 ZEND_VM_NEXT_OPCODE();
    2149             :         }
    2150             : }
    2151             : 
    2152        1122 : static int ZEND_FASTCALL  ZEND_FETCH_CLASS_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2153             : {
    2154        1122 :         USE_OPLINE
    2155             : 
    2156             :         SAVE_OPLINE();
    2157        1122 :         if (EG(exception)) {
    2158           0 :                 zend_exception_save(TSRMLS_C);
    2159             :         }
    2160        1122 :         if (IS_CV == IS_UNUSED) {
    2161             :                 Z_CE_P(EX_VAR(opline->result.var)) = zend_fetch_class(NULL, opline->extended_value TSRMLS_CC);
    2162             :                 CHECK_EXCEPTION();
    2163             :                 ZEND_VM_NEXT_OPCODE();
    2164             :         } else {
    2165             : 
    2166        2244 :                 zval *class_name = _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
    2167             : 
    2168        1122 :                 if (IS_CV == IS_CONST) {
    2169             :                         if (CACHED_PTR(Z_CACHE_SLOT_P(class_name))) {
    2170             :                                 Z_CE_P(EX_VAR(opline->result.var)) = CACHED_PTR(Z_CACHE_SLOT_P(class_name));
    2171             :                         } else {
    2172             :                                 Z_CE_P(EX_VAR(opline->result.var)) = zend_fetch_class_by_name(Z_STR_P(class_name), opline->op2.zv + 1, opline->extended_value TSRMLS_CC);
    2173             :                                 CACHE_PTR(Z_CACHE_SLOT_P(class_name), Z_CE_P(EX_VAR(opline->result.var)));
    2174             :                         }
    2175        1122 :                 } else if (Z_TYPE_P(class_name) == IS_OBJECT) {
    2176          19 :                         Z_CE_P(EX_VAR(opline->result.var)) = Z_OBJCE_P(class_name);
    2177        1103 :                 } else if (Z_TYPE_P(class_name) == IS_STRING) {
    2178        1100 :                         Z_CE_P(EX_VAR(opline->result.var)) = zend_fetch_class(Z_STR_P(class_name), opline->extended_value TSRMLS_CC);
    2179             :                 } else {
    2180           3 :                         if (UNEXPECTED(EG(exception) != NULL)) {
    2181           2 :                                 HANDLE_EXCEPTION();
    2182             :                         }
    2183           1 :                         zend_error_noreturn(E_ERROR, "Class name must be a valid object or a string");
    2184             :                 }
    2185             : 
    2186             :                 CHECK_EXCEPTION();
    2187        1114 :                 ZEND_VM_NEXT_OPCODE();
    2188             :         }
    2189             : }
    2190             : 
    2191       13531 : static int ZEND_FASTCALL  ZEND_INIT_FCALL_BY_NAME_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2192             : {
    2193       13531 :         USE_OPLINE
    2194             :         zend_function *fbc;
    2195             :         zval *function_name, *func;
    2196             : 
    2197       13531 :         if (IS_CV == IS_CONST && Z_TYPE_P(opline->op2.zv) == IS_STRING) {
    2198             :                 function_name = (zval*)(opline->op2.zv+1);
    2199             :                 if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv))) {
    2200             :                         fbc = CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv));
    2201             :                 } else if (UNEXPECTED((func = zend_hash_find(EG(function_table), Z_STR_P(function_name))) == NULL)) {
    2202             :                         SAVE_OPLINE();
    2203             :                         zend_error_noreturn(E_ERROR, "Call to undefined function %s()", Z_STRVAL_P(opline->op2.zv));
    2204             :                 } else {
    2205             :                         fbc = Z_FUNC_P(func);
    2206             :                         CACHE_PTR(Z_CACHE_SLOT_P(opline->op2.zv), fbc);
    2207             :                 }
    2208             : 
    2209             :                 EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
    2210             :                         fbc, opline->extended_value, NULL, NULL, EX(call) TSRMLS_CC);
    2211             : 
    2212             :                 /*CHECK_EXCEPTION();*/
    2213             :                 ZEND_VM_NEXT_OPCODE();
    2214             :         } else {
    2215             :                 zend_string *lcname;
    2216             : 
    2217             :                 zend_class_entry *called_scope;
    2218             :                 zend_object *object;
    2219             :                 zval *function_name_ptr;
    2220             : 
    2221             :                 SAVE_OPLINE();
    2222       27062 :                 function_name_ptr = function_name = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
    2223             : 
    2224       13531 :                 ZVAL_DEREF(function_name);
    2225       13531 :                 if (EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
    2226       13272 :                         if (Z_STRVAL_P(function_name)[0] == '\\') {
    2227           2 :                                 lcname = zend_string_alloc(Z_STRLEN_P(function_name) - 1, 0);
    2228           1 :                                 zend_str_tolower_copy(lcname->val, Z_STRVAL_P(function_name) + 1, Z_STRLEN_P(function_name) - 1);
    2229             :                         } else {
    2230       26542 :                                 lcname = zend_string_alloc(Z_STRLEN_P(function_name), 0);
    2231       13271 :                                 zend_str_tolower_copy(lcname->val, Z_STRVAL_P(function_name), Z_STRLEN_P(function_name));
    2232             :                         }
    2233       13272 :                         if (UNEXPECTED((func = zend_hash_find(EG(function_table), lcname)) == NULL)) {
    2234           1 :                                 zend_error_noreturn(E_ERROR, "Call to undefined function %s()", Z_STRVAL_P(function_name));
    2235             :                         }
    2236             :                         zend_string_free(lcname);
    2237             : 
    2238       13271 :                         fbc = Z_FUNC_P(func);
    2239       13271 :                         called_scope = NULL;
    2240       13271 :                         object = NULL;
    2241         973 :                 } else if (IS_CV != IS_CONST &&
    2242         259 :                     EXPECTED(Z_TYPE_P(function_name) == IS_OBJECT) &&
    2243         238 :                         Z_OBJ_HANDLER_P(function_name, get_closure) &&
    2244         238 :                         Z_OBJ_HANDLER_P(function_name, get_closure)(function_name, &called_scope, &fbc, &object TSRMLS_CC) == SUCCESS) {
    2245         238 :                         if (object) {
    2246          61 :                                 GC_REFCOUNT(object)++;
    2247             :                         }
    2248         238 :                         if (IS_CV == IS_VAR && 0 && Z_REFCOUNT_P(function_name) == 1 &&
    2249             :                             fbc->common.fn_flags & ZEND_ACC_CLOSURE) {
    2250             :                                 /* Delay closure destruction until its invocation */
    2251             :                                 fbc->common.prototype = (zend_function*)Z_OBJ_P(function_name_ptr);
    2252             :                         } else if (IS_CV == IS_CV) {
    2253             : 
    2254             :                         }
    2255          55 :                 } else if (EXPECTED(Z_TYPE_P(function_name) == IS_ARRAY) &&
    2256          19 :                                 zend_hash_num_elements(Z_ARRVAL_P(function_name)) == 2) {
    2257             :                         zval *obj;
    2258             :                         zval *method;
    2259             : 
    2260          19 :                         obj = zend_hash_index_find(Z_ARRVAL_P(function_name), 0);
    2261          19 :                         method = zend_hash_index_find(Z_ARRVAL_P(function_name), 1);
    2262             : 
    2263          19 :                         if (!obj || !method) {
    2264           1 :                                 zend_error_noreturn(E_ERROR, "Array callback has to contain indices 0 and 1");
    2265             :                         }
    2266             : 
    2267          18 :                         ZVAL_DEREF(obj);
    2268          27 :                         if (Z_TYPE_P(obj) != IS_STRING && Z_TYPE_P(obj) != IS_OBJECT) {
    2269           0 :                                 zend_error_noreturn(E_ERROR, "First array member is not a valid class name or object");
    2270             :                         }
    2271             : 
    2272          18 :                         ZVAL_DEREF(method);
    2273          18 :                         if (Z_TYPE_P(method) != IS_STRING) {
    2274           0 :                                 zend_error_noreturn(E_ERROR, "Second array member is not a valid method");
    2275             :                         }
    2276             : 
    2277          18 :                         if (Z_TYPE_P(obj) == IS_STRING) {
    2278           9 :                                 object = NULL;
    2279           9 :                                 called_scope = zend_fetch_class_by_name(Z_STR_P(obj), NULL, 0 TSRMLS_CC);
    2280           8 :                                 if (UNEXPECTED(called_scope == NULL)) {
    2281             :                                         CHECK_EXCEPTION();
    2282           1 :                                         ZEND_VM_NEXT_OPCODE();
    2283             :                                 }
    2284             : 
    2285           7 :                                 if (called_scope->get_static_method) {
    2286           0 :                                         fbc = called_scope->get_static_method(called_scope, Z_STR_P(method) TSRMLS_CC);
    2287             :                                 } else {
    2288           7 :                                         fbc = zend_std_get_static_method(called_scope, Z_STR_P(method), NULL TSRMLS_CC);
    2289             :                                 }
    2290           7 :                                 if (UNEXPECTED(fbc == NULL)) {
    2291           1 :                                         zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", called_scope->name->val, Z_STRVAL_P(method));
    2292             :                                 }
    2293           6 :                                 if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
    2294           1 :                                         if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
    2295           2 :                                                 zend_error(E_STRICT,
    2296             :                                                 "Non-static method %s::%s() should not be called statically",
    2297           2 :                                                 fbc->common.scope->name->val, fbc->common.function_name->val);
    2298             :                                         } else {
    2299           0 :                                                 zend_error_noreturn(
    2300             :                                                         E_ERROR,
    2301             :                                                         "Non-static method %s::%s() cannot be called statically",
    2302           0 :                                                         fbc->common.scope->name->val, fbc->common.function_name->val);
    2303             :                                         }
    2304             :                                 }
    2305             :                         } else {
    2306           9 :                                 called_scope = Z_OBJCE_P(obj);
    2307           9 :                                 object = Z_OBJ_P(obj);
    2308             : 
    2309           9 :                                 fbc = Z_OBJ_HT_P(obj)->get_method(&object, Z_STR_P(method), NULL TSRMLS_CC);
    2310           9 :                                 if (UNEXPECTED(fbc == NULL)) {
    2311           0 :                                         zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", object->ce->name->val, Z_STRVAL_P(method));
    2312             :                                 }
    2313             : 
    2314           9 :                                 if ((fbc->common.fn_flags & ZEND_ACC_STATIC) != 0) {
    2315           2 :                                         object = NULL;
    2316             :                                 } else {
    2317           7 :                                         GC_REFCOUNT(object)++; /* For $this pointer */
    2318             :                                 }
    2319             :                         }
    2320             : 
    2321             :                 } else {
    2322           2 :                         if (UNEXPECTED(EG(exception) != NULL)) {
    2323           2 :                                 HANDLE_EXCEPTION();
    2324             :                         }
    2325           0 :                         zend_error_noreturn(E_ERROR, "Function name must be a string");
    2326             :                         ZEND_VM_CONTINUE(); /* Never reached */
    2327             :                 }
    2328       40572 :                 EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
    2329       13524 :                         fbc, opline->extended_value, called_scope, object, EX(call) TSRMLS_CC);
    2330             : 
    2331             :                 CHECK_EXCEPTION();
    2332       13524 :                 ZEND_VM_NEXT_OPCODE();
    2333             :         }
    2334             : }
    2335             : 
    2336         115 : static int ZEND_FASTCALL  ZEND_BW_NOT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2337             : {
    2338         115 :         USE_OPLINE
    2339             : 
    2340             : 
    2341             :         SAVE_OPLINE();
    2342         115 :         bitwise_not_function(EX_VAR(opline->result.var),
    2343             :                 opline->op1.zv TSRMLS_CC);
    2344             : 
    2345             :         CHECK_EXCEPTION();
    2346         115 :         ZEND_VM_NEXT_OPCODE();
    2347             : }
    2348             : 
    2349       20045 : static int ZEND_FASTCALL  ZEND_BOOL_NOT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2350             : {
    2351       20045 :         USE_OPLINE
    2352             : 
    2353             : 
    2354             :         SAVE_OPLINE();
    2355       20045 :         boolean_not_function(EX_VAR(opline->result.var),
    2356             :                 opline->op1.zv TSRMLS_CC);
    2357             : 
    2358             :         CHECK_EXCEPTION();
    2359       20045 :         ZEND_VM_NEXT_OPCODE();
    2360             : }
    2361             : 
    2362       48427 : static int ZEND_FASTCALL  ZEND_ECHO_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2363             : {
    2364       48427 :         USE_OPLINE
    2365             : 
    2366             :         zval *z;
    2367             : 
    2368             :         SAVE_OPLINE();
    2369       48427 :         z = opline->op1.zv;
    2370             : 
    2371       48427 :         zend_print_variable(z TSRMLS_CC);
    2372             : 
    2373             :         CHECK_EXCEPTION();
    2374       48426 :         ZEND_VM_NEXT_OPCODE();
    2375             : }
    2376             : 
    2377        1578 : static int ZEND_FASTCALL  ZEND_PRINT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2378             : {
    2379        1578 :         USE_OPLINE
    2380             : 
    2381        1578 :         ZVAL_LONG(EX_VAR(opline->result.var), 1);
    2382        1578 :         return ZEND_ECHO_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    2383             : }
    2384             : 
    2385     1977443 : static int ZEND_FASTCALL  ZEND_JMPZ_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2386             : {
    2387     1977443 :         USE_OPLINE
    2388             : 
    2389             :         zval *val;
    2390             : 
    2391             :         SAVE_OPLINE();
    2392     1977443 :         val = opline->op1.zv;
    2393             : 
    2394     1977443 :         if (IS_CONST == IS_TMP_VAR) {
    2395             :                 if (Z_TYPE_P(val) == IS_TRUE) {
    2396             :                         ZEND_VM_SET_OPCODE(opline + 1);
    2397             :                         ZEND_VM_CONTINUE();
    2398             :                 } else if (EXPECTED(Z_TYPE_P(val) <= IS_TRUE)) {
    2399             :                         ZEND_VM_SET_OPCODE(opline->op2.jmp_addr);
    2400             :                         ZEND_VM_CONTINUE();
    2401             :                 }
    2402             :         }
    2403             : 
    2404     1977443 :         if (i_zend_is_true(val TSRMLS_CC)) {
    2405     1977010 :                 opline++;
    2406             :         } else {
    2407         433 :                 opline = opline->op2.jmp_addr;
    2408             :         }
    2409             : 
    2410     1977443 :         if (UNEXPECTED(EG(exception) != NULL)) {
    2411           0 :                 HANDLE_EXCEPTION();
    2412             :         }
    2413     1977443 :         ZEND_VM_JMP(opline);
    2414             : }
    2415             : 
    2416          12 : static int ZEND_FASTCALL  ZEND_JMPNZ_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2417             : {
    2418          12 :         USE_OPLINE
    2419             : 
    2420             :         zval *val;
    2421             : 
    2422             :         SAVE_OPLINE();
    2423          12 :         val = opline->op1.zv;
    2424             : 
    2425          12 :         if (IS_CONST == IS_TMP_VAR) {
    2426             :                 if (Z_TYPE_P(val) == IS_TRUE) {
    2427             :                         ZEND_VM_SET_OPCODE(opline->op2.jmp_addr);
    2428             :                         ZEND_VM_CONTINUE();
    2429             :                 } else if (EXPECTED(Z_TYPE_P(val) <= IS_TRUE)) {
    2430             :                         ZEND_VM_SET_OPCODE(opline + 1);
    2431             :                         ZEND_VM_CONTINUE();
    2432             :                 }
    2433             :         }
    2434             : 
    2435          12 :         if (i_zend_is_true(val TSRMLS_CC)) {
    2436           8 :                 opline = opline->op2.jmp_addr;
    2437             :         } else {
    2438           4 :                 opline++;
    2439             :         }
    2440             : 
    2441          12 :         if (UNEXPECTED(EG(exception) != NULL)) {
    2442           0 :                 HANDLE_EXCEPTION();
    2443             :         }
    2444          12 :         ZEND_VM_JMP(opline);
    2445             : }
    2446             : 
    2447           0 : static int ZEND_FASTCALL  ZEND_JMPZNZ_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2448             : {
    2449           0 :         USE_OPLINE
    2450             : 
    2451             :         zval *val;
    2452             : 
    2453             :         SAVE_OPLINE();
    2454           0 :         val = opline->op1.zv;
    2455             : 
    2456           0 :         if (IS_CONST == IS_TMP_VAR) {
    2457             :                 if (EXPECTED(Z_TYPE_P(val) == IS_TRUE)) {
    2458             :                         ZEND_VM_SET_RELATIVE_OPCODE(opline, opline->extended_value);
    2459             :                         ZEND_VM_CONTINUE();
    2460             :                 } else if (EXPECTED(Z_TYPE_P(val) <= IS_TRUE)) {
    2461             :                         ZEND_VM_SET_OPCODE(opline->op2.jmp_addr);
    2462             :                         ZEND_VM_CONTINUE();
    2463             :                 }
    2464             :         }
    2465             : 
    2466           0 :         if (i_zend_is_true(val TSRMLS_CC)) {
    2467           0 :                 opline = (zend_op*)(((char*)opline) + opline->extended_value);
    2468             :         } else {
    2469           0 :                 opline = opline->op2.jmp_addr;
    2470             :         }
    2471             : 
    2472           0 :         if (UNEXPECTED(EG(exception) != NULL)) {
    2473           0 :                 HANDLE_EXCEPTION();
    2474             :         }
    2475           0 :         ZEND_VM_JMP(opline);
    2476             : }
    2477             : 
    2478           6 : static int ZEND_FASTCALL  ZEND_JMPZ_EX_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2479             : {
    2480           6 :         USE_OPLINE
    2481             : 
    2482             :         zval *val;
    2483             : 
    2484             :         SAVE_OPLINE();
    2485           6 :         val = opline->op1.zv;
    2486             : 
    2487           6 :         if (IS_CONST == IS_TMP_VAR) {
    2488             :                 if (Z_TYPE_P(val) == IS_TRUE) {
    2489             :                         ZVAL_TRUE(EX_VAR(opline->result.var));
    2490             :                         ZEND_VM_SET_OPCODE(opline + 1);
    2491             :                         ZEND_VM_CONTINUE();
    2492             :                 } else if (EXPECTED(Z_TYPE_P(val) <= IS_TRUE)) {
    2493             :                         ZVAL_FALSE(EX_VAR(opline->result.var));
    2494             :                         ZEND_VM_SET_OPCODE(opline->op2.jmp_addr);
    2495             :                         ZEND_VM_CONTINUE();
    2496             :                 }
    2497             :         }
    2498             : 
    2499           6 :         if (i_zend_is_true(val TSRMLS_CC)) {
    2500             : 
    2501           6 :                 ZVAL_TRUE(EX_VAR(opline->result.var));
    2502           6 :                 opline++;
    2503             :         } else {
    2504             : 
    2505           0 :                 ZVAL_FALSE(EX_VAR(opline->result.var));
    2506           0 :                 opline = opline->op2.jmp_addr;
    2507             :         }
    2508           6 :         if (UNEXPECTED(EG(exception) != NULL)) {
    2509           0 :                 HANDLE_EXCEPTION();
    2510             :         }
    2511           6 :         ZEND_VM_JMP(opline);
    2512             : }
    2513             : 
    2514           8 : static int ZEND_FASTCALL  ZEND_JMPNZ_EX_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2515             : {
    2516           8 :         USE_OPLINE
    2517             : 
    2518             :         zval *val;
    2519             : 
    2520             :         SAVE_OPLINE();
    2521           8 :         val = opline->op1.zv;
    2522             : 
    2523           8 :         if (IS_CONST == IS_TMP_VAR) {
    2524             :                 if (Z_TYPE_P(val) == IS_TRUE) {
    2525             :                         ZVAL_TRUE(EX_VAR(opline->result.var));
    2526             :                         ZEND_VM_SET_OPCODE(opline->op2.jmp_addr);
    2527             :                         ZEND_VM_CONTINUE();
    2528             :                 } else if (EXPECTED(Z_TYPE_P(val) <= IS_TRUE)) {
    2529             :                         ZVAL_FALSE(EX_VAR(opline->result.var));
    2530             :                         ZEND_VM_SET_OPCODE(opline + 1);
    2531             :                         ZEND_VM_CONTINUE();
    2532             :                 }
    2533             :         }
    2534           8 :         if (i_zend_is_true(val TSRMLS_CC)) {
    2535           7 :                 ZVAL_TRUE(EX_VAR(opline->result.var));
    2536           7 :                 opline = opline->op2.jmp_addr;
    2537             :         } else {
    2538           1 :                 ZVAL_FALSE(EX_VAR(opline->result.var));
    2539           1 :                 opline++;
    2540             :         }
    2541             : 
    2542           8 :         if (UNEXPECTED(EG(exception) != NULL)) {
    2543           0 :                 HANDLE_EXCEPTION();
    2544             :         }
    2545           8 :         ZEND_VM_JMP(opline);
    2546             : }
    2547             : 
    2548      560682 : static int ZEND_FASTCALL  ZEND_RETURN_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2549             : {
    2550      560682 :         USE_OPLINE
    2551             :         zval *retval_ptr;
    2552             : 
    2553             : 
    2554             :         SAVE_OPLINE();
    2555      560682 :         retval_ptr = opline->op1.zv;
    2556             : 
    2557      560682 :         if (!EX(return_value)) {
    2558             : 
    2559             :         } else {
    2560             :                 if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    2561      245332 :                         ZVAL_COPY_VALUE(EX(return_value), retval_ptr);
    2562             :                         if (IS_CONST == IS_CONST) {
    2563      245332 :                                 if (UNEXPECTED(Z_OPT_COPYABLE_P(EX(return_value)))) {
    2564          95 :                                         zval_copy_ctor_func(EX(return_value));
    2565             :                                 }
    2566             :                         }
    2567             :                 } else if ((IS_CONST == IS_CV || IS_CONST == IS_VAR) && Z_ISREF_P(retval_ptr)) {
    2568             :                         ZVAL_COPY(EX(return_value), Z_REFVAL_P(retval_ptr));
    2569             : 
    2570             :                 } else {
    2571             :                         ZVAL_COPY_VALUE(EX(return_value), retval_ptr);
    2572             :                         if (IS_CONST == IS_CV) {
    2573             :                                 if (Z_OPT_REFCOUNTED_P(retval_ptr)) Z_ADDREF_P(retval_ptr);
    2574             :                         }
    2575             :                 }
    2576             :         }
    2577      560682 :         return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    2578             : }
    2579             : 
    2580           6 : static int ZEND_FASTCALL  ZEND_RETURN_BY_REF_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2581             : {
    2582           6 :         USE_OPLINE
    2583             :         zval *retval_ptr;
    2584             : 
    2585             : 
    2586             :         SAVE_OPLINE();
    2587             : 
    2588             :         do {
    2589             :                 if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR ||
    2590             :                     (IS_CONST == IS_VAR && opline->extended_value == ZEND_RETURNS_VALUE)) {
    2591             :                         /* Not supposed to happen, but we'll allow it */
    2592           6 :                         zend_error(E_NOTICE, "Only variable references should be returned by reference");
    2593             : 
    2594           6 :                         retval_ptr = opline->op1.zv;
    2595           6 :                         if (!EX(return_value)) {
    2596             :                                 if (IS_CONST == IS_TMP_VAR) {
    2597             : 
    2598             :                                 }
    2599             :                         } else {
    2600           6 :                                 ZVAL_COPY_VALUE(EX(return_value), retval_ptr);
    2601           6 :                                 Z_VAR_FLAGS_P(EX(return_value)) = IS_VAR_RET_REF;
    2602             :                                 if (IS_CONST != IS_TMP_VAR) {
    2603           6 :                                         zval_opt_copy_ctor_no_imm(EX(return_value));
    2604             :                                 }
    2605             :                         }
    2606           6 :                         break;
    2607             :                 }
    2608             : 
    2609             :                 retval_ptr = NULL;
    2610             : 
    2611             :                 if (IS_CONST == IS_VAR && UNEXPECTED(retval_ptr == NULL)) {
    2612             :                         zend_error_noreturn(E_ERROR, "Cannot return string offsets by reference");
    2613             :                 }
    2614             : 
    2615             :                 if (IS_CONST == IS_VAR) {
    2616             :                         if (retval_ptr == &EG(uninitialized_zval) ||
    2617             :                             (opline->extended_value == ZEND_RETURNS_FUNCTION &&
    2618             :                              !(Z_VAR_FLAGS_P(retval_ptr) & IS_VAR_RET_REF))) {
    2619             :                                 zend_error(E_NOTICE, "Only variable references should be returned by reference");
    2620             :                                 if (EX(return_value)) {
    2621             :                                         ZVAL_NEW_REF(EX(return_value), retval_ptr);
    2622             :                                         Z_VAR_FLAGS_P(EX(return_value)) = IS_VAR_RET_REF;
    2623             :                                         if (Z_REFCOUNTED_P(retval_ptr)) Z_ADDREF_P(retval_ptr);
    2624             :                                 }
    2625             :                                 break;
    2626             :                         }
    2627             :                 }
    2628             : 
    2629             :                 if (EX(return_value)) {
    2630             :                         ZVAL_MAKE_REF(retval_ptr);
    2631             :                         Z_ADDREF_P(retval_ptr);
    2632             :                         ZVAL_REF(EX(return_value), Z_REF_P(retval_ptr));
    2633             :                         Z_VAR_FLAGS_P(EX(return_value)) = IS_VAR_RET_REF;
    2634             :                 }
    2635             :         } while (0);
    2636             : 
    2637           6 :         return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    2638             : }
    2639             : 
    2640           2 : static int ZEND_FASTCALL  ZEND_THROW_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2641             : {
    2642           2 :         USE_OPLINE
    2643             :         zval *value;
    2644             : 
    2645             : 
    2646             :         SAVE_OPLINE();
    2647           2 :         value = opline->op1.zv;
    2648             : 
    2649             :         if (IS_CONST == IS_CONST || UNEXPECTED(Z_TYPE_P(value) != IS_OBJECT)) {
    2650           2 :                 if (UNEXPECTED(EG(exception) != NULL)) {
    2651           0 :                         HANDLE_EXCEPTION();
    2652             :                 }
    2653           2 :                 zend_error_noreturn(E_ERROR, "Can only throw objects");
    2654             :         }
    2655             : 
    2656             :         zend_exception_save(TSRMLS_C);
    2657             :         if (IS_CONST != IS_TMP_VAR) {
    2658             :                 if (Z_REFCOUNTED_P(value)) Z_ADDREF_P(value);
    2659             :         }
    2660             : 
    2661             :         zend_throw_exception_object(value TSRMLS_CC);
    2662             :         zend_exception_restore(TSRMLS_C);
    2663             : 
    2664             :         HANDLE_EXCEPTION();
    2665             : }
    2666             : 
    2667     9614797 : static int ZEND_FASTCALL  ZEND_SEND_VAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2668             : {
    2669     9614797 :         USE_OPLINE
    2670             :         zval *value, *arg;
    2671             : 
    2672             : 
    2673             :         SAVE_OPLINE();
    2674     9614797 :         value = opline->op1.zv;
    2675     9614797 :         arg = ZEND_CALL_ARG(EX(call), opline->op2.num);
    2676     9614797 :         EX(call)->num_args = opline->op2.num;
    2677     9614797 :         ZVAL_COPY_VALUE(arg, value);
    2678             :         if (IS_CONST == IS_CONST) {
    2679     9614797 :                 if (UNEXPECTED(Z_OPT_COPYABLE_P(arg))) {
    2680       88092 :                         zval_copy_ctor_func(arg);
    2681             :                 }
    2682             :         }
    2683     9614797 :         ZEND_VM_NEXT_OPCODE();
    2684             : }
    2685             : 
    2686      245188 : static int ZEND_FASTCALL  ZEND_SEND_VAL_EX_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2687             : {
    2688      245188 :         USE_OPLINE
    2689             :         zval *value, *arg;
    2690             : 
    2691             : 
    2692             :         SAVE_OPLINE();
    2693      490376 :         if (ARG_MUST_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
    2694           3 :                 zend_error_noreturn(E_ERROR, "Cannot pass parameter %d by reference", opline->op2.num);
    2695             :         }
    2696      245185 :         value = opline->op1.zv;
    2697      245185 :         arg = ZEND_CALL_ARG(EX(call), opline->op2.num);
    2698      245185 :         EX(call)->num_args = opline->op2.num;
    2699      245185 :         ZVAL_COPY_VALUE(arg, value);
    2700             :         if (IS_CONST == IS_CONST) {
    2701      245185 :                 if (UNEXPECTED(Z_OPT_COPYABLE_P(arg))) {
    2702        1165 :                         zval_copy_ctor_func(arg);
    2703             :                 }
    2704             :         }
    2705      245185 :         ZEND_VM_NEXT_OPCODE();
    2706             : }
    2707             : 
    2708           8 : static int ZEND_FASTCALL  ZEND_BOOL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2709             : {
    2710           8 :         USE_OPLINE
    2711             : 
    2712           8 :         zval *retval = EX_VAR(opline->result.var);
    2713             : 
    2714             :         SAVE_OPLINE();
    2715             :         /* PHP 3.0 returned "" for false and 1 for true, here we use 0 and 1 for now */
    2716          16 :         ZVAL_BOOL(retval, i_zend_is_true(opline->op1.zv TSRMLS_CC));
    2717             : 
    2718             :         CHECK_EXCEPTION();
    2719           8 :         ZEND_VM_NEXT_OPCODE();
    2720             : }
    2721             : 
    2722      460032 : static int ZEND_FASTCALL  ZEND_NEW_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2723             : {
    2724      460032 :         USE_OPLINE
    2725             :         zval object_zval;
    2726             :         zend_function *constructor;
    2727             :         zend_class_entry *ce;
    2728             : 
    2729             :         SAVE_OPLINE();
    2730             :         if (IS_CONST == IS_CONST) {
    2731      460032 :                 if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op1.zv))) {
    2732      448245 :                         ce = CACHED_PTR(Z_CACHE_SLOT_P(opline->op1.zv));
    2733             :                 } else {
    2734       11787 :                         ce = zend_fetch_class_by_name(Z_STR_P(opline->op1.zv), opline->op1.zv + 1, 0 TSRMLS_CC);
    2735       11774 :                         if (UNEXPECTED(ce == NULL)) {
    2736             :                                 CHECK_EXCEPTION();
    2737           1 :                                 ZEND_VM_NEXT_OPCODE();
    2738             :                         }
    2739       11773 :                         CACHE_PTR(Z_CACHE_SLOT_P(opline->op1.zv), ce);
    2740             :                 }
    2741             :         } else {
    2742             :                 ce = Z_CE_P(EX_VAR(opline->op1.var));
    2743             :         }
    2744      460018 :         if (UNEXPECTED((ce->ce_flags & (ZEND_ACC_INTERFACE|ZEND_ACC_IMPLICIT_ABSTRACT_CLASS|ZEND_ACC_EXPLICIT_ABSTRACT_CLASS)) != 0)) {
    2745           6 :                 if (ce->ce_flags & ZEND_ACC_INTERFACE) {
    2746           2 :                         zend_error_noreturn(E_ERROR, "Cannot instantiate interface %s", ce->name->val);
    2747           4 :                 } else if ((ce->ce_flags & ZEND_ACC_TRAIT) == ZEND_ACC_TRAIT) {
    2748           1 :                         zend_error_noreturn(E_ERROR, "Cannot instantiate trait %s", ce->name->val);
    2749             :                 } else {
    2750           3 :                         zend_error_noreturn(E_ERROR, "Cannot instantiate abstract class %s", ce->name->val);
    2751             :                 }
    2752             :         }
    2753      460012 :         object_init_ex(&object_zval, ce);
    2754      460011 :         constructor = Z_OBJ_HT(object_zval)->get_constructor(Z_OBJ(object_zval) TSRMLS_CC);
    2755             : 
    2756      460003 :         if (constructor == NULL) {
    2757      174304 :                 if (RETURN_VALUE_USED(opline)) {
    2758      174294 :                         ZVAL_COPY_VALUE(EX_VAR(opline->result.var), &object_zval);
    2759             :                 } else {
    2760             :                         zval_ptr_dtor(&object_zval);
    2761             :                 }
    2762      174304 :                 ZEND_VM_JMP(opline->op2.jmp_addr);
    2763             :         } else {
    2764             :                 /* We are not handling overloaded classes right now */
    2765     1142796 :                 EX(call) = zend_vm_stack_push_call_frame(
    2766      285699 :                         VM_FRAME_INFO(
    2767             :                                 VM_FRAME_NESTED_FUNCTION,
    2768             :                                 RETURN_VALUE_USED(opline) ?
    2769             :                                         ZEND_CALL_CTOR : (ZEND_CALL_CTOR | ZEND_CALL_CTOR_RESULT_UNUSED)),
    2770             :                         constructor,
    2771      285699 :                         opline->extended_value,
    2772             :                         ce,
    2773             :                         Z_OBJ(object_zval),
    2774             :                         EX(call) TSRMLS_CC);
    2775             : 
    2776      285699 :                 if (RETURN_VALUE_USED(opline)) {
    2777      275536 :                         ZVAL_COPY(EX_VAR(opline->result.var), &object_zval);
    2778      275536 :                         EX(call)->return_value = EX_VAR(opline->result.var);
    2779             :                 } else {
    2780       10163 :                         EX(call)->return_value = NULL;
    2781             :                 }
    2782             : 
    2783             :                 CHECK_EXCEPTION();
    2784      285699 :                 ZEND_VM_NEXT_OPCODE();
    2785             :         }
    2786             : }
    2787             : 
    2788           4 : static int ZEND_FASTCALL  ZEND_CLONE_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2789             : {
    2790           4 :         USE_OPLINE
    2791             : 
    2792             :         zval *obj;
    2793             :         zend_class_entry *ce;
    2794             :         zend_function *clone;
    2795             :         zend_object_clone_obj_t clone_call;
    2796             : 
    2797             :         SAVE_OPLINE();
    2798           4 :         obj = opline->op1.zv;
    2799             : 
    2800             :         if (IS_CONST == IS_CONST ||
    2801             :             (IS_CONST != IS_UNUSED && UNEXPECTED(Z_TYPE_P(obj) != IS_OBJECT))) {
    2802           4 :                 if (UNEXPECTED(EG(exception) != NULL)) {
    2803           0 :                         HANDLE_EXCEPTION();
    2804             :                 }
    2805           4 :                 zend_error_noreturn(E_ERROR, "__clone method called on non-object");
    2806             :         }
    2807             : 
    2808             :         ce = Z_OBJCE_P(obj);
    2809             :         clone = ce ? ce->clone : NULL;
    2810             :         clone_call =  Z_OBJ_HT_P(obj)->clone_obj;
    2811             :         if (UNEXPECTED(clone_call == NULL)) {
    2812             :                 if (ce) {
    2813             :                         zend_error_noreturn(E_ERROR, "Trying to clone an uncloneable object of class %s", ce->name->val);
    2814             :                 } else {
    2815             :                         zend_error_noreturn(E_ERROR, "Trying to clone an uncloneable object");
    2816             :                 }
    2817             :         }
    2818             : 
    2819             :         if (ce && clone) {
    2820             :                 if (clone->op_array.fn_flags & ZEND_ACC_PRIVATE) {
    2821             :                         /* Ensure that if we're calling a private function, we're allowed to do so.
    2822             :                          */
    2823             :                         if (UNEXPECTED(ce != EX(scope))) {
    2824             :                                 zend_error_noreturn(E_ERROR, "Call to private %s::__clone() from context '%s'", ce->name->val, EX(scope) ? EX(scope)->name->val : "");
    2825             :                         }
    2826             :                 } else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) {
    2827             :                         /* Ensure that if we're calling a protected function, we're allowed to do so.
    2828             :                          */
    2829             :                         if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(clone), EX(scope)))) {
    2830             :                                 zend_error_noreturn(E_ERROR, "Call to protected %s::__clone() from context '%s'", ce->name->val, EX(scope) ? EX(scope)->name->val : "");
    2831             :                         }
    2832             :                 }
    2833             :         }
    2834             : 
    2835             :         if (EXPECTED(EG(exception) == NULL)) {
    2836             :                 ZVAL_OBJ(EX_VAR(opline->result.var), clone_call(obj TSRMLS_CC));
    2837             :                 if (!RETURN_VALUE_USED(opline) || UNEXPECTED(EG(exception) != NULL)) {
    2838             :                         zval_ptr_dtor(EX_VAR(opline->result.var));
    2839             :                 }
    2840             :         }
    2841             : 
    2842             :         CHECK_EXCEPTION();
    2843             :         ZEND_VM_NEXT_OPCODE();
    2844             : }
    2845             : 
    2846         305 : static int ZEND_FASTCALL  ZEND_CAST_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2847             : {
    2848         305 :         USE_OPLINE
    2849             : 
    2850             :         zval *expr;
    2851         305 :         zval *result = EX_VAR(opline->result.var);
    2852             : 
    2853             :         SAVE_OPLINE();
    2854         305 :         expr = opline->op1.zv;
    2855             : 
    2856         305 :         switch (opline->extended_value) {
    2857             :                 case IS_NULL:
    2858             :                         /* This code is taken from convert_to_null. However, it does not seems very useful,
    2859             :                          * because a conversion to null always results in the same value. This could only
    2860             :                          * be relevant if a cast_object handler for IS_NULL has some kind of side-effect. */
    2861             : #if 0
    2862             :                         if (IS_CONST == IS_VAR || IS_CONST == IS_CV) {
    2863             :                                 ZVAL_DEREF(expr);
    2864             :                         }
    2865             :                         if (Z_TYPE_P(expr) == IS_OBJECT && Z_OBJ_HT_P(expr)->cast_object) {
    2866             :                                 if (Z_OBJ_HT_P(expr)->cast_object(expr, result, IS_NULL TSRMLS_CC) == SUCCESS) {
    2867             :                                         break;
    2868             :                                 }
    2869             :                         }
    2870             : #endif
    2871             : 
    2872           0 :                         ZVAL_NULL(result);
    2873           0 :                         break;
    2874             :                 case _IS_BOOL:
    2875           2 :                         ZVAL_BOOL(result, zend_is_true(expr TSRMLS_CC));
    2876           2 :                         break;
    2877             :                 case IS_LONG:
    2878          12 :                         ZVAL_LONG(result, zval_get_long(expr));
    2879           6 :                         break;
    2880             :                 case IS_DOUBLE:
    2881          12 :                         ZVAL_DOUBLE(result, zval_get_double(expr));
    2882           6 :                         break;
    2883             :                 case IS_STRING:
    2884         440 :                         ZVAL_STR(result, zval_get_string(expr));
    2885         220 :                         break;
    2886             :                 default:
    2887             :                         /* If value is already of correct type, return it directly */
    2888          71 :                         if (Z_TYPE_P(expr) == opline->extended_value) {
    2889           0 :                                 ZVAL_COPY_VALUE(result, expr);
    2890             :                                 if (IS_CONST == IS_CONST) {
    2891           0 :                                         if (UNEXPECTED(Z_OPT_COPYABLE_P(result))) {
    2892           0 :                                                 zval_copy_ctor_func(result);
    2893             :                                         }
    2894             :                                 } else if (IS_CONST != IS_TMP_VAR) {
    2895             :                                         if (Z_OPT_REFCOUNTED_P(expr)) Z_ADDREF_P(expr);
    2896             :                                 }
    2897             : 
    2898             :                                 CHECK_EXCEPTION();
    2899           0 :                                 ZEND_VM_NEXT_OPCODE();
    2900             :                         }
    2901             : 
    2902          71 :                         if (opline->extended_value == IS_ARRAY) {
    2903           5 :                                 if (Z_TYPE_P(expr) != IS_OBJECT) {
    2904           5 :                                         ZVAL_NEW_ARR(result);
    2905           5 :                                         zend_hash_init(Z_ARRVAL_P(result), 8, NULL, ZVAL_PTR_DTOR, 0);
    2906           5 :                                         if (Z_TYPE_P(expr) != IS_NULL) {
    2907           4 :                                                 expr = zend_hash_index_add_new(Z_ARRVAL_P(result), 0, expr);
    2908             :                                                 if (IS_CONST == IS_CONST) {
    2909           4 :                                                         if (UNEXPECTED(Z_OPT_COPYABLE_P(expr))) {
    2910           0 :                                                                 zval_copy_ctor_func(expr);
    2911             :                                                         }
    2912             :                                                 } else {
    2913             :                                                         if (Z_OPT_REFCOUNTED_P(expr)) Z_ADDREF_P(expr);
    2914             :                                                 }
    2915             :                                         }
    2916             :                                 } else {
    2917           0 :                                         ZVAL_COPY_VALUE(result, expr);
    2918             :                                         Z_ADDREF_P(result);
    2919           0 :                                         convert_to_array(result);
    2920             :                                 }
    2921             :                         } else {
    2922          66 :                                 if (Z_TYPE_P(expr) != IS_ARRAY) {
    2923           5 :                                         object_init(result);
    2924           5 :                                         if (Z_TYPE_P(expr) != IS_NULL) {
    2925           5 :                                                 expr = zend_hash_str_add_new(Z_OBJPROP_P(result), "scalar", sizeof("scalar")-1, expr);
    2926             :                                                 if (IS_CONST == IS_CONST) {
    2927           5 :                                                         if (UNEXPECTED(Z_OPT_COPYABLE_P(expr))) {
    2928           0 :                                                                 zval_copy_ctor_func(expr);
    2929             :                                                         }
    2930             :                                                 } else {
    2931             :                                                         if (Z_OPT_REFCOUNTED_P(expr)) Z_ADDREF_P(expr);
    2932             :                                                 }
    2933             :                                         }
    2934             :                                 } else {
    2935          61 :                                         ZVAL_COPY_VALUE(result, expr);
    2936             :                                         zval_opt_copy_ctor(result);
    2937          61 :                                         convert_to_object(result);
    2938             :                                 }
    2939             :                         }
    2940             :         }
    2941             : 
    2942             :         CHECK_EXCEPTION();
    2943         305 :         ZEND_VM_NEXT_OPCODE();
    2944             : }
    2945             : 
    2946        6482 : static int ZEND_FASTCALL  ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2947             : {
    2948        6482 :         USE_OPLINE
    2949        6482 :         zend_op_array *new_op_array=NULL;
    2950             : 
    2951             :         zval *inc_filename;
    2952             :         zval tmp_inc_filename;
    2953        6482 :         zend_bool failure_retval=0;
    2954             : 
    2955             :         SAVE_OPLINE();
    2956        6482 :         inc_filename = opline->op1.zv;
    2957             : 
    2958        6482 :         ZVAL_UNDEF(&tmp_inc_filename);
    2959        6482 :         if (Z_TYPE_P(inc_filename) != IS_STRING) {
    2960           0 :                 ZVAL_STR(&tmp_inc_filename, zval_get_string(inc_filename));
    2961           0 :                 inc_filename = &tmp_inc_filename;
    2962             :         }
    2963             : 
    2964        6482 :         if (opline->extended_value != ZEND_EVAL && strlen(Z_STRVAL_P(inc_filename)) != Z_STRLEN_P(inc_filename)) {
    2965           0 :                 if (opline->extended_value == ZEND_INCLUDE_ONCE || opline->extended_value == ZEND_INCLUDE) {
    2966           0 :                         zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
    2967             :                 } else {
    2968           0 :                         zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
    2969             :                 }
    2970             :         } else {
    2971        6482 :                 switch (opline->extended_value) {
    2972             :                         case ZEND_INCLUDE_ONCE:
    2973             :                         case ZEND_REQUIRE_ONCE: {
    2974             :                                         zend_file_handle file_handle;
    2975             :                                         char *resolved_path;
    2976             : 
    2977        4288 :                                         resolved_path = zend_resolve_path(Z_STRVAL_P(inc_filename), (int)Z_STRLEN_P(inc_filename) TSRMLS_CC);
    2978        4288 :                                         if (resolved_path) {
    2979        4284 :                                                 failure_retval = zend_hash_str_exists(&EG(included_files), resolved_path, (int)strlen(resolved_path));
    2980             :                                         } else {
    2981           4 :                                                 resolved_path = Z_STRVAL_P(inc_filename);
    2982             :                                         }
    2983             : 
    2984        4288 :                                         if (failure_retval) {
    2985             :                                                 /* do nothing, file already included */
    2986        3626 :                                         } else if (SUCCESS == zend_stream_open(resolved_path, &file_handle TSRMLS_CC)) {
    2987             : 
    2988        3624 :                                                 if (!file_handle.opened_path) {
    2989           4 :                                                         file_handle.opened_path = estrdup(resolved_path);
    2990             :                                                 }
    2991             : 
    2992        3624 :                                                 if (zend_hash_str_add_empty_element(&EG(included_files), file_handle.opened_path, (int)strlen(file_handle.opened_path))) {
    2993        3623 :                                                         new_op_array = zend_compile_file(&file_handle, (opline->extended_value==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE) TSRMLS_CC);
    2994        3623 :                                                         zend_destroy_file_handle(&file_handle TSRMLS_CC);
    2995             :                                                 } else {
    2996           1 :                                                         zend_file_handle_dtor(&file_handle TSRMLS_CC);
    2997           1 :                                                         failure_retval=1;
    2998             :                                                 }
    2999             :                                         } else {
    3000           2 :                                                 if (opline->extended_value == ZEND_INCLUDE_ONCE) {
    3001           0 :                                                         zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
    3002             :                                                 } else {
    3003           2 :                                                         zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
    3004             :                                                 }
    3005             :                                         }
    3006        4286 :                                         if (resolved_path != Z_STRVAL_P(inc_filename)) {
    3007        4284 :                                                 efree(resolved_path);
    3008             :                                         }
    3009             :                                 }
    3010        4286 :                                 break;
    3011             :                         case ZEND_INCLUDE:
    3012             :                         case ZEND_REQUIRE:
    3013        2134 :                                 new_op_array = compile_filename(opline->extended_value, inc_filename TSRMLS_CC);
    3014        2132 :                                 break;
    3015             :                         case ZEND_EVAL: {
    3016          60 :                                         char *eval_desc = zend_make_compiled_string_description("eval()'d code" TSRMLS_CC);
    3017             : 
    3018          60 :                                         new_op_array = zend_compile_string(inc_filename, eval_desc TSRMLS_CC);
    3019          58 :                                         efree(eval_desc);
    3020             :                                 }
    3021             :                                 break;
    3022             :                         EMPTY_SWITCH_DEFAULT_CASE()
    3023             :                 }
    3024             :         }
    3025        6476 :         if (Z_TYPE(tmp_inc_filename) != IS_UNDEF) {
    3026             :                 zval_ptr_dtor(&tmp_inc_filename);
    3027             :         }
    3028             : 
    3029        6476 :         if (UNEXPECTED(EG(exception) != NULL)) {
    3030           0 :                 HANDLE_EXCEPTION();
    3031        6476 :         } else if (EXPECTED(new_op_array != NULL)) {
    3032        5799 :                 zval *return_value = NULL;
    3033             :                 zend_execute_data *call;
    3034             : 
    3035        5799 :                 if (RETURN_VALUE_USED(opline)) {
    3036           1 :                         return_value = EX_VAR(opline->result.var);
    3037             :                 }
    3038             : 
    3039       11598 :                 call = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_CODE,
    3040             :                         (zend_function*)new_op_array, 0, EX(called_scope), Z_OBJ(EX(This)), NULL TSRMLS_CC);
    3041             : 
    3042        5799 :                 if (EX(symbol_table)) {
    3043        5768 :                         call->symbol_table = EX(symbol_table);
    3044             :                 } else {
    3045          31 :                         call->symbol_table = zend_rebuild_symbol_table(TSRMLS_C);
    3046             :                 }
    3047             : 
    3048        5799 :                 call->prev_execute_data = execute_data;
    3049             :             i_init_code_execute_data(call, new_op_array, return_value TSRMLS_CC);
    3050        5799 :                 if (EXPECTED(zend_execute_ex == execute_ex)) {
    3051        5799 :                         ZEND_VM_ENTER();
    3052             :                 } else {
    3053           0 :                         call->frame_info = VM_FRAME_TOP_CODE;
    3054           0 :                         zend_execute_ex(call TSRMLS_CC);
    3055             :                 }
    3056             : 
    3057           0 :                 destroy_op_array(new_op_array TSRMLS_CC);
    3058           0 :                 efree_size(new_op_array, sizeof(zend_op_array));
    3059           0 :                 if (UNEXPECTED(EG(exception) != NULL)) {
    3060           0 :                         zend_throw_exception_internal(NULL TSRMLS_CC);
    3061           0 :                         HANDLE_EXCEPTION();
    3062             :                 }
    3063             : 
    3064         677 :         } else if (RETURN_VALUE_USED(opline)) {
    3065           0 :                 ZVAL_BOOL(EX_VAR(opline->result.var), failure_retval);
    3066             :         }
    3067         677 :         ZEND_VM_NEXT_OPCODE();
    3068             : }
    3069             : 
    3070       13377 : static int ZEND_FASTCALL  ZEND_FE_RESET_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3071             : {
    3072       13377 :         USE_OPLINE
    3073             : 
    3074             :         zval *array_ptr, *array_ref, iterator, tmp;
    3075             :         HashTable *fe_ht;
    3076       13377 :         zend_object_iterator *iter = NULL;
    3077       13377 :         zend_class_entry *ce = NULL;
    3078       13377 :         zend_bool is_empty = 0;
    3079             : 
    3080             :         SAVE_OPLINE();
    3081             : 
    3082       13377 :         if ((IS_CONST == IS_CV || IS_CONST == IS_VAR) &&
    3083             :             (opline->extended_value & ZEND_FE_FETCH_BYREF)) {
    3084             :                 array_ptr = array_ref = NULL;
    3085             :                 ZVAL_DEREF(array_ptr);
    3086             :                 if (Z_TYPE_P(array_ptr) == IS_ARRAY) {
    3087             :                         SEPARATE_ARRAY(array_ptr);
    3088             :                         if (!Z_ISREF_P(array_ref)) {
    3089             :                                 ZVAL_NEW_REF(array_ref, array_ref);
    3090             :                                 array_ptr = Z_REFVAL_P(array_ref);
    3091             :                         }
    3092             :                         if (Z_REFCOUNTED_P(array_ref)) Z_ADDREF_P(array_ref);
    3093             :                 } else if (Z_TYPE_P(array_ptr) == IS_OBJECT) {
    3094             :                         ce = Z_OBJCE_P(array_ptr);
    3095             :                         if (ce->get_iterator == NULL) {
    3096             :                                 Z_ADDREF_P(array_ptr);
    3097             :                         }
    3098             :                         array_ref = array_ptr;
    3099             :                 } else {
    3100             :                         if (Z_REFCOUNTED_P(array_ref)) Z_ADDREF_P(array_ref);
    3101             :                 }
    3102             :         } else {
    3103       13377 :                 array_ptr = array_ref = opline->op1.zv;
    3104       13377 :                 ZVAL_DEREF(array_ptr);
    3105       13377 :                 if (IS_CONST == IS_TMP_VAR) {
    3106             :                         ZVAL_COPY_VALUE(&tmp, array_ptr);
    3107             :                         if (Z_OPT_IMMUTABLE_P(&tmp)) {
    3108             :                                 zval_copy_ctor_func(&tmp);
    3109             :                         }
    3110             :                         array_ref = array_ptr = &tmp;
    3111             :                         if (Z_TYPE_P(array_ptr) == IS_OBJECT) {
    3112             :                                 ce = Z_OBJCE_P(array_ptr);
    3113             :                                 if (ce && ce->get_iterator) {
    3114             :                                         Z_DELREF_P(array_ref);
    3115             :                                 }
    3116             :                         }
    3117       13377 :                 } else if (Z_TYPE_P(array_ptr) == IS_OBJECT) {
    3118           0 :                         ce = Z_OBJCE_P(array_ptr);
    3119           0 :                         if (!ce->get_iterator) {
    3120           0 :                                 if (IS_CONST == IS_CV) {
    3121             :                                         Z_ADDREF_P(array_ref);
    3122             :                                 }
    3123             :                         }
    3124       13377 :                 } else if (Z_IMMUTABLE_P(array_ref)) {
    3125           0 :                         if (IS_CONST == IS_CV) {
    3126             :                                 zval_copy_ctor_func(array_ref);
    3127             :                                 Z_ADDREF_P(array_ref);
    3128             :                         } else {
    3129           0 :                                 ZVAL_COPY_VALUE(&tmp, array_ref);
    3130           0 :                                 zval_copy_ctor_func(&tmp);
    3131           0 :                                 array_ptr = array_ref = &tmp;
    3132             :                         }
    3133       13377 :                 } else if (Z_REFCOUNTED_P(array_ref)) {
    3134             :                         if (IS_CONST == IS_CONST ||
    3135             :                                    (IS_CONST == IS_CV &&
    3136             :                                     !Z_ISREF_P(array_ref) &&
    3137             :                                     Z_REFCOUNT_P(array_ref) > 1) ||
    3138             :                                    (IS_CONST == IS_VAR &&
    3139             :                                     !Z_ISREF_P(array_ref) &&
    3140             :                                     Z_REFCOUNT_P(array_ref) > 2)) {
    3141       13377 :                                 if (IS_CONST == IS_VAR) {
    3142             :                                         Z_DELREF_P(array_ref);
    3143             :                                 }
    3144       13377 :                                 ZVAL_DUP(&tmp, array_ref);
    3145       13377 :                                 array_ptr = array_ref = &tmp;
    3146             :                         } else if (IS_CONST == IS_CV || IS_CONST == IS_VAR) {
    3147             :                                 if (Z_ISREF_P(array_ref) && Z_REFCOUNT_P(array_ref) == 1) {
    3148             :                                         ZVAL_UNREF(array_ref);
    3149             :                                         array_ptr = array_ref;
    3150             :                                 }
    3151             :                                 if (Z_IMMUTABLE_P(array_ptr)) {
    3152             :                                         zval_copy_ctor_func(array_ptr);
    3153             :                                 } else if (Z_ISREF_P(array_ref) &&
    3154             :                                            Z_COPYABLE_P(array_ptr) &&
    3155             :                                            Z_REFCOUNT_P(array_ptr) > 1) {
    3156             :                                         Z_DELREF_P(array_ptr);
    3157             :                                         zval_copy_ctor_func(array_ptr);
    3158             :                                 }
    3159             :                                 if (IS_CONST == IS_CV) {
    3160             :                                         Z_ADDREF_P(array_ref);
    3161             :                                 }
    3162             :                         }
    3163             :                 }
    3164             :         }
    3165             : 
    3166       13377 :         if (ce && ce->get_iterator) {
    3167           0 :                 iter = ce->get_iterator(ce, array_ptr, opline->extended_value & ZEND_FE_FETCH_BYREF TSRMLS_CC);
    3168             : 
    3169             :                 if (IS_CONST == IS_VAR && !(opline->extended_value & ZEND_FE_FETCH_BYREF)) {
    3170             : 
    3171             :                 }
    3172           0 :                 if (iter && EXPECTED(EG(exception) == NULL)) {
    3173           0 :                         ZVAL_OBJ(&iterator, &iter->std);
    3174           0 :                         array_ptr = array_ref = &iterator;
    3175             :                 } else {
    3176             :                         if (IS_CONST == IS_VAR && opline->extended_value & ZEND_FE_FETCH_BYREF) {
    3177             : 
    3178             :                         }
    3179           0 :                         if (!EG(exception)) {
    3180           0 :                                 zend_throw_exception_ex(NULL, 0 TSRMLS_CC, "Object of type %s did not create an Iterator", ce->name->val);
    3181             :                         }
    3182           0 :                         zend_throw_exception_internal(NULL TSRMLS_CC);
    3183           0 :                         HANDLE_EXCEPTION();
    3184             :                 }
    3185             :         }
    3186             : 
    3187       13377 :         ZVAL_COPY_VALUE(EX_VAR(opline->result.var), array_ref);
    3188             : 
    3189       13377 :         if (iter) {
    3190           0 :                 iter->index = 0;
    3191           0 :                 if (iter->funcs->rewind) {
    3192           0 :                         iter->funcs->rewind(iter TSRMLS_CC);
    3193           0 :                         if (UNEXPECTED(EG(exception) != NULL)) {
    3194             :                                 zval_ptr_dtor(array_ref);
    3195             :                                 if (IS_CONST == IS_VAR && opline->extended_value & ZEND_FE_FETCH_BYREF) {
    3196             : 
    3197             :                                 }
    3198           0 :                                 HANDLE_EXCEPTION();
    3199             :                         }
    3200             :                 }
    3201           0 :                 is_empty = iter->funcs->valid(iter TSRMLS_CC) != SUCCESS;
    3202           0 :                 if (UNEXPECTED(EG(exception) != NULL)) {
    3203             :                         zval_ptr_dtor(array_ref);
    3204             :                         if (IS_CONST == IS_VAR && opline->extended_value & ZEND_FE_FETCH_BYREF) {
    3205             : 
    3206             :                         }
    3207           0 :                         HANDLE_EXCEPTION();
    3208             :                 }
    3209           0 :                 iter->index = -1; /* will be set to 0 before using next handler */
    3210       13377 :         } else if ((fe_ht = HASH_OF(array_ptr)) != NULL) {
    3211       13377 :                 HashPointer *ptr = (HashPointer*)EX_VAR((opline+2)->op1.var);
    3212       13377 :                 HashPosition pos = 0;
    3213             :                 Bucket *p;
    3214             : 
    3215             :                 while (1) {
    3216       13378 :                         if (pos >= fe_ht->nNumUsed) {
    3217           0 :                                 is_empty = 1;
    3218             :                                 if (IS_CONST == IS_VAR && opline->extended_value & ZEND_FE_FETCH_BYREF) {
    3219             : 
    3220             :                                 }
    3221           0 :                                 ZEND_VM_JMP(opline->op2.jmp_addr);
    3222             :                         }
    3223       13378 :                         p = fe_ht->arData + pos;
    3224       40133 :                         if (Z_TYPE(p->val) == IS_UNDEF ||
    3225       13377 :                             (Z_TYPE(p->val) == IS_INDIRECT &&
    3226           0 :                              Z_TYPE_P(Z_INDIRECT(p->val)) == IS_UNDEF)) {
    3227           1 :                                 pos++;
    3228           1 :                                 continue;
    3229             :                         }
    3230       13377 :                         if (!ce ||
    3231           0 :                             !p->key ||
    3232           0 :                             zend_check_property_access(Z_OBJ_P(array_ptr), p->key TSRMLS_CC) == SUCCESS) {
    3233             :                                 break;
    3234             :                         }
    3235           0 :                         pos++;
    3236           1 :                 }
    3237       13377 :                 fe_ht->nInternalPointer = pos;
    3238       13377 :                 ptr->pos = pos;
    3239       13377 :                 ptr->ht = fe_ht;
    3240       13377 :                 ptr->h = fe_ht->arData[pos].h;
    3241       13377 :                 ptr->key = fe_ht->arData[pos].key;
    3242       13377 :                 is_empty = 0;
    3243             :         } else {
    3244           0 :                 zend_error(E_WARNING, "Invalid argument supplied for foreach()");
    3245           0 :                 is_empty = 1;
    3246             :         }
    3247             : 
    3248             :         if (IS_CONST == IS_VAR && opline->extended_value & ZEND_FE_FETCH_BYREF) {
    3249             : 
    3250             :         }
    3251       13377 :         if (is_empty) {
    3252           0 :                 ZEND_VM_JMP(opline->op2.jmp_addr);
    3253             :         } else {
    3254             :                 CHECK_EXCEPTION();
    3255       13377 :                 ZEND_VM_NEXT_OPCODE();
    3256             :         }
    3257             : }
    3258             : 
    3259         806 : static int ZEND_FASTCALL  ZEND_EXIT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3260             : {
    3261             : #if 0 || (IS_CONST != IS_UNUSED)
    3262         806 :         USE_OPLINE
    3263             : 
    3264             :         SAVE_OPLINE();
    3265             :         if (IS_CONST != IS_UNUSED) {
    3266             : 
    3267         806 :                 zval *ptr = opline->op1.zv;
    3268             : 
    3269         806 :                 if (Z_TYPE_P(ptr) == IS_LONG) {
    3270          31 :                         EG(exit_status) = Z_LVAL_P(ptr);
    3271             :                 } else {
    3272         775 :                         zend_print_variable(ptr TSRMLS_CC);
    3273             :                 }
    3274             : 
    3275             :         }
    3276             : #endif
    3277         806 :         zend_bailout();
    3278           0 :         ZEND_VM_NEXT_OPCODE(); /* Never reached */
    3279             : }
    3280             : 
    3281           5 : static int ZEND_FASTCALL  ZEND_JMP_SET_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3282             : {
    3283           5 :         USE_OPLINE
    3284             : 
    3285             :         zval *value;
    3286           5 :         int is_ref = 0;
    3287             : 
    3288             :         SAVE_OPLINE();
    3289           5 :         value = opline->op1.zv;
    3290             : 
    3291           5 :         if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) && Z_ISREF_P(value)) {
    3292             :                 is_ref = 1;
    3293             :                 value = Z_REFVAL_P(value);
    3294             :         }
    3295           5 :         if (i_zend_is_true(value TSRMLS_CC)) {
    3296           3 :                 ZVAL_COPY_VALUE(EX_VAR(opline->result.var), value);
    3297             :                 if (IS_CONST == IS_CONST) {
    3298           3 :                         if (UNEXPECTED(Z_OPT_COPYABLE_P(value))) {
    3299           0 :                                 zval_copy_ctor_func(EX_VAR(opline->result.var));
    3300             :                         }
    3301             :                 } else if (IS_CONST == IS_CV) {
    3302             :                         if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
    3303             :                 } else if (IS_CONST == IS_VAR && is_ref) {
    3304             :                         if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
    3305             : 
    3306             :                 }
    3307           3 :                 ZEND_VM_JMP(opline->op2.jmp_addr);
    3308             :         }
    3309             : 
    3310             :         CHECK_EXCEPTION();
    3311           2 :         ZEND_VM_NEXT_OPCODE();
    3312             : }
    3313             : 
    3314           0 : static int ZEND_FASTCALL  ZEND_COALESCE_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3315             : {
    3316           0 :         USE_OPLINE
    3317             : 
    3318             :         zval *value;
    3319           0 :         int is_ref = 0;
    3320             : 
    3321             :         SAVE_OPLINE();
    3322           0 :         value = opline->op1.zv;
    3323             : 
    3324           0 :         if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) && Z_ISREF_P(value)) {
    3325             :                 is_ref = 1;
    3326             :                 value = Z_REFVAL_P(value);
    3327             :         }
    3328             : 
    3329           0 :         if (Z_TYPE_P(value) > IS_NULL) {
    3330           0 :                 ZVAL_COPY_VALUE(EX_VAR(opline->result.var), value);
    3331             :                 if (IS_CONST == IS_CONST) {
    3332           0 :                         if (UNEXPECTED(Z_OPT_COPYABLE_P(value))) {
    3333           0 :                                 zval_copy_ctor_func(EX_VAR(opline->result.var));
    3334             :                         }
    3335             :                 } else if (IS_CONST == IS_CV) {
    3336             :                         if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
    3337             :                 } else if (IS_CONST == IS_VAR && is_ref) {
    3338             :                         if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
    3339             : 
    3340             :                 }
    3341           0 :                 ZEND_VM_JMP(opline->op2.jmp_addr);
    3342             :         }
    3343             : 
    3344             :         CHECK_EXCEPTION();
    3345           0 :         ZEND_VM_NEXT_OPCODE();
    3346             : }
    3347             : 
    3348      538093 : static int ZEND_FASTCALL  ZEND_QM_ASSIGN_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3349             : {
    3350      538093 :         USE_OPLINE
    3351             : 
    3352             :         zval *value;
    3353             : 
    3354             :         SAVE_OPLINE();
    3355      538093 :         value = opline->op1.zv;
    3356             : 
    3357      538093 :         if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) && Z_ISREF_P(value)) {
    3358             :                 ZVAL_COPY(EX_VAR(opline->result.var), Z_REFVAL_P(value));
    3359             : 
    3360             :         } else {
    3361      538093 :                 ZVAL_COPY_VALUE(EX_VAR(opline->result.var), value);
    3362             :                 if (IS_CONST == IS_CONST) {
    3363      538093 :                         if (UNEXPECTED(Z_OPT_COPYABLE_P(value))) {
    3364           6 :                                 zval_copy_ctor_func(EX_VAR(opline->result.var));
    3365             :                         }
    3366             :                 } else if (IS_CONST == IS_CV) {
    3367             :                         if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
    3368             :                 }
    3369             :         }
    3370      538093 :         ZEND_VM_NEXT_OPCODE();
    3371             : }
    3372             : 
    3373          52 : static int ZEND_FASTCALL  ZEND_STRLEN_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3374             : {
    3375          52 :         USE_OPLINE
    3376             :         zval *value;
    3377             : 
    3378             : 
    3379             :         SAVE_OPLINE();
    3380          52 :         value = opline->op1.zv;
    3381          52 :         if (EXPECTED(Z_TYPE_P(value) == IS_STRING)) {
    3382          50 :                 ZVAL_LONG(EX_VAR(opline->result.var), Z_STRLEN_P(value));
    3383             :         } else {
    3384           2 :                 if (Z_TYPE_P(value) < IS_TRUE) {
    3385           0 :                         ZVAL_LONG(EX_VAR(opline->result.var), 0);
    3386           2 :                 } else if (Z_TYPE_P(value) == IS_TRUE) {
    3387           0 :                         ZVAL_LONG(EX_VAR(opline->result.var), 1);
    3388           2 :                 } else if (Z_TYPE_P(value) <= IS_DOUBLE) {
    3389           2 :                         zend_string *str = zval_get_string(value);
    3390           2 :                         ZVAL_LONG(EX_VAR(opline->result.var), str->len);
    3391             :                         zend_string_release(str);
    3392           0 :                 } else if (Z_TYPE_P(value) == IS_OBJECT) {
    3393             :                         zend_string *str;
    3394             :                         zval tmp;
    3395             : 
    3396           0 :                         ZVAL_COPY(&tmp, value);
    3397           0 :                         if (parse_arg_object_to_str(&tmp, &str, IS_STRING TSRMLS_CC) == FAILURE) {
    3398           0 :                                 goto strlen_error;
    3399             :                         }
    3400           0 :                         ZVAL_LONG(EX_VAR(opline->result.var), str->len);
    3401             :                         zval_dtor(&tmp);
    3402             :                 } else {
    3403             : strlen_error:
    3404           0 :                         zend_error(E_WARNING, "strlen() expects parameter 1 to be string, %s given", zend_get_type_by_const(Z_TYPE_P(value)));
    3405           0 :                         ZVAL_NULL(EX_VAR(opline->result.var));
    3406             :                 }
    3407             :         }
    3408             : 
    3409             :         CHECK_EXCEPTION();
    3410          52 :         ZEND_VM_NEXT_OPCODE();
    3411             : }
    3412             : 
    3413           5 : static int ZEND_FASTCALL  ZEND_TYPE_CHECK_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3414             : {
    3415           5 :         USE_OPLINE
    3416             :         zval *value;
    3417             : 
    3418             : 
    3419             :         SAVE_OPLINE();
    3420           5 :         value = opline->op1.zv;
    3421           5 :         switch (opline->extended_value) {
    3422             :                 case IS_NULL:
    3423             :                 case IS_LONG:
    3424             :                 case IS_DOUBLE:
    3425             :                 case IS_STRING:
    3426             :                 case IS_ARRAY:
    3427          10 :                         ZVAL_BOOL(EX_VAR(opline->result.var), Z_TYPE_P(value) == opline->extended_value);
    3428           5 :                         break;
    3429             :                 case _IS_BOOL:
    3430           0 :                         ZVAL_BOOL(EX_VAR(opline->result.var), Z_TYPE_P(value) == IS_TRUE || Z_TYPE_P(value) == IS_FALSE);
    3431           0 :                         break;
    3432             :                 case IS_OBJECT:
    3433           0 :                         if (Z_TYPE_P(value) == opline->extended_value) {
    3434           0 :                                 zend_class_entry *ce = Z_OBJCE_P(value);
    3435           0 :                                 if (ce->name->len == sizeof("__PHP_Incomplete_Class") - 1
    3436           0 :                                                 && !strncmp(ce->name->val, "__PHP_Incomplete_Class", ce->name->len)) {
    3437           0 :                                         ZVAL_FALSE(EX_VAR(opline->result.var));
    3438             :                                 } else {
    3439           0 :                                         ZVAL_TRUE(EX_VAR(opline->result.var));
    3440             :                                 }
    3441             :                         } else {
    3442           0 :                                 ZVAL_FALSE(EX_VAR(opline->result.var));
    3443             :                         }
    3444           0 :                         break;
    3445             :                 case IS_RESOURCE:
    3446           0 :                         if (Z_TYPE_P(value) == opline->extended_value) {
    3447           0 :                                 const char *type_name = zend_rsrc_list_get_rsrc_type(Z_RES_P(value) TSRMLS_CC);
    3448           0 :                                 ZVAL_BOOL(EX_VAR(opline->result.var), type_name != NULL);
    3449             :                         } else {
    3450           0 :                                 ZVAL_FALSE(EX_VAR(opline->result.var));
    3451             :                         }
    3452             :                         break;
    3453             :                 EMPTY_SWITCH_DEFAULT_CASE()
    3454             :         }
    3455             : 
    3456             :         CHECK_EXCEPTION();
    3457           5 :         ZEND_VM_NEXT_OPCODE();
    3458             : }
    3459             : 
    3460         164 : static int ZEND_FASTCALL  ZEND_DEFINED_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3461             : {
    3462         164 :         USE_OPLINE
    3463             :         zend_constant *c;
    3464             : 
    3465             :         SAVE_OPLINE();
    3466         164 :         if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op1.zv))) {
    3467           1 :                 ZVAL_TRUE(EX_VAR(opline->result.var));
    3468         163 :         } else if ((c = zend_quick_get_constant(opline->op1.zv, 0 TSRMLS_CC)) == NULL) {
    3469          16 :                 ZVAL_FALSE(EX_VAR(opline->result.var));
    3470             :         } else {
    3471         147 :                 CACHE_PTR(Z_CACHE_SLOT_P(opline->op1.zv), c);
    3472         147 :                 ZVAL_TRUE(EX_VAR(opline->result.var));
    3473             :         }
    3474             :         CHECK_EXCEPTION();
    3475         164 :         ZEND_VM_NEXT_OPCODE();
    3476             : }
    3477             : 
    3478           0 : static int ZEND_FASTCALL  ZEND_ADD_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3479             : {
    3480           0 :         USE_OPLINE
    3481             : 
    3482             : 
    3483             :         SAVE_OPLINE();
    3484           0 :         fast_add_function(EX_VAR(opline->result.var),
    3485             :                 opline->op1.zv,
    3486             :                 opline->op2.zv TSRMLS_CC);
    3487             : 
    3488             : 
    3489             :         CHECK_EXCEPTION();
    3490           0 :         ZEND_VM_NEXT_OPCODE();
    3491             : }
    3492             : 
    3493           0 : static int ZEND_FASTCALL  ZEND_SUB_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3494             : {
    3495           0 :         USE_OPLINE
    3496             : 
    3497             : 
    3498             :         SAVE_OPLINE();
    3499           0 :         fast_sub_function(EX_VAR(opline->result.var),
    3500             :                 opline->op1.zv,
    3501             :                 opline->op2.zv TSRMLS_CC);
    3502             : 
    3503             : 
    3504             :         CHECK_EXCEPTION();
    3505           0 :         ZEND_VM_NEXT_OPCODE();
    3506             : }
    3507             : 
    3508           0 : static int ZEND_FASTCALL  ZEND_MUL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3509             : {
    3510           0 :         USE_OPLINE
    3511             : 
    3512             : 
    3513             :         SAVE_OPLINE();
    3514           0 :         fast_mul_function(EX_VAR(opline->result.var),
    3515             :                 opline->op1.zv,
    3516             :                 opline->op2.zv TSRMLS_CC);
    3517             : 
    3518             : 
    3519             :         CHECK_EXCEPTION();
    3520           0 :         ZEND_VM_NEXT_OPCODE();
    3521             : }
    3522             : 
    3523           0 : static int ZEND_FASTCALL  ZEND_DIV_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3524             : {
    3525           0 :         USE_OPLINE
    3526             : 
    3527             : 
    3528             :         SAVE_OPLINE();
    3529           0 :         fast_div_function(EX_VAR(opline->result.var),
    3530             :                 opline->op1.zv,
    3531             :                 opline->op2.zv TSRMLS_CC);
    3532             : 
    3533             : 
    3534             :         CHECK_EXCEPTION();
    3535           0 :         ZEND_VM_NEXT_OPCODE();
    3536             : }
    3537             : 
    3538           0 : static int ZEND_FASTCALL  ZEND_MOD_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3539             : {
    3540           0 :         USE_OPLINE
    3541             : 
    3542             : 
    3543             :         SAVE_OPLINE();
    3544           0 :         fast_mod_function(EX_VAR(opline->result.var),
    3545             :                 opline->op1.zv,
    3546             :                 opline->op2.zv TSRMLS_CC);
    3547             : 
    3548             : 
    3549             :         CHECK_EXCEPTION();
    3550           0 :         ZEND_VM_NEXT_OPCODE();
    3551             : }
    3552             : 
    3553           0 : static int ZEND_FASTCALL  ZEND_SL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3554             : {
    3555           0 :         USE_OPLINE
    3556             : 
    3557             : 
    3558             :         SAVE_OPLINE();
    3559           0 :         shift_left_function(EX_VAR(opline->result.var),
    3560             :                 opline->op1.zv,
    3561             :                 opline->op2.zv TSRMLS_CC);
    3562             : 
    3563             : 
    3564             :         CHECK_EXCEPTION();
    3565           0 :         ZEND_VM_NEXT_OPCODE();
    3566             : }
    3567             : 
    3568           0 : static int ZEND_FASTCALL  ZEND_SR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3569             : {
    3570           0 :         USE_OPLINE
    3571             : 
    3572             : 
    3573             :         SAVE_OPLINE();
    3574           0 :         shift_right_function(EX_VAR(opline->result.var),
    3575             :                 opline->op1.zv,
    3576             :                 opline->op2.zv TSRMLS_CC);
    3577             : 
    3578             : 
    3579             :         CHECK_EXCEPTION();
    3580           0 :         ZEND_VM_NEXT_OPCODE();
    3581             : }
    3582             : 
    3583           0 : static int ZEND_FASTCALL  ZEND_CONCAT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3584             : {
    3585           0 :         USE_OPLINE
    3586             : 
    3587             : 
    3588             :         SAVE_OPLINE();
    3589           0 :         concat_function(EX_VAR(opline->result.var),
    3590             :                 opline->op1.zv,
    3591             :                 opline->op2.zv TSRMLS_CC);
    3592             : 
    3593             : 
    3594             :         CHECK_EXCEPTION();
    3595           0 :         ZEND_VM_NEXT_OPCODE();
    3596             : }
    3597             : 
    3598           0 : static int ZEND_FASTCALL  ZEND_IS_IDENTICAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3599             : {
    3600           0 :         USE_OPLINE
    3601             : 
    3602             : 
    3603             :         SAVE_OPLINE();
    3604           0 :         fast_is_identical_function(EX_VAR(opline->result.var),
    3605             :                 opline->op1.zv,
    3606             :                 opline->op2.zv TSRMLS_CC);
    3607             : 
    3608             : 
    3609             :         CHECK_EXCEPTION();
    3610           0 :         ZEND_VM_NEXT_OPCODE();
    3611             : }
    3612             : 
    3613           0 : static int ZEND_FASTCALL  ZEND_IS_NOT_IDENTICAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3614             : {
    3615           0 :         USE_OPLINE
    3616             : 
    3617           0 :         zval *result = EX_VAR(opline->result.var);
    3618             : 
    3619             :         SAVE_OPLINE();
    3620           0 :         fast_is_not_identical_function(result,
    3621             :                 opline->op1.zv,
    3622             :                 opline->op2.zv TSRMLS_CC);
    3623             : 
    3624             : 
    3625             :         CHECK_EXCEPTION();
    3626           0 :         ZEND_VM_NEXT_OPCODE();
    3627             : }
    3628             : 
    3629           0 : static int ZEND_FASTCALL  ZEND_IS_EQUAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3630             : {
    3631           0 :         USE_OPLINE
    3632             : 
    3633           0 :         zval *result = EX_VAR(opline->result.var);
    3634             : 
    3635             :         SAVE_OPLINE();
    3636           0 :         fast_equal_function(result,
    3637             :                 opline->op1.zv,
    3638             :                 opline->op2.zv TSRMLS_CC);
    3639             : 
    3640             : 
    3641             :         CHECK_EXCEPTION();
    3642           0 :         ZEND_VM_NEXT_OPCODE();
    3643             : }
    3644             : 
    3645           0 : static int ZEND_FASTCALL  ZEND_IS_NOT_EQUAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3646             : {
    3647           0 :         USE_OPLINE
    3648             : 
    3649           0 :         zval *result = EX_VAR(opline->result.var);
    3650             : 
    3651             :         SAVE_OPLINE();
    3652           0 :         fast_not_equal_function(result,
    3653             :                 opline->op1.zv,
    3654             :                 opline->op2.zv TSRMLS_CC);
    3655             : 
    3656             : 
    3657             :         CHECK_EXCEPTION();
    3658           0 :         ZEND_VM_NEXT_OPCODE();
    3659             : }
    3660             : 
    3661           0 : static int ZEND_FASTCALL  ZEND_IS_SMALLER_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3662             : {
    3663           0 :         USE_OPLINE
    3664             : 
    3665           0 :         zval *result = EX_VAR(opline->result.var);
    3666             : 
    3667             :         SAVE_OPLINE();
    3668           0 :         fast_is_smaller_function(result,
    3669             :                 opline->op1.zv,
    3670             :                 opline->op2.zv TSRMLS_CC);
    3671             : 
    3672             : 
    3673             :         CHECK_EXCEPTION();
    3674           0 :         ZEND_VM_NEXT_OPCODE();
    3675             : }
    3676             : 
    3677           0 : static int ZEND_FASTCALL  ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3678             : {
    3679           0 :         USE_OPLINE
    3680             : 
    3681           0 :         zval *result = EX_VAR(opline->result.var);
    3682             : 
    3683             :         SAVE_OPLINE();
    3684           0 :         fast_is_smaller_or_equal_function(result,
    3685             :                 opline->op1.zv,
    3686             :                 opline->op2.zv TSRMLS_CC);
    3687             : 
    3688             : 
    3689             :         CHECK_EXCEPTION();
    3690           0 :         ZEND_VM_NEXT_OPCODE();
    3691             : }
    3692             : 
    3693           0 : static int ZEND_FASTCALL  ZEND_BW_OR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3694             : {
    3695           0 :         USE_OPLINE
    3696             : 
    3697             : 
    3698             :         SAVE_OPLINE();
    3699           0 :         bitwise_or_function(EX_VAR(opline->result.var),
    3700             :                 opline->op1.zv,
    3701             :                 opline->op2.zv TSRMLS_CC);
    3702             : 
    3703             : 
    3704             :         CHECK_EXCEPTION();
    3705           0 :         ZEND_VM_NEXT_OPCODE();
    3706             : }
    3707             : 
    3708           0 : static int ZEND_FASTCALL  ZEND_BW_AND_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3709             : {
    3710           0 :         USE_OPLINE
    3711             : 
    3712             : 
    3713             :         SAVE_OPLINE();
    3714           0 :         bitwise_and_function(EX_VAR(opline->result.var),
    3715             :                 opline->op1.zv,
    3716             :                 opline->op2.zv TSRMLS_CC);
    3717             : 
    3718             : 
    3719             :         CHECK_EXCEPTION();
    3720           0 :         ZEND_VM_NEXT_OPCODE();
    3721             : }
    3722             : 
    3723           0 : static int ZEND_FASTCALL  ZEND_BW_XOR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3724             : {
    3725           0 :         USE_OPLINE
    3726             : 
    3727             : 
    3728             :         SAVE_OPLINE();
    3729           0 :         bitwise_xor_function(EX_VAR(opline->result.var),
    3730             :                 opline->op1.zv,
    3731             :                 opline->op2.zv TSRMLS_CC);
    3732             : 
    3733             : 
    3734             :         CHECK_EXCEPTION();
    3735           0 :         ZEND_VM_NEXT_OPCODE();
    3736             : }
    3737             : 
    3738           0 : static int ZEND_FASTCALL  ZEND_BOOL_XOR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3739             : {
    3740           0 :         USE_OPLINE
    3741             : 
    3742             : 
    3743             :         SAVE_OPLINE();
    3744           0 :         boolean_xor_function(EX_VAR(opline->result.var),
    3745             :                 opline->op1.zv,
    3746             :                 opline->op2.zv TSRMLS_CC);
    3747             : 
    3748             : 
    3749             :         CHECK_EXCEPTION();
    3750           0 :         ZEND_VM_NEXT_OPCODE();
    3751             : }
    3752             : 
    3753         278 : static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CONST_CONST(int type, ZEND_OPCODE_HANDLER_ARGS)
    3754             : {
    3755         278 :         USE_OPLINE
    3756             : 
    3757             :         zval *varname;
    3758             :         zval *retval;
    3759             :         zend_string *name;
    3760             :         HashTable *target_symbol_table;
    3761             : 
    3762             :         SAVE_OPLINE();
    3763         278 :         varname = opline->op1.zv;
    3764             : 
    3765             :         if (IS_CONST == IS_CONST) {
    3766         278 :                 name = Z_STR_P(varname);
    3767             :         } else if (EXPECTED(Z_TYPE_P(varname) == IS_STRING)) {
    3768             :                 name = Z_STR_P(varname);
    3769             :                 zend_string_addref(name);
    3770             :         } else {
    3771             :                 name = zval_get_string(varname);
    3772             :         }
    3773             : 
    3774             :         if (IS_CONST != IS_UNUSED) {
    3775             :                 zend_class_entry *ce;
    3776             : 
    3777             :                 if (IS_CONST == IS_CONST) {
    3778         278 :                         if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv))) {
    3779          69 :                                 ce = CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv));
    3780             :                         } else {
    3781         209 :                                 ce = zend_fetch_class_by_name(Z_STR_P(opline->op2.zv), opline->op2.zv + 1, 0 TSRMLS_CC);
    3782         209 :                                 if (UNEXPECTED(ce == NULL)) {
    3783           1 :                                         if (IS_CONST != IS_CONST) {
    3784             :                                                 zend_string_release(name);
    3785             :                                         }
    3786             : 
    3787             :                                         CHECK_EXCEPTION();
    3788           1 :                                         ZEND_VM_NEXT_OPCODE();
    3789             :                                 }
    3790         208 :                                 CACHE_PTR(Z_CACHE_SLOT_P(opline->op2.zv), ce);
    3791             :                         }
    3792             :                 } else {
    3793             :                         ce = Z_CE_P(EX_VAR(opline->op2.var));
    3794             :                 }
    3795         277 :                 retval = zend_std_get_static_property(ce, name, 0, ((IS_CONST == IS_CONST) ? (EX(run_time_cache) + Z_CACHE_SLOT_P(varname)) : NULL) TSRMLS_CC);
    3796             : 
    3797             :         } else {
    3798             :                 target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
    3799             :                 retval = zend_hash_find(target_symbol_table, name);
    3800             :                 if (retval == NULL) {
    3801             :                         switch (type) {
    3802             :                                 case BP_VAR_R:
    3803             :                                 case BP_VAR_UNSET:
    3804             :                                         zend_error(E_NOTICE,"Undefined variable: %s", name->val);
    3805             :                                         /* break missing intentionally */
    3806             :                                 case BP_VAR_IS:
    3807             :                                         retval = &EG(uninitialized_zval);
    3808             :                                         break;
    3809             :                                 case BP_VAR_RW:
    3810             :                                         zend_error(E_NOTICE,"Undefined variable: %s", name->val);
    3811             :                                         /* break missing intentionally */
    3812             :                                 case BP_VAR_W:
    3813             :                                         retval = zend_hash_add_new(target_symbol_table, name, &EG(uninitialized_zval));
    3814             :                                         break;
    3815             :                                 EMPTY_SWITCH_DEFAULT_CASE()
    3816             :                         }
    3817             :                 /* GLOBAL or $$name variable may be an INDIRECT pointer to CV */
    3818             :                 } else if (Z_TYPE_P(retval) == IS_INDIRECT) {
    3819             :                         retval = Z_INDIRECT_P(retval);
    3820             :                         if (Z_TYPE_P(retval) == IS_UNDEF) {
    3821             :                                 switch (type) {
    3822             :                                         case BP_VAR_R:
    3823             :                                         case BP_VAR_UNSET:
    3824             :                                                 zend_error(E_NOTICE,"Undefined variable: %s", name->val);
    3825             :                                                 /* break missing intentionally */
    3826             :                                         case BP_VAR_IS:
    3827             :                                                 retval = &EG(uninitialized_zval);
    3828             :                                                 break;
    3829             :                                         case BP_VAR_RW:
    3830             :                                                 zend_error(E_NOTICE,"Undefined variable: %s", name->val);
    3831             :                                                 /* break missing intentionally */
    3832             :                                         case BP_VAR_W:
    3833             :                                                 ZVAL_NULL(retval);
    3834             :                                                 break;
    3835             :                                         EMPTY_SWITCH_DEFAULT_CASE()
    3836             :                                 }
    3837             :                         }
    3838             :                 }
    3839             :                 if ((opline->extended_value & ZEND_FETCH_TYPE_MASK) == ZEND_FETCH_STATIC) {
    3840             :                         if (Z_CONSTANT_P(retval)) {
    3841             :                                 zval_update_constant(retval, 1 TSRMLS_CC);
    3842             :                         }
    3843             :                 } else if ((opline->extended_value & ZEND_FETCH_TYPE_MASK) != ZEND_FETCH_GLOBAL_LOCK) {
    3844             : 
    3845             :                 }
    3846             :         }
    3847             : 
    3848         269 :         if (IS_CONST != IS_CONST) {
    3849             :                 zend_string_release(name);
    3850             :         }
    3851             : 
    3852             :         ZEND_ASSERT(retval != NULL);
    3853         462 :         if (type == BP_VAR_R || type == BP_VAR_IS) {
    3854         227 :                 if (/*type == BP_VAR_R &&*/ Z_ISREF_P(retval) && Z_REFCOUNT_P(retval) == 1) {
    3855           1 :                         ZVAL_UNREF(retval);
    3856             :                 }
    3857         193 :                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    3858             :         } else {
    3859          76 :                 ZVAL_INDIRECT(EX_VAR(opline->result.var), retval);
    3860             :         }
    3861             :         CHECK_EXCEPTION();
    3862         269 :         ZEND_VM_NEXT_OPCODE();
    3863             : }
    3864             : 
    3865         162 : static int ZEND_FASTCALL  ZEND_FETCH_R_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3866             : {
    3867         162 :         return zend_fetch_var_address_helper_SPEC_CONST_CONST(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    3868             : }
    3869             : 
    3870          61 : static int ZEND_FASTCALL  ZEND_FETCH_W_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3871             : {
    3872          61 :         return zend_fetch_var_address_helper_SPEC_CONST_CONST(BP_VAR_W, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    3873             : }
    3874             : 
    3875          17 : static int ZEND_FASTCALL  ZEND_FETCH_RW_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3876             : {
    3877          17 :         return zend_fetch_var_address_helper_SPEC_CONST_CONST(BP_VAR_RW, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    3878             : }
    3879             : 
    3880          36 : static int ZEND_FASTCALL  ZEND_FETCH_FUNC_ARG_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3881             : {
    3882          36 :         USE_OPLINE
    3883             : 
    3884          72 :         if (zend_is_by_ref_func_arg_fetch(opline, EX(call) TSRMLS_CC)) {
    3885           0 :                 return zend_fetch_var_address_helper_SPEC_CONST_CONST(BP_VAR_W, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    3886             :         } else {
    3887          36 :                 return zend_fetch_var_address_helper_SPEC_CONST_CONST(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    3888             :         }
    3889             : }
    3890             : 
    3891           2 : static int ZEND_FASTCALL  ZEND_FETCH_UNSET_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3892             : {
    3893           2 :         return zend_fetch_var_address_helper_SPEC_CONST_CONST(BP_VAR_UNSET, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    3894             : }
    3895             : 
    3896           0 : static int ZEND_FASTCALL  ZEND_FETCH_IS_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3897             : {
    3898           0 :         return zend_fetch_var_address_helper_SPEC_CONST_CONST(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    3899             : }
    3900             : 
    3901          12 : static int ZEND_FASTCALL  ZEND_FETCH_DIM_R_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3902             : {
    3903          12 :         USE_OPLINE
    3904             : 
    3905             :         zval *container;
    3906             : 
    3907             :         SAVE_OPLINE();
    3908          12 :         container = opline->op1.zv;
    3909          12 :         zend_fetch_dimension_address_read_R(EX_VAR(opline->result.var), container, opline->op2.zv, IS_CONST TSRMLS_CC);
    3910             : 
    3911             : 
    3912             :         CHECK_EXCEPTION();
    3913          12 :         ZEND_VM_NEXT_OPCODE();
    3914             : }
    3915             : 
    3916           2 : static int ZEND_FASTCALL  ZEND_FETCH_DIM_IS_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3917             : {
    3918           2 :         USE_OPLINE
    3919             : 
    3920             :         zval *container;
    3921             : 
    3922             :         SAVE_OPLINE();
    3923           2 :         container = opline->op1.zv;
    3924           2 :         zend_fetch_dimension_address_read_IS(EX_VAR(opline->result.var), container, opline->op2.zv, IS_CONST TSRMLS_CC);
    3925             : 
    3926             : 
    3927             :         CHECK_EXCEPTION();
    3928           2 :         ZEND_VM_NEXT_OPCODE();
    3929             : }
    3930             : 
    3931           1 : static int ZEND_FASTCALL  ZEND_FETCH_DIM_FUNC_ARG_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3932             : {
    3933           1 :         USE_OPLINE
    3934             :         zval *container;
    3935             :         zend_free_op free_op1;
    3936             : 
    3937             :         SAVE_OPLINE();
    3938             : 
    3939           2 :         if (zend_is_by_ref_func_arg_fetch(opline, EX(call) TSRMLS_CC)) {
    3940             :         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    3941           1 :             zend_error_noreturn(E_ERROR, "Cannot use temporary expression in write context");
    3942             :         }
    3943             :                 container = NULL;
    3944             :                 if (IS_CONST == IS_VAR && UNEXPECTED(container == NULL)) {
    3945             :                         zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
    3946             :                 }
    3947             :                 ZVAL_DEREF(container);
    3948             :                 zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, opline->op2.zv, IS_CONST TSRMLS_CC);
    3949             :                 if (IS_CONST == IS_VAR && READY_TO_DESTROY(free_op1)) {
    3950             :                         EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
    3951             :                 }
    3952             : 
    3953             : 
    3954             :         } else {
    3955           0 :                 if (IS_CONST == IS_UNUSED) {
    3956             :                         zend_error_noreturn(E_ERROR, "Cannot use [] for reading");
    3957             :                 }
    3958           0 :                 container = opline->op1.zv;
    3959           0 :                 zend_fetch_dimension_address_read_R(EX_VAR(opline->result.var), container, opline->op2.zv, IS_CONST TSRMLS_CC);
    3960             : 
    3961             : 
    3962             :         }
    3963             :         CHECK_EXCEPTION();
    3964           0 :         ZEND_VM_NEXT_OPCODE();
    3965             : }
    3966             : 
    3967           1 : static int ZEND_FASTCALL  ZEND_FETCH_OBJ_R_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3968             : {
    3969           1 :         USE_OPLINE
    3970             : 
    3971             :         zval *container;
    3972             : 
    3973             :         zval *offset;
    3974             : 
    3975             :         SAVE_OPLINE();
    3976           1 :         container = opline->op1.zv;
    3977           1 :         offset  = opline->op2.zv;
    3978             : 
    3979           2 :         if ((IS_CONST != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT)) ||
    3980           0 :             UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
    3981           1 :                 zend_error(E_NOTICE, "Trying to get property of non-object");
    3982           1 :                 ZVAL_NULL(EX_VAR(opline->result.var));
    3983             :         } else {
    3984             :                 zval *retval;
    3985             : 
    3986             :                 /* here we are sure we are dealing with an object */
    3987             :                 do {
    3988           0 :                         if (IS_CONST == IS_CONST &&
    3989           0 :                                 EXPECTED(Z_OBJCE_P(container) == CACHED_PTR(Z_CACHE_SLOT_P(offset)))) {
    3990           0 :                                 zend_property_info *prop_info = CACHED_PTR(Z_CACHE_SLOT_P(offset) + 1);
    3991           0 :                                 zend_object *zobj = Z_OBJ_P(container);
    3992             : 
    3993           0 :                                 if (EXPECTED(prop_info)) {
    3994           0 :                                         retval = OBJ_PROP(zobj, prop_info->offset);
    3995           0 :                                         if (EXPECTED(Z_TYPE_P(retval) != IS_UNDEF)) {
    3996           0 :                                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    3997           0 :                                                 break;
    3998             :                                         }
    3999           0 :                                 } else if (EXPECTED(zobj->properties != NULL)) {
    4000           0 :                                         retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
    4001           0 :                                         if (EXPECTED(retval)) {
    4002           0 :                                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    4003           0 :                                                 break;
    4004             :                                         }
    4005             :                                 }
    4006             :                         }
    4007             : 
    4008           0 :                         retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_R, ((IS_CONST == IS_CONST) ? (EX(run_time_cache) + Z_CACHE_SLOT_P(offset)) : NULL), EX_VAR(opline->result.var) TSRMLS_CC);
    4009             : 
    4010           0 :                         if (retval != EX_VAR(opline->result.var)) {
    4011           0 :                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    4012             :                         }
    4013             :                 } while (0);
    4014             :         }
    4015             : 
    4016             : 
    4017             :         CHECK_EXCEPTION();
    4018           1 :         ZEND_VM_NEXT_OPCODE();
    4019             : }
    4020             : 
    4021           1 : static int ZEND_FASTCALL  ZEND_FETCH_OBJ_IS_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4022             : {
    4023           1 :         USE_OPLINE
    4024             : 
    4025             :         zval *container;
    4026             : 
    4027             :         zval *offset;
    4028             : 
    4029             :         SAVE_OPLINE();
    4030           1 :         container = opline->op1.zv;
    4031           1 :         offset  = opline->op2.zv;
    4032             : 
    4033           2 :         if ((IS_CONST != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT)) ||
    4034           0 :             UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
    4035           1 :                 ZVAL_NULL(EX_VAR(opline->result.var));
    4036             :         } else {
    4037             :                 zval *retval;
    4038             : 
    4039             :                 /* here we are sure we are dealing with an object */
    4040             :                 do {
    4041           0 :                         if (IS_CONST == IS_CONST &&
    4042           0 :                                 EXPECTED(Z_OBJCE_P(container) == CACHED_PTR(Z_CACHE_SLOT_P(offset)))) {
    4043           0 :                                 zend_property_info *prop_info = CACHED_PTR(Z_CACHE_SLOT_P(offset) + 1);
    4044           0 :                                 zend_object *zobj = Z_OBJ_P(container);
    4045             : 
    4046           0 :                                 if (EXPECTED(prop_info)) {
    4047           0 :                                         retval = OBJ_PROP(zobj, prop_info->offset);
    4048           0 :                                         if (EXPECTED(Z_TYPE_P(retval) != IS_UNDEF)) {
    4049           0 :                                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    4050           0 :                                                 break;
    4051             :                                         }
    4052           0 :                                 } else if (EXPECTED(zobj->properties != NULL)) {
    4053           0 :                                         retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
    4054           0 :                                         if (EXPECTED(retval)) {
    4055           0 :                                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    4056           0 :                                                 break;
    4057             :                                         }
    4058             :                                 }
    4059             :                         }
    4060             : 
    4061           0 :                         retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_IS, ((IS_CONST == IS_CONST) ? (EX(run_time_cache) + Z_CACHE_SLOT_P(offset)) : NULL), EX_VAR(opline->result.var) TSRMLS_CC);
    4062             : 
    4063           0 :                         if (retval != EX_VAR(opline->result.var)) {
    4064           0 :                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    4065             :                         }
    4066             :                 } while (0);
    4067             :         }
    4068             : 
    4069             : 
    4070             :         CHECK_EXCEPTION();
    4071           1 :         ZEND_VM_NEXT_OPCODE();
    4072             : }
    4073             : 
    4074           1 : static int ZEND_FASTCALL  ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4075             : {
    4076           1 :         USE_OPLINE
    4077             :         zval *container;
    4078             : 
    4079           2 :         if (zend_is_by_ref_func_arg_fetch(opline, EX(call) TSRMLS_CC)) {
    4080             :                 /* Behave like FETCH_OBJ_W */
    4081             :                 zend_free_op free_op1;
    4082             :                 zval *property;
    4083             : 
    4084             :                 SAVE_OPLINE();
    4085           1 :                 property = opline->op2.zv;
    4086           1 :                 container = NULL;
    4087             : 
    4088             :         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    4089           1 :             zend_error_noreturn(E_ERROR, "Cannot use temporary expression in write context");
    4090             :         }
    4091             :                 if (IS_CONST == IS_VAR && UNEXPECTED(container == NULL)) {
    4092             :                         zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
    4093             :                 }
    4094             :                 zend_fetch_property_address(EX_VAR(opline->result.var), container, IS_CONST, property, IS_CONST, ((IS_CONST == IS_CONST) ? (EX(run_time_cache) + Z_CACHE_SLOT_P(property)) : NULL), BP_VAR_W TSRMLS_CC);
    4095             : 
    4096             :                 if (IS_CONST == IS_VAR && READY_TO_DESTROY(free_op1)) {
    4097             :                         EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
    4098             :                 }
    4099             : 
    4100             :                 CHECK_EXCEPTION();
    4101             :                 ZEND_VM_NEXT_OPCODE();
    4102             :         } else {
    4103           0 :                 return ZEND_FETCH_OBJ_R_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    4104             :         }
    4105             : }
    4106             : 
    4107          27 : static int ZEND_FASTCALL  ZEND_FETCH_LIST_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4108             : {
    4109          27 :         USE_OPLINE
    4110             : 
    4111             :         zval *container;
    4112             : 
    4113             :         SAVE_OPLINE();
    4114          27 :         container = opline->op1.zv;
    4115             : 
    4116          27 :         if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
    4117             : 
    4118          42 :                 zval *value = zend_fetch_dimension_address_inner(Z_ARRVAL_P(container), opline->op2.zv, IS_CONST, BP_VAR_R TSRMLS_CC);
    4119             : 
    4120          21 :                 ZVAL_COPY(EX_VAR(opline->result.var), value);
    4121           6 :         } else if (UNEXPECTED(Z_TYPE_P(container) == IS_OBJECT) &&
    4122           0 :                    EXPECTED(Z_OBJ_HT_P(container)->read_dimension)) {
    4123           0 :                 zval *result = EX_VAR(opline->result.var);
    4124           0 :                 zval *retval = Z_OBJ_HT_P(container)->read_dimension(container, opline->op2.zv, BP_VAR_R, result TSRMLS_CC);
    4125             : 
    4126           0 :                 if (retval) {
    4127           0 :                         if (result != retval) {
    4128           0 :                                 ZVAL_COPY(result, retval);
    4129             :                         }
    4130             :                 } else {
    4131           0 :                         ZVAL_NULL(result);
    4132             :                 }
    4133             :         } else {
    4134           6 :                 ZVAL_NULL(EX_VAR(opline->result.var));
    4135             :         }
    4136             :         CHECK_EXCEPTION();
    4137          27 :         ZEND_VM_NEXT_OPCODE();
    4138             : }
    4139             : 
    4140        5332 : static int ZEND_FASTCALL  ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4141             : {
    4142        5332 :         USE_OPLINE
    4143             :         zval *function_name;
    4144             :         zend_class_entry *ce;
    4145             :         zend_object *object;
    4146             :         zend_function *fbc;
    4147             : 
    4148             :         SAVE_OPLINE();
    4149             : 
    4150             :         if (IS_CONST == IS_CONST) {
    4151             :                 /* no function found. try a static method in class */
    4152        5332 :                 if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op1.zv))) {
    4153        2690 :                         ce = CACHED_PTR(Z_CACHE_SLOT_P(opline->op1.zv));
    4154             :                 } else {
    4155        2642 :                         ce = zend_fetch_class_by_name(Z_STR_P(opline->op1.zv), opline->op1.zv + 1, ZEND_FETCH_CLASS_DEFAULT TSRMLS_CC);
    4156        2642 :                         if (UNEXPECTED(EG(exception) != NULL)) {
    4157           2 :                                 HANDLE_EXCEPTION();
    4158             :                         }
    4159        2640 :                         if (UNEXPECTED(ce == NULL)) {
    4160           0 :                                 zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op1.zv));
    4161             :                         }
    4162        2640 :                         CACHE_PTR(Z_CACHE_SLOT_P(opline->op1.zv), ce);
    4163             :                 }
    4164             :         } else {
    4165             :                 ce = Z_CE_P(EX_VAR(opline->op1.var));
    4166             :         }
    4167             : 
    4168        5330 :         if (IS_CONST == IS_CONST &&
    4169             :             IS_CONST == IS_CONST &&
    4170        5330 :             CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv))) {
    4171        2679 :                 fbc = CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv));
    4172        2651 :         } else if (IS_CONST != IS_CONST &&
    4173             :                    IS_CONST == IS_CONST &&
    4174             :                    (fbc = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(opline->op2.zv), ce))) {
    4175             :                 /* do nothing */
    4176             :         } else if (IS_CONST != IS_UNUSED) {
    4177             : 
    4178             : 
    4179        2651 :                 function_name = opline->op2.zv;
    4180        2651 :                 if (IS_CONST != IS_CONST) {
    4181             :                         if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
    4182             :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    4183             :                                         HANDLE_EXCEPTION();
    4184             :                                 }
    4185             :                                 zend_error_noreturn(E_ERROR, "Function name must be a string");
    4186             :                         }
    4187             :                 }
    4188             : 
    4189        2651 :                 if (ce->get_static_method) {
    4190           0 :                         fbc = ce->get_static_method(ce, Z_STR_P(function_name) TSRMLS_CC);
    4191             :                 } else {
    4192        2651 :                         fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_CONST == IS_CONST) ? (opline->op2.zv + 1) : NULL) TSRMLS_CC);
    4193             :                 }
    4194        2644 :                 if (UNEXPECTED(fbc == NULL)) {
    4195           3 :                         zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", ce->name->val, Z_STRVAL_P(function_name));
    4196             :                 }
    4197        5282 :                 if (IS_CONST == IS_CONST &&
    4198        2641 :                     EXPECTED(fbc->type <= ZEND_USER_FUNCTION) &&
    4199        2641 :                     EXPECTED((fbc->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0)) {
    4200             :                         if (IS_CONST == IS_CONST) {
    4201        2615 :                                 CACHE_PTR(Z_CACHE_SLOT_P(function_name), fbc);
    4202             :                         } else {
    4203             :                                 CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), ce, fbc);
    4204             :                         }
    4205             :                 }
    4206             :                 if (IS_CONST != IS_CONST) {
    4207             : 
    4208             :                 }
    4209             :         } else {
    4210             :                 if (UNEXPECTED(ce->constructor == NULL)) {
    4211             :                         zend_error_noreturn(E_ERROR, "Cannot call constructor");
    4212             :                 }
    4213             :                 if (Z_OBJ(EX(This)) && Z_OBJ(EX(This))->ce != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
    4214             :                         zend_error_noreturn(E_ERROR, "Cannot call private %s::__construct()", ce->name->val);
    4215             :                 }
    4216             :                 fbc = ce->constructor;
    4217             :         }
    4218             : 
    4219        5320 :         object = NULL;
    4220        5320 :         if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
    4221          83 :                 if (Z_OBJ(EX(This))) {
    4222          60 :                         object = Z_OBJ(EX(This));
    4223          60 :                         GC_REFCOUNT(object)++;
    4224             :                 }
    4225         143 :                 if (!object ||
    4226          60 :                     !instanceof_function(object->ce, ce TSRMLS_CC)) {
    4227             :                     /* We are calling method of the other (incompatible) class,
    4228             :                        but passing $this. This is done for compatibility with php-4. */
    4229          25 :                         if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
    4230          51 :                                 zend_error(
    4231             :                                         object ? E_DEPRECATED : E_STRICT,
    4232             :                                         "Non-static method %s::%s() should not be called statically%s",
    4233          34 :                                         fbc->common.scope->name->val, fbc->common.function_name->val,
    4234             :                                         object ? ", assuming $this from incompatible context" : "");
    4235             :                         } else {
    4236             :                                 /* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
    4237          24 :                                 zend_error_noreturn(
    4238             :                                         E_ERROR,
    4239             :                                         "Non-static method %s::%s() cannot be called statically%s",
    4240          16 :                                         fbc->common.scope->name->val, fbc->common.function_name->val,
    4241             :                                         object ? ", assuming $this from incompatible context" : "");
    4242             :                         }
    4243             :                 }
    4244             :         }
    4245             : 
    4246        5312 :         if (IS_CONST != IS_CONST) {
    4247             :                 /* previous opcode is ZEND_FETCH_CLASS */
    4248             :                 if ((opline-1)->extended_value == ZEND_FETCH_CLASS_PARENT || (opline-1)->extended_value == ZEND_FETCH_CLASS_SELF) {
    4249             :                         ce = EX(called_scope);
    4250             :                 }
    4251             :         }
    4252             : 
    4253       15936 :         EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
    4254        5312 :                 fbc, opline->extended_value, ce, object, EX(call) TSRMLS_CC);
    4255             : 
    4256        5312 :         if (IS_CONST == IS_UNUSED) {
    4257             :                 EX(call)->return_value = NULL;
    4258             :         }
    4259             : 
    4260             :         CHECK_EXCEPTION();
    4261        5312 :         ZEND_VM_NEXT_OPCODE();
    4262             : }
    4263             : 
    4264          75 : static int ZEND_FASTCALL  ZEND_INIT_USER_CALL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4265             : {
    4266          75 :         USE_OPLINE
    4267             : 
    4268          75 :         zval *function_name = opline->op2.zv;
    4269             :         zend_fcall_info_cache fcc;
    4270          75 :         char *error = NULL;
    4271             :         zend_function *func;
    4272             :         zend_class_entry *called_scope;
    4273             :         zend_object *object;
    4274             : 
    4275          75 :         if (zend_is_callable_ex(function_name, NULL, 0, NULL, &fcc, &error TSRMLS_CC)) {
    4276          66 :                 if (error) {
    4277           3 :                         efree(error);
    4278             :                 }
    4279          66 :                 func = fcc.function_handler;
    4280          66 :                 if (func->common.fn_flags & ZEND_ACC_CLOSURE) {
    4281             :                         /* Delay closure destruction until its invocation */
    4282           0 :                         func->common.prototype = (zend_function*)Z_OBJ_P(function_name);
    4283             :                         Z_ADDREF_P(function_name);
    4284             :                 }
    4285          66 :                 called_scope = fcc.called_scope;
    4286          66 :                 object = fcc.object;
    4287          66 :                 if (object) {
    4288          20 :                         GC_REFCOUNT(object)++; /* For $this pointer */
    4289          90 :                 } else if (func->common.scope &&
    4290          44 :                            !(func->common.fn_flags & ZEND_ACC_STATIC)) {
    4291           3 :                         if (func->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
    4292           6 :                                 zend_error(E_STRICT,
    4293             :                                 "Non-static method %s::%s() should not be called statically",
    4294           6 :                                 func->common.scope->name->val, func->common.function_name->val);
    4295             :                         } else {
    4296           0 :                                 zend_error_noreturn(
    4297             :                                         E_ERROR,
    4298             :                                         "Non-static method %s::%s() cannot be called statically",
    4299           0 :                                         func->common.scope->name->val, func->common.function_name->val);
    4300             :                         }
    4301             :                 }
    4302             :         } else {
    4303           9 :                 zend_error(E_WARNING, "%s() expects parameter 1 to be a valid callback, %s", Z_STRVAL_P(opline->op1.zv), error);
    4304           9 :                 efree(error);
    4305           9 :                 func = (zend_function*)&zend_pass_function;
    4306           9 :                 called_scope = NULL;
    4307           9 :                 object = NULL;
    4308             :         }
    4309             : 
    4310         225 :         EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
    4311          75 :                 func, opline->extended_value, called_scope, object, EX(call) TSRMLS_CC);
    4312             : 
    4313             :         CHECK_EXCEPTION();
    4314          75 :         ZEND_VM_NEXT_OPCODE();
    4315             : }
    4316             : 
    4317          10 : static int ZEND_FASTCALL  ZEND_CASE_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4318             : {
    4319          10 :         USE_OPLINE
    4320             : 
    4321          10 :         zval *result = EX_VAR(opline->result.var);
    4322             : 
    4323             :         SAVE_OPLINE();
    4324          10 :         fast_equal_function(result,
    4325             :                  opline->op1.zv,
    4326             :                  opline->op2.zv TSRMLS_CC);
    4327             : 
    4328             :         CHECK_EXCEPTION();
    4329          10 :         ZEND_VM_NEXT_OPCODE();
    4330             : }
    4331             : 
    4332        9041 : static int ZEND_FASTCALL  ZEND_FETCH_CONSTANT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4333             : {
    4334        9041 :         USE_OPLINE
    4335             : 
    4336             :         SAVE_OPLINE();
    4337        9041 :         if (IS_CONST == IS_UNUSED) {
    4338             :                 zend_constant *c;
    4339             :                 zval *retval;
    4340             : 
    4341             :                 if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv))) {
    4342             :                         c = CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv));
    4343             :                 } else if ((c = zend_quick_get_constant(opline->op2.zv + 1, opline->extended_value TSRMLS_CC)) == NULL) {
    4344             :                         if ((opline->extended_value & IS_CONSTANT_UNQUALIFIED) != 0) {
    4345             :                                 char *actual = (char *)zend_memrchr(Z_STRVAL_P(opline->op2.zv), '\\', Z_STRLEN_P(opline->op2.zv));
    4346             :                                 if (!actual) {
    4347             :                                         ZVAL_STR(EX_VAR(opline->result.var), zend_string_copy(Z_STR_P(opline->op2.zv)));
    4348             :                                 } else {
    4349             :                                         actual++;
    4350             :                                         ZVAL_STRINGL(EX_VAR(opline->result.var),
    4351             :                                                         actual, Z_STRLEN_P(opline->op2.zv) - (actual - Z_STRVAL_P(opline->op2.zv)));
    4352             :                                 }
    4353             :                                 /* non-qualified constant - allow text substitution */
    4354             :                                 zend_error(E_NOTICE, "Use of undefined constant %s - assumed '%s'",
    4355             :                                                 Z_STRVAL_P(EX_VAR(opline->result.var)), Z_STRVAL_P(EX_VAR(opline->result.var)));
    4356             :                                 CHECK_EXCEPTION();
    4357             :                                 ZEND_VM_NEXT_OPCODE();
    4358             :                         } else {
    4359             :                                 zend_error_noreturn(E_ERROR, "Undefined constant '%s'", Z_STRVAL_P(opline->op2.zv));
    4360             :                         }
    4361             :                 } else {
    4362             :                         CACHE_PTR(Z_CACHE_SLOT_P(opline->op2.zv), c);
    4363             :                 }
    4364             :                 retval = EX_VAR(opline->result.var);
    4365             :                 ZVAL_COPY_VALUE(retval, &c->value);
    4366             :                 if (Z_OPT_COPYABLE_P(retval) || Z_OPT_REFCOUNTED_P(retval)) {
    4367             :                         if (Z_OPT_COPYABLE_P(retval)) {
    4368             :                                 zval_copy_ctor_func(retval);
    4369             :                         } else {
    4370             :                                 Z_ADDREF_P(retval);
    4371             :                         }
    4372             :                 }
    4373             :         } else {
    4374             :                 /* class constant */
    4375             :                 zend_class_entry *ce;
    4376             :                 zval *value;
    4377             : 
    4378             :                 if (IS_CONST == IS_CONST) {
    4379        9041 :                         if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv))) {
    4380        1906 :                                 value = CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv));
    4381        1906 :                                 ZVAL_DEREF(value);
    4382        1906 :                                 ZVAL_DUP(EX_VAR(opline->result.var), value);
    4383        1906 :                                 goto constant_fetch_end;
    4384        7135 :                         } else if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op1.zv))) {
    4385           0 :                                 ce = CACHED_PTR(Z_CACHE_SLOT_P(opline->op1.zv));
    4386             :                         } else {
    4387        7135 :                                 ce = zend_fetch_class_by_name(Z_STR_P(opline->op1.zv), opline->op1.zv + 1, 0 TSRMLS_CC);
    4388        7134 :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    4389           1 :                                         HANDLE_EXCEPTION();
    4390             :                                 }
    4391        7133 :                                 if (UNEXPECTED(ce == NULL)) {
    4392           0 :                                         zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op1.zv));
    4393             :                                 }
    4394        7133 :                                 CACHE_PTR(Z_CACHE_SLOT_P(opline->op1.zv), ce);
    4395             :                         }
    4396             :                 } else {
    4397             :                         ce = Z_CE_P(EX_VAR(opline->op1.var));
    4398             :                         if ((value = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(opline->op2.zv), ce)) != NULL) {
    4399             :                                 ZVAL_DEREF(value);
    4400             :                                 ZVAL_DUP(EX_VAR(opline->result.var), value);
    4401             :                                 goto constant_fetch_end;
    4402             :                         }
    4403             :                 }
    4404             : 
    4405        7133 :                 if (EXPECTED((value = zend_hash_find(&ce->constants_table, Z_STR_P(opline->op2.zv))) != NULL)) {
    4406        7131 :                         ZVAL_DEREF(value);
    4407        7131 :                         if (Z_CONSTANT_P(value)) {
    4408          26 :                                 EG(scope) = ce;
    4409          26 :                                 zval_update_constant(value, 1 TSRMLS_CC);
    4410          23 :                                 EG(scope) = EX(scope);
    4411             :                         }
    4412             :                         if (IS_CONST == IS_CONST) {
    4413        7128 :                                 CACHE_PTR(Z_CACHE_SLOT_P(opline->op2.zv), value);
    4414             :                         } else {
    4415             :                                 CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(opline->op2.zv), ce, value);
    4416             :                         }
    4417        7128 :                         ZVAL_DUP(EX_VAR(opline->result.var), value);
    4418           2 :                 } else if (Z_STRLEN_P(opline->op2.zv) == sizeof("class")-1 && memcmp(Z_STRVAL_P(opline->op2.zv), "class", sizeof("class") - 1) == 0) {
    4419             :                         /* "class" is assigned as a case-sensitive keyword from zend_do_resolve_class_name */
    4420           0 :                         ZVAL_STR_COPY(EX_VAR(opline->result.var), ce->name);
    4421             :                 } else {
    4422           2 :                         zend_error_noreturn(E_ERROR, "Undefined class constant '%s'", Z_STRVAL_P(opline->op2.zv));
    4423             :                 }
    4424             :         }
    4425             : constant_fetch_end:
    4426             :         CHECK_EXCEPTION();
    4427        9034 :         ZEND_VM_NEXT_OPCODE();
    4428             : }
    4429             : 
    4430        5841 : static int ZEND_FASTCALL  ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4431             : {
    4432        5841 :         USE_OPLINE
    4433             : 
    4434             :         zval *expr_ptr, new_expr;
    4435             : 
    4436             :         SAVE_OPLINE();
    4437        5841 :         if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) &&
    4438             :             (opline->extended_value & ZEND_ARRAY_ELEMENT_REF)) {
    4439             :                 expr_ptr = NULL;
    4440             :                 if (IS_CONST == IS_VAR && UNEXPECTED(expr_ptr == NULL)) {
    4441             :                         zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets");
    4442             :                 }
    4443             :                 ZVAL_MAKE_REF(expr_ptr);
    4444             :                 Z_ADDREF_P(expr_ptr);
    4445             : 
    4446             :         } else {
    4447        5841 :                 expr_ptr = opline->op1.zv;
    4448        5841 :                 if (IS_CONST == IS_TMP_VAR) {
    4449             :                         ZVAL_COPY_VALUE(&new_expr, expr_ptr);
    4450             :                         expr_ptr = &new_expr;
    4451             :                 } else if (IS_CONST == IS_CONST) {
    4452        5841 :                         if (!Z_IMMUTABLE_P(expr_ptr)) {
    4453        5841 :                                 ZVAL_DUP(&new_expr, expr_ptr);
    4454        5841 :                                 expr_ptr = &new_expr;
    4455             :                         }
    4456             :                 } else if ((IS_CONST == IS_CV || IS_CONST == IS_VAR) && Z_ISREF_P(expr_ptr)) {
    4457             :                         expr_ptr = Z_REFVAL_P(expr_ptr);
    4458             :                         if (Z_REFCOUNTED_P(expr_ptr)) Z_ADDREF_P(expr_ptr);
    4459             : 
    4460             :                 } else if (IS_CONST == IS_CV && Z_REFCOUNTED_P(expr_ptr)) {
    4461             :                         Z_ADDREF_P(expr_ptr);
    4462             :                 }
    4463             :         }
    4464             : 
    4465             :         if (IS_CONST != IS_UNUSED) {
    4466             : 
    4467        5841 :                 zval *offset = opline->op2.zv;
    4468             :                 zend_string *str;
    4469             :                 zend_ulong hval;
    4470             : 
    4471             : add_again:
    4472        5841 :                 switch (Z_TYPE_P(offset)) {
    4473             :                         case IS_DOUBLE:
    4474          26 :                                 hval = zend_dval_to_lval(Z_DVAL_P(offset));
    4475          13 :                                 goto num_index;
    4476             :                         case IS_LONG:
    4477         213 :                                 hval = Z_LVAL_P(offset);
    4478             : num_index:
    4479         238 :                                 zend_hash_index_update(Z_ARRVAL_P(EX_VAR(opline->result.var)), hval, expr_ptr);
    4480         238 :                                 break;
    4481             :                         case IS_STRING:
    4482        5594 :                                 str = Z_STR_P(offset);
    4483        5594 :                                 if (IS_CONST != IS_CONST) {
    4484             :                                         if (ZEND_HANDLE_NUMERIC(str, hval)) {
    4485             :                                                 goto num_index;
    4486             :                                         }
    4487             :                                 }
    4488             : str_index:
    4489        5603 :                                 zend_hash_update(Z_ARRVAL_P(EX_VAR(opline->result.var)), str, expr_ptr);
    4490        5603 :                                 break;
    4491             :                         case IS_NULL:
    4492           9 :                                 str = STR_EMPTY_ALLOC();
    4493           9 :                                 goto str_index;
    4494             :                         case IS_FALSE:
    4495           7 :                                 hval = 0;
    4496           7 :                                 goto num_index;
    4497             :                         case IS_TRUE:
    4498           5 :                                 hval = 1;
    4499           5 :                                 goto num_index;
    4500             :                         case IS_REFERENCE:
    4501           0 :                                 offset = Z_REFVAL_P(offset);
    4502           0 :                                 goto add_again;
    4503             :                                 break;
    4504             :                         default:
    4505           0 :                                 zend_error(E_WARNING, "Illegal offset type");
    4506             :                                 zval_ptr_dtor(expr_ptr);
    4507             :                                 /* do nothing */
    4508             :                                 break;
    4509             :                 }
    4510             : 
    4511             :         } else {
    4512             :                 zend_hash_next_index_insert(Z_ARRVAL_P(EX_VAR(opline->result.var)), expr_ptr);
    4513             :         }
    4514             :         CHECK_EXCEPTION();
    4515        5841 :         ZEND_VM_NEXT_OPCODE();
    4516             : }
    4517             : 
    4518         595 : static int ZEND_FASTCALL  ZEND_INIT_ARRAY_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4519             : {
    4520             :         zval *array;
    4521             :         uint32_t size;
    4522         595 :         USE_OPLINE
    4523             : 
    4524         595 :         array = EX_VAR(opline->result.var);
    4525             :         if (IS_CONST != IS_UNUSED) {
    4526         595 :                 size = opline->extended_value >> ZEND_ARRAY_SIZE_SHIFT;
    4527             :         } else {
    4528             :                 size = 0;
    4529             :         }
    4530         595 :         ZVAL_NEW_ARR(array);
    4531         595 :         zend_hash_init(Z_ARRVAL_P(array), size, NULL, ZVAL_PTR_DTOR, 0);
    4532             : 
    4533             :         if (IS_CONST != IS_UNUSED) {
    4534             :                 /* Explicitly initialize array as not-packed if flag is set */
    4535         595 :                 if (opline->extended_value & ZEND_ARRAY_NOT_PACKED) {
    4536         576 :                         zend_hash_real_init(Z_ARRVAL_P(array), 0);
    4537             :                 }
    4538             :         }
    4539             : 
    4540         595 :         if (IS_CONST == IS_UNUSED) {
    4541             :                 ZEND_VM_NEXT_OPCODE();
    4542             : #if 0 || IS_CONST != IS_UNUSED
    4543             :         } else {
    4544         595 :                 return ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    4545             : #endif
    4546             :         }
    4547             : }
    4548             : 
    4549           1 : static int ZEND_FASTCALL  ZEND_UNSET_VAR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4550             : {
    4551           1 :         USE_OPLINE
    4552             :         zval tmp, *varname;
    4553             :         HashTable *target_symbol_table;
    4554             : 
    4555             : 
    4556             :         SAVE_OPLINE();
    4557           1 :         if (IS_CONST == IS_CV &&
    4558             :             IS_CONST == IS_UNUSED &&
    4559             :             (opline->extended_value & ZEND_QUICK_SET)) {
    4560             :                 zval *var = EX_VAR(opline->op1.var);
    4561             : 
    4562             :                 if (Z_REFCOUNTED_P(var)) {
    4563             :                         zend_refcounted *garbage = Z_COUNTED_P(var);
    4564             : 
    4565             :                         if (!--GC_REFCOUNT(garbage)) {
    4566             :                                 ZVAL_UNDEF(var);
    4567             :                                 _zval_dtor_func_for_ptr(garbage ZEND_FILE_LINE_CC);
    4568             :                         } else {
    4569             :                                 GC_ZVAL_CHECK_POSSIBLE_ROOT(var);
    4570             :                                 ZVAL_UNDEF(var);
    4571             :                         }
    4572             :                 } else {
    4573             :                         ZVAL_UNDEF(var);
    4574             :                 }
    4575             :                 CHECK_EXCEPTION();
    4576             :                 ZEND_VM_NEXT_OPCODE();
    4577             :         }
    4578             : 
    4579           1 :         varname = opline->op1.zv;
    4580             : 
    4581           1 :         ZVAL_UNDEF(&tmp);
    4582           1 :         if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
    4583             :                 ZVAL_STR(&tmp, zval_get_string(varname));
    4584             :                 varname = &tmp;
    4585             :         }
    4586             : 
    4587             :         if (IS_CONST != IS_UNUSED) {
    4588             :                 zend_class_entry *ce;
    4589             : 
    4590             :                 if (IS_CONST == IS_CONST) {
    4591           1 :                         if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv))) {
    4592           0 :                                 ce = CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv));
    4593             :                         } else {
    4594           1 :                                 ce = zend_fetch_class_by_name(Z_STR_P(opline->op2.zv), opline->op2.zv + 1, 0 TSRMLS_CC);
    4595           1 :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    4596           1 :                                         if (IS_CONST != IS_CONST) {
    4597             :                                                 zval_dtor(&tmp);
    4598             :                                         }
    4599             : 
    4600           1 :                                         HANDLE_EXCEPTION();
    4601             :                                 }
    4602           0 :                                 if (UNEXPECTED(ce == NULL)) {
    4603           0 :                                         zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op2.zv));
    4604             :                                 }
    4605           0 :                                 CACHE_PTR(Z_CACHE_SLOT_P(opline->op2.zv), ce);
    4606             :                         }
    4607             :                 } else {
    4608             :                         ce = Z_CE_P(EX_VAR(opline->op2.var));
    4609             :                 }
    4610           0 :                 zend_std_unset_static_property(ce, Z_STR_P(varname), ((IS_CONST == IS_CONST) ? (EX(run_time_cache) + Z_CACHE_SLOT_P(varname)) : NULL) TSRMLS_CC);
    4611             :         } else {
    4612             :                 target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
    4613             :                 zend_hash_del_ind(target_symbol_table, Z_STR_P(varname));
    4614             :         }
    4615             : 
    4616           0 :         if (IS_CONST != IS_CONST) {
    4617             :                 zval_dtor(&tmp);
    4618             :         }
    4619             : 
    4620             :         CHECK_EXCEPTION();
    4621           0 :         ZEND_VM_NEXT_OPCODE();
    4622             : }
    4623             : 
    4624          44 : static int ZEND_FASTCALL  ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4625             : {
    4626          44 :         USE_OPLINE
    4627             :         zval *value;
    4628             : 
    4629             :         SAVE_OPLINE();
    4630          44 :         if (IS_CONST == IS_CV &&
    4631             :             IS_CONST == IS_UNUSED &&
    4632             :             (opline->extended_value & ZEND_QUICK_SET)) {
    4633             :                 value = EX_VAR(opline->op1.var);
    4634             :                 if (opline->extended_value & ZEND_ISSET) {
    4635             :                         ZVAL_BOOL(EX_VAR(opline->result.var),
    4636             :                                 Z_TYPE_P(value) > IS_NULL &&
    4637             :                             (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL));
    4638             :                 } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
    4639             :                         ZVAL_BOOL(EX_VAR(opline->result.var),
    4640             :                                 !i_zend_is_true(value TSRMLS_CC));
    4641             :                         CHECK_EXCEPTION();
    4642             :                 }
    4643             :                 ZEND_VM_NEXT_OPCODE();
    4644             :         } else {
    4645             : 
    4646          44 :                 zval tmp, *varname = opline->op1.zv;
    4647             : 
    4648          44 :                 if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
    4649             :                         ZVAL_STR(&tmp, zval_get_string(varname));
    4650             :                         varname = &tmp;
    4651             :                 }
    4652             : 
    4653             :                 if (IS_CONST != IS_UNUSED) {
    4654             :                         zend_class_entry *ce;
    4655             : 
    4656             :                         if (IS_CONST == IS_CONST) {
    4657          44 :                                 if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv))) {
    4658           0 :                                         ce = CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv));
    4659             :                                 } else {
    4660          44 :                                         ce = zend_fetch_class_by_name(Z_STR_P(opline->op2.zv), opline->op2.zv + 1, 0 TSRMLS_CC);
    4661          44 :                                         if (UNEXPECTED(ce == NULL)) {
    4662             :                                                 CHECK_EXCEPTION();
    4663           1 :                                                 ZEND_VM_NEXT_OPCODE();
    4664             :                                         }
    4665          43 :                                         CACHE_PTR(Z_CACHE_SLOT_P(opline->op2.zv), ce);
    4666             :                                 }
    4667             :                         } else {
    4668             :                                 ce = Z_CE_P(EX_VAR(opline->op2.var));
    4669             :                         }
    4670          43 :                         value = zend_std_get_static_property(ce, Z_STR_P(varname), 1, ((IS_CONST == IS_CONST) ? (EX(run_time_cache) + Z_CACHE_SLOT_P(varname)) : NULL) TSRMLS_CC);
    4671             :                 } else {
    4672             :                         HashTable *target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
    4673             :                         value = zend_hash_find_ind(target_symbol_table, Z_STR_P(varname));
    4674             :                 }
    4675             : 
    4676          43 :                 if (IS_CONST != IS_CONST && varname == &tmp) {
    4677             :                         zval_dtor(&tmp);
    4678             :                 }
    4679             : 
    4680          43 :                 if (opline->extended_value & ZEND_ISSET) {
    4681          97 :                         ZVAL_BOOL(EX_VAR(opline->result.var),
    4682             :                                 value && Z_TYPE_P(value) > IS_NULL &&
    4683             :                             (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL));
    4684             :                 } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
    4685           0 :                         ZVAL_BOOL(EX_VAR(opline->result.var),
    4686             :                                 !value || !i_zend_is_true(value TSRMLS_CC));
    4687             :                 }
    4688             : 
    4689             :                 CHECK_EXCEPTION();
    4690          43 :                 ZEND_VM_NEXT_OPCODE();
    4691             :         }
    4692             : }
    4693             : 
    4694           2 : static int ZEND_FASTCALL  ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4695             : {
    4696           2 :         USE_OPLINE
    4697             : 
    4698             :         zval *container;
    4699             :         int result;
    4700             :         zend_ulong hval;
    4701             :         zval *offset;
    4702             : 
    4703             :         SAVE_OPLINE();
    4704           2 :         container = opline->op1.zv;
    4705           2 :         offset = opline->op2.zv;
    4706             : 
    4707           2 :         if (IS_CONST != IS_UNUSED && EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
    4708           2 :                 HashTable *ht = Z_ARRVAL_P(container);
    4709             :                 zval *value;
    4710             :                 zend_string *str;
    4711             : 
    4712             : isset_again:
    4713           2 :                 if (EXPECTED(Z_TYPE_P(offset) == IS_STRING)) {
    4714           0 :                         str = Z_STR_P(offset);
    4715           0 :                         if (IS_CONST != IS_CONST) {
    4716             :                                 if (ZEND_HANDLE_NUMERIC(str, hval)) {
    4717             :                                         goto num_index_prop;
    4718             :                                 }
    4719             :                         }
    4720             : str_index_prop:
    4721           0 :                         value = zend_hash_find_ind(ht, str);
    4722           2 :                 } else if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
    4723           2 :                         hval = Z_LVAL_P(offset);
    4724             : num_index_prop:
    4725           2 :                         value = zend_hash_index_find(ht, hval);
    4726             :                 } else {
    4727           0 :                         switch (Z_TYPE_P(offset)) {
    4728             :                                 case IS_DOUBLE:
    4729           0 :                                         hval = zend_dval_to_lval(Z_DVAL_P(offset));
    4730           0 :                                         goto num_index_prop;
    4731             :                                 case IS_NULL:
    4732           0 :                                         str = STR_EMPTY_ALLOC();
    4733           0 :                                         goto str_index_prop;
    4734             :                                 case IS_FALSE:
    4735           0 :                                         hval = 0;
    4736           0 :                                         goto num_index_prop;
    4737             :                                 case IS_TRUE:
    4738           0 :                                         hval = 1;
    4739           0 :                                         goto num_index_prop;
    4740             :                                 case IS_RESOURCE:
    4741           0 :                                         hval = Z_RES_HANDLE_P(offset);
    4742           0 :                                         goto num_index_prop;
    4743             :                                 case IS_REFERENCE:
    4744           0 :                                         offset = Z_REFVAL_P(offset);
    4745           0 :                                         goto isset_again;
    4746             :                                 default:
    4747           0 :                                         zend_error(E_WARNING, "Illegal offset type in isset or empty");
    4748           0 :                                         value = NULL;
    4749             :                                         break;
    4750             :                         }
    4751             :                 }
    4752             : 
    4753           2 :                 if (opline->extended_value & ZEND_ISSET) {
    4754             :                         /* > IS_NULL means not IS_UNDEF and not IS_NULL */
    4755           6 :                         result = value != NULL && Z_TYPE_P(value) > IS_NULL &&
    4756           0 :                             (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
    4757             :                 } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
    4758           0 :                         result = (value == NULL || !i_zend_is_true(value TSRMLS_CC));
    4759             :                 }
    4760           0 :         } else if (IS_CONST == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
    4761           0 :                 if (EXPECTED(Z_OBJ_HT_P(container)->has_dimension)) {
    4762           0 :                         result = Z_OBJ_HT_P(container)->has_dimension(container, offset, (opline->extended_value & ZEND_ISSET) == 0 TSRMLS_CC);
    4763             :                 } else {
    4764           0 :                         zend_error(E_NOTICE, "Trying to check element of non-array");
    4765           0 :                         result = 0;
    4766             :                 }
    4767           0 :                 if ((opline->extended_value & ZEND_ISSET) == 0) {
    4768           0 :                         result = !result;
    4769             :                 }
    4770           0 :         } else if (EXPECTED(Z_TYPE_P(container) == IS_STRING)) { /* string offsets */
    4771             :                 zval tmp;
    4772             : 
    4773           0 :                 result = 0;
    4774           0 :                 if (UNEXPECTED(Z_TYPE_P(offset) != IS_LONG)) {
    4775           0 :                         if (IS_CONST == IS_CV || IS_CONST == IS_VAR) {
    4776             :                                 ZVAL_DEREF(offset);
    4777             :                         }
    4778           0 :                         if (Z_TYPE_P(offset) < IS_STRING /* simple scalar types */
    4779             :                                         || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */
    4780           0 :                                                 && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) {
    4781           0 :                                 ZVAL_DUP(&tmp, offset);
    4782           0 :                                 convert_to_long(&tmp);
    4783           0 :                                 offset = &tmp;
    4784             :                         }
    4785             :                 }
    4786           0 :                 if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
    4787           0 :                         if (offset->value.lval >= 0 && (size_t)offset->value.lval < Z_STRLEN_P(container)) {
    4788           0 :                                 if ((opline->extended_value & ZEND_ISSET) ||
    4789           0 :                                     Z_STRVAL_P(container)[offset->value.lval] != '0') {
    4790           0 :                                         result = 1;
    4791             :                                 }
    4792             :                         }
    4793             :                 }
    4794           0 :                 if ((opline->extended_value & ZEND_ISSET) == 0) {
    4795           0 :                         result = !result;
    4796             :                 }
    4797             :         } else {
    4798           0 :                 result = ((opline->extended_value & ZEND_ISSET) == 0);
    4799             :         }
    4800             : 
    4801           2 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    4802             : 
    4803             :         CHECK_EXCEPTION();
    4804           2 :         ZEND_VM_NEXT_OPCODE();
    4805             : }
    4806             : 
    4807           3 : static int ZEND_FASTCALL  ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4808             : {
    4809           3 :         USE_OPLINE
    4810             : 
    4811             :         zval *container;
    4812             :         int result;
    4813             :         zval *offset;
    4814             : 
    4815             :         SAVE_OPLINE();
    4816           3 :         container = opline->op1.zv;
    4817           3 :         offset = opline->op2.zv;
    4818             : 
    4819           3 :         if (IS_CONST == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
    4820           0 :                 if (EXPECTED(Z_OBJ_HT_P(container)->has_property)) {
    4821           0 :                         result = Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISSET) == 0, ((IS_CONST == IS_CONST) ? (EX(run_time_cache) + Z_CACHE_SLOT_P(offset)) : NULL) TSRMLS_CC);
    4822             :                 } else {
    4823           0 :                         zend_error(E_NOTICE, "Trying to check property of non-object");
    4824           0 :                         result = 0;
    4825             :                 }
    4826           0 :                 if ((opline->extended_value & ZEND_ISSET) == 0) {
    4827           0 :                         result = !result;
    4828             :                 }
    4829             :         } else {
    4830           3 :                 result = ((opline->extended_value & ZEND_ISSET) == 0);
    4831             :         }
    4832             : 
    4833           3 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    4834             : 
    4835             :         CHECK_EXCEPTION();
    4836           3 :         ZEND_VM_NEXT_OPCODE();
    4837             : }
    4838             : 
    4839         155 : static int ZEND_FASTCALL  ZEND_DECLARE_CONST_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4840             : {
    4841         155 :         USE_OPLINE
    4842             : 
    4843             :         zval *name;
    4844             :         zval *val;
    4845             :         zend_constant c;
    4846             : 
    4847             :         SAVE_OPLINE();
    4848         155 :         name  = opline->op1.zv;
    4849         155 :         val   = opline->op2.zv;
    4850             : 
    4851         155 :         ZVAL_COPY_VALUE(&c.value, val);
    4852         155 :         if (Z_OPT_CONSTANT(c.value)) {
    4853          34 :                 zval_update_constant(&c.value, 0 TSRMLS_CC);
    4854             :         } else {
    4855             :                 /* IS_CONST can't be IS_OBJECT, IS_RESOURCE or IS_REFERENCE */
    4856         121 :                 if (UNEXPECTED(Z_OPT_COPYABLE(c.value))) {
    4857           3 :                         zval_copy_ctor_func(&c.value);
    4858             :                 }
    4859             :         }
    4860         154 :         c.flags = CONST_CS; /* non persistent, case sensetive */
    4861         308 :         c.name = zend_string_dup(Z_STR_P(name), 0);
    4862         154 :         c.module_number = PHP_USER_CONSTANT;
    4863             : 
    4864         154 :         if (zend_register_constant(&c TSRMLS_CC) == FAILURE) {
    4865             :         }
    4866             : 
    4867             : 
    4868             :         CHECK_EXCEPTION();
    4869         154 :         ZEND_VM_NEXT_OPCODE();
    4870             : }
    4871             : 
    4872          12 : static int ZEND_FASTCALL  ZEND_YIELD_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4873             : {
    4874          12 :         USE_OPLINE
    4875             : 
    4876             :         /* The generator object is stored in EX(return_value) */
    4877          12 :         zend_generator *generator = (zend_generator *) EX(return_value);
    4878             : 
    4879          12 :         if (generator->flags & ZEND_GENERATOR_FORCED_CLOSE) {
    4880           0 :                 zend_error_noreturn(E_ERROR, "Cannot yield from finally in a force-closed generator");
    4881             :         }
    4882             : 
    4883             :         /* Destroy the previously yielded value */
    4884          12 :         zval_ptr_dtor(&generator->value);
    4885             : 
    4886             :         /* Destroy the previously yielded key */
    4887          12 :         zval_ptr_dtor(&generator->key);
    4888             : 
    4889             :         /* Set the new yielded value */
    4890             :         if (IS_CONST != IS_UNUSED) {
    4891             : 
    4892             : 
    4893          12 :                 if (EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE) {
    4894             :                         /* Constants and temporary variables aren't yieldable by reference,
    4895             :                          * but we still allow them with a notice. */
    4896             :                         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    4897             :                                 zval *value;
    4898             : 
    4899           0 :                                 zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    4900             : 
    4901           0 :                                 value = opline->op1.zv;
    4902           0 :                                 ZVAL_COPY_VALUE(&generator->value, value);
    4903           0 :                                 if (Z_OPT_REFCOUNTED(generator->value)) Z_SET_REFCOUNT(generator->value, 1);
    4904             : 
    4905             :                                 /* Temporary variables don't need ctor copying */
    4906             :                                 if (IS_CONST != IS_TMP_VAR) {
    4907           0 :                                         zval_opt_copy_ctor(&generator->value);
    4908             :                                 }
    4909             :                         } else {
    4910             :                                 zval *value_ptr = NULL;
    4911             : 
    4912             :                                 if (IS_CONST == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
    4913             :                                         zend_error_noreturn(E_ERROR, "Cannot yield string offsets by reference");
    4914             :                                 }
    4915             : 
    4916             :                                 /* If a function call result is yielded and the function did
    4917             :                                  * not return by reference we throw a notice. */
    4918             :                                 if (IS_CONST == IS_VAR &&
    4919             :                                     (value_ptr == &EG(uninitialized_zval) ||
    4920             :                                      (opline->extended_value == ZEND_RETURNS_FUNCTION &&
    4921             :                                       !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
    4922             :                                         zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    4923             :                                 } else {
    4924             :                                         ZVAL_MAKE_REF(value_ptr);
    4925             :                                 }
    4926             :                                 ZVAL_COPY(&generator->value, value_ptr);
    4927             : 
    4928             :                         }
    4929             :                 } else {
    4930          12 :                         zval *value = opline->op1.zv;
    4931             : 
    4932             :                         /* Consts, temporary variables and references need copying */
    4933             :                         if (IS_CONST == IS_CONST) {
    4934          12 :                                 ZVAL_DUP(&generator->value, value);
    4935             :                         } else if (IS_CONST == IS_TMP_VAR) {
    4936             :                                 ZVAL_COPY_VALUE(&generator->value, value);
    4937             :             } else if ((IS_CONST == IS_CV || IS_CONST == IS_VAR) && Z_ISREF_P(value)) {
    4938             :                                 ZVAL_DUP(&generator->value, Z_REFVAL_P(value));
    4939             : 
    4940             :                         } else {
    4941             :                                 ZVAL_COPY_VALUE(&generator->value, value);
    4942             :                                 if (IS_CONST == IS_CV) {
    4943             :                                         if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
    4944             :                                 }
    4945             :                         }
    4946             :                 }
    4947             :         } else {
    4948             :                 /* If no value was specified yield null */
    4949             :                 ZVAL_NULL(&generator->value);
    4950             :         }
    4951             : 
    4952             :         /* Set the new yielded key */
    4953             :         if (IS_CONST != IS_UNUSED) {
    4954             : 
    4955          12 :                 zval *key = opline->op2.zv;
    4956             : 
    4957             :                 /* Consts, temporary variables and references need copying */
    4958             :                 if (IS_CONST == IS_CONST) {
    4959          12 :                         ZVAL_DUP(&generator->key, key);
    4960             :                 } else if (IS_CONST == IS_TMP_VAR) {
    4961             :                         ZVAL_COPY_VALUE(&generator->key, key);
    4962             :                 } else if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) && Z_ISREF_P(key)) {
    4963             :                         ZVAL_DUP(&generator->key, Z_REFVAL_P(key));
    4964             : 
    4965             :                 } else {
    4966             :                         ZVAL_COPY_VALUE(&generator->key, key);
    4967             :                         if (IS_CONST == IS_CV) {
    4968             :                                 if (Z_OPT_REFCOUNTED_P(key)) Z_ADDREF_P(key);
    4969             :                         }
    4970             :                 }
    4971             : 
    4972          26 :                 if (Z_TYPE(generator->key) == IS_LONG
    4973           2 :                     && Z_LVAL(generator->key) > generator->largest_used_integer_key
    4974             :                 ) {
    4975           2 :                         generator->largest_used_integer_key = Z_LVAL(generator->key);
    4976             :                 }
    4977             :         } else {
    4978             :                 /* If no key was specified we use auto-increment keys */
    4979             :                 generator->largest_used_integer_key++;
    4980             :                 ZVAL_LONG(&generator->key, generator->largest_used_integer_key);
    4981             :         }
    4982             : 
    4983          12 :         if (RETURN_VALUE_USED(opline)) {
    4984             :                 /* If the return value of yield is used set the send
    4985             :                  * target and initialize it to NULL */
    4986           0 :                 generator->send_target = EX_VAR(opline->result.var);
    4987           0 :                 ZVAL_NULL(generator->send_target);
    4988             :         } else {
    4989          12 :                 generator->send_target = NULL;
    4990             :         }
    4991             : 
    4992             :         /* We increment to the next op, so we are at the correct position when the
    4993             :          * generator is resumed. */
    4994          12 :         ZEND_VM_INC_OPCODE();
    4995             : 
    4996             :         /* The GOTO VM uses a local opline variable. We need to set the opline
    4997             :          * variable in execute_data so we don't resume at an old position. */
    4998             :         SAVE_OPLINE();
    4999             : 
    5000          12 :         ZEND_VM_RETURN();
    5001             : }
    5002             : 
    5003           0 : static int ZEND_FASTCALL  ZEND_POW_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5004             : {
    5005           0 :         USE_OPLINE
    5006             : 
    5007             : 
    5008             :         SAVE_OPLINE();
    5009           0 :         pow_function(EX_VAR(opline->result.var),
    5010             :                 opline->op1.zv,
    5011             :                 opline->op2.zv TSRMLS_CC);
    5012             : 
    5013             : 
    5014             :         CHECK_EXCEPTION();
    5015           0 :         ZEND_VM_NEXT_OPCODE();
    5016             : }
    5017             : 
    5018       72495 : static int ZEND_FASTCALL  ZEND_ADD_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5019             : {
    5020       72495 :         USE_OPLINE
    5021             :         zend_free_op free_op2;
    5022             : 
    5023             :         SAVE_OPLINE();
    5024      144990 :         fast_add_function(EX_VAR(opline->result.var),
    5025             :                 opline->op1.zv,
    5026             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2) TSRMLS_CC);
    5027             : 
    5028       72495 :         zval_ptr_dtor_nogc(free_op2);
    5029             :         CHECK_EXCEPTION();
    5030       72495 :         ZEND_VM_NEXT_OPCODE();
    5031             : }
    5032             : 
    5033        2135 : static int ZEND_FASTCALL  ZEND_SUB_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5034             : {
    5035        2135 :         USE_OPLINE
    5036             :         zend_free_op free_op2;
    5037             : 
    5038             :         SAVE_OPLINE();
    5039        4270 :         fast_sub_function(EX_VAR(opline->result.var),
    5040             :                 opline->op1.zv,
    5041             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2) TSRMLS_CC);
    5042             : 
    5043        2135 :         zval_ptr_dtor_nogc(free_op2);
    5044             :         CHECK_EXCEPTION();
    5045        2135 :         ZEND_VM_NEXT_OPCODE();
    5046             : }
    5047             : 
    5048           2 : static int ZEND_FASTCALL  ZEND_MUL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5049             : {
    5050           2 :         USE_OPLINE
    5051             :         zend_free_op free_op2;
    5052             : 
    5053             :         SAVE_OPLINE();
    5054           4 :         fast_mul_function(EX_VAR(opline->result.var),
    5055             :                 opline->op1.zv,
    5056             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2) TSRMLS_CC);
    5057             : 
    5058           2 :         zval_ptr_dtor_nogc(free_op2);
    5059             :         CHECK_EXCEPTION();
    5060           2 :         ZEND_VM_NEXT_OPCODE();
    5061             : }
    5062             : 
    5063           0 : static int ZEND_FASTCALL  ZEND_DIV_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5064             : {
    5065           0 :         USE_OPLINE
    5066             :         zend_free_op free_op2;
    5067             : 
    5068             :         SAVE_OPLINE();
    5069           0 :         fast_div_function(EX_VAR(opline->result.var),
    5070             :                 opline->op1.zv,
    5071             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2) TSRMLS_CC);
    5072             : 
    5073           0 :         zval_ptr_dtor_nogc(free_op2);
    5074             :         CHECK_EXCEPTION();
    5075           0 :         ZEND_VM_NEXT_OPCODE();
    5076             : }
    5077             : 
    5078           0 : static int ZEND_FASTCALL  ZEND_MOD_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5079             : {
    5080           0 :         USE_OPLINE
    5081             :         zend_free_op free_op2;
    5082             : 
    5083             :         SAVE_OPLINE();
    5084           0 :         fast_mod_function(EX_VAR(opline->result.var),
    5085             :                 opline->op1.zv,
    5086             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2) TSRMLS_CC);
    5087             : 
    5088           0 :         zval_ptr_dtor_nogc(free_op2);
    5089             :         CHECK_EXCEPTION();
    5090           0 :         ZEND_VM_NEXT_OPCODE();
    5091             : }
    5092             : 
    5093           0 : static int ZEND_FASTCALL  ZEND_SL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5094             : {
    5095           0 :         USE_OPLINE
    5096             :         zend_free_op free_op2;
    5097             : 
    5098             :         SAVE_OPLINE();
    5099           0 :         shift_left_function(EX_VAR(opline->result.var),
    5100             :                 opline->op1.zv,
    5101             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2) TSRMLS_CC);
    5102             : 
    5103           0 :         zval_ptr_dtor_nogc(free_op2);
    5104             :         CHECK_EXCEPTION();
    5105           0 :         ZEND_VM_NEXT_OPCODE();
    5106             : }
    5107             : 
    5108           0 : static int ZEND_FASTCALL  ZEND_SR_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5109             : {
    5110           0 :         USE_OPLINE
    5111             :         zend_free_op free_op2;
    5112             : 
    5113             :         SAVE_OPLINE();
    5114           0 :         shift_right_function(EX_VAR(opline->result.var),
    5115             :                 opline->op1.zv,
    5116             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2) TSRMLS_CC);
    5117             : 
    5118           0 :         zval_ptr_dtor_nogc(free_op2);
    5119             :         CHECK_EXCEPTION();
    5120           0 :         ZEND_VM_NEXT_OPCODE();
    5121             : }
    5122             : 
    5123        1775 : static int ZEND_FASTCALL  ZEND_CONCAT_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5124             : {
    5125        1775 :         USE_OPLINE
    5126             :         zend_free_op free_op2;
    5127             : 
    5128             :         SAVE_OPLINE();
    5129        3550 :         concat_function(EX_VAR(opline->result.var),
    5130             :                 opline->op1.zv,
    5131             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2) TSRMLS_CC);
    5132             : 
    5133        1775 :         zval_ptr_dtor_nogc(free_op2);
    5134             :         CHECK_EXCEPTION();
    5135        1775 :         ZEND_VM_NEXT_OPCODE();
    5136             : }
    5137             : 
    5138           0 : static int ZEND_FASTCALL  ZEND_IS_IDENTICAL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5139             : {
    5140           0 :         USE_OPLINE
    5141             :         zend_free_op free_op2;
    5142             : 
    5143             :         SAVE_OPLINE();
    5144           0 :         fast_is_identical_function(EX_VAR(opline->result.var),
    5145             :                 opline->op1.zv,
    5146             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2) TSRMLS_CC);
    5147             : 
    5148           0 :         zval_ptr_dtor_nogc(free_op2);
    5149             :         CHECK_EXCEPTION();
    5150           0 :         ZEND_VM_NEXT_OPCODE();
    5151             : }
    5152             : 
    5153           0 : static int ZEND_FASTCALL  ZEND_IS_NOT_IDENTICAL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5154             : {
    5155           0 :         USE_OPLINE
    5156             :         zend_free_op free_op2;
    5157           0 :         zval *result = EX_VAR(opline->result.var);
    5158             : 
    5159             :         SAVE_OPLINE();
    5160           0 :         fast_is_not_identical_function(result,
    5161             :                 opline->op1.zv,
    5162             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2) TSRMLS_CC);
    5163             : 
    5164           0 :         zval_ptr_dtor_nogc(free_op2);
    5165             :         CHECK_EXCEPTION();
    5166           0 :         ZEND_VM_NEXT_OPCODE();
    5167             : }
    5168             : 
    5169          11 : static int ZEND_FASTCALL  ZEND_IS_EQUAL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5170             : {
    5171          11 :         USE_OPLINE
    5172             :         zend_free_op free_op2;
    5173          11 :         zval *result = EX_VAR(opline->result.var);
    5174             : 
    5175             :         SAVE_OPLINE();
    5176          22 :         fast_equal_function(result,
    5177             :                 opline->op1.zv,
    5178             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2) TSRMLS_CC);
    5179             : 
    5180          11 :         zval_ptr_dtor_nogc(free_op2);
    5181             :         CHECK_EXCEPTION();
    5182          11 :         ZEND_VM_NEXT_OPCODE();
    5183             : }
    5184             : 
    5185           0 : static int ZEND_FASTCALL  ZEND_IS_NOT_EQUAL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5186             : {
    5187           0 :         USE_OPLINE
    5188             :         zend_free_op free_op2;
    5189           0 :         zval *result = EX_VAR(opline->result.var);
    5190             : 
    5191             :         SAVE_OPLINE();
    5192           0 :         fast_not_equal_function(result,
    5193             :                 opline->op1.zv,
    5194             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2) TSRMLS_CC);
    5195             : 
    5196           0 :         zval_ptr_dtor_nogc(free_op2);
    5197             :         CHECK_EXCEPTION();
    5198           0 :         ZEND_VM_NEXT_OPCODE();
    5199             : }
    5200             : 
    5201      506199 : static int ZEND_FASTCALL  ZEND_IS_SMALLER_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5202             : {
    5203      506199 :         USE_OPLINE
    5204             :         zend_free_op free_op2;
    5205      506199 :         zval *result = EX_VAR(opline->result.var);
    5206             : 
    5207             :         SAVE_OPLINE();
    5208     1012398 :         fast_is_smaller_function(result,
    5209             :                 opline->op1.zv,
    5210             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2) TSRMLS_CC);
    5211             : 
    5212      506199 :         zval_ptr_dtor_nogc(free_op2);
    5213             :         CHECK_EXCEPTION();
    5214      506199 :         ZEND_VM_NEXT_OPCODE();
    5215             : }
    5216             : 
    5217       18293 : static int ZEND_FASTCALL  ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5218             : {
    5219       18293 :         USE_OPLINE
    5220             :         zend_free_op free_op2;
    5221       18293 :         zval *result = EX_VAR(opline->result.var);
    5222             : 
    5223             :         SAVE_OPLINE();
    5224       36586 :         fast_is_smaller_or_equal_function(result,
    5225             :                 opline->op1.zv,
    5226             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2) TSRMLS_CC);
    5227             : 
    5228       18293 :         zval_ptr_dtor_nogc(free_op2);
    5229             :         CHECK_EXCEPTION();
    5230       18293 :         ZEND_VM_NEXT_OPCODE();
    5231             : }
    5232             : 
    5233      451806 : static int ZEND_FASTCALL  ZEND_BW_OR_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5234             : {
    5235      451806 :         USE_OPLINE
    5236             :         zend_free_op free_op2;
    5237             : 
    5238             :         SAVE_OPLINE();
    5239      903612 :         bitwise_or_function(EX_VAR(opline->result.var),
    5240             :                 opline->op1.zv,
    5241             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2) TSRMLS_CC);
    5242             : 
    5243      451806 :         zval_ptr_dtor_nogc(free_op2);
    5244             :         CHECK_EXCEPTION();
    5245      451806 :         ZEND_VM_NEXT_OPCODE();
    5246             : }
    5247             : 
    5248         100 : static int ZEND_FASTCALL  ZEND_BW_AND_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5249             : {
    5250         100 :         USE_OPLINE
    5251             :         zend_free_op free_op2;
    5252             : 
    5253             :         SAVE_OPLINE();
    5254         200 :         bitwise_and_function(EX_VAR(opline->result.var),
    5255             :                 opline->op1.zv,
    5256             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2) TSRMLS_CC);
    5257             : 
    5258         100 :         zval_ptr_dtor_nogc(free_op2);
    5259             :         CHECK_EXCEPTION();
    5260         100 :         ZEND_VM_NEXT_OPCODE();
    5261             : }
    5262             : 
    5263           0 : static int ZEND_FASTCALL  ZEND_BW_XOR_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5264             : {
    5265           0 :         USE_OPLINE
    5266             :         zend_free_op free_op2;
    5267             : 
    5268             :         SAVE_OPLINE();
    5269           0 :         bitwise_xor_function(EX_VAR(opline->result.var),
    5270             :                 opline->op1.zv,
    5271             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2) TSRMLS_CC);
    5272             : 
    5273           0 :         zval_ptr_dtor_nogc(free_op2);
    5274             :         CHECK_EXCEPTION();
    5275           0 :         ZEND_VM_NEXT_OPCODE();
    5276             : }
    5277             : 
    5278           0 : static int ZEND_FASTCALL  ZEND_BOOL_XOR_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5279             : {
    5280           0 :         USE_OPLINE
    5281             :         zend_free_op free_op2;
    5282             : 
    5283             :         SAVE_OPLINE();
    5284           0 :         boolean_xor_function(EX_VAR(opline->result.var),
    5285             :                 opline->op1.zv,
    5286             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2) TSRMLS_CC);
    5287             : 
    5288           0 :         zval_ptr_dtor_nogc(free_op2);
    5289             :         CHECK_EXCEPTION();
    5290           0 :         ZEND_VM_NEXT_OPCODE();
    5291             : }
    5292             : 
    5293           0 : static int ZEND_FASTCALL  ZEND_FETCH_DIM_R_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5294             : {
    5295           0 :         USE_OPLINE
    5296             :         zend_free_op free_op2;
    5297             :         zval *container;
    5298             : 
    5299             :         SAVE_OPLINE();
    5300           0 :         container = opline->op1.zv;
    5301           0 :         zend_fetch_dimension_address_read_R(EX_VAR(opline->result.var), container, _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2), IS_TMP_VAR TSRMLS_CC);
    5302           0 :         zval_ptr_dtor_nogc(free_op2);
    5303             : 
    5304             :         CHECK_EXCEPTION();
    5305           0 :         ZEND_VM_NEXT_OPCODE();
    5306             : }
    5307             : 
    5308           0 : static int ZEND_FASTCALL  ZEND_FETCH_DIM_IS_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5309             : {
    5310           0 :         USE_OPLINE
    5311             :         zend_free_op free_op2;
    5312             :         zval *container;
    5313             : 
    5314             :         SAVE_OPLINE();
    5315           0 :         container = opline->op1.zv;
    5316           0 :         zend_fetch_dimension_address_read_IS(EX_VAR(opline->result.var), container, _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2), IS_TMP_VAR TSRMLS_CC);
    5317           0 :         zval_ptr_dtor_nogc(free_op2);
    5318             : 
    5319             :         CHECK_EXCEPTION();
    5320           0 :         ZEND_VM_NEXT_OPCODE();
    5321             : }
    5322             : 
    5323           0 : static int ZEND_FASTCALL  ZEND_FETCH_DIM_FUNC_ARG_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5324             : {
    5325           0 :         USE_OPLINE
    5326             :         zval *container;
    5327             :         zend_free_op free_op1, free_op2;
    5328             : 
    5329             :         SAVE_OPLINE();
    5330             : 
    5331           0 :         if (zend_is_by_ref_func_arg_fetch(opline, EX(call) TSRMLS_CC)) {
    5332             :         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    5333           0 :             zend_error_noreturn(E_ERROR, "Cannot use temporary expression in write context");
    5334             :         }
    5335             :                 container = NULL;
    5336             :                 if (IS_CONST == IS_VAR && UNEXPECTED(container == NULL)) {
    5337             :                         zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
    5338             :                 }
    5339             :                 ZVAL_DEREF(container);
    5340             :                 zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2), IS_TMP_VAR TSRMLS_CC);
    5341             :                 if (IS_CONST == IS_VAR && READY_TO_DESTROY(free_op1)) {
    5342             :                         EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
    5343             :                 }
    5344             :                 zval_ptr_dtor_nogc(free_op2);
    5345             : 
    5346             :         } else {
    5347           0 :                 if (IS_TMP_VAR == IS_UNUSED) {
    5348             :                         zend_error_noreturn(E_ERROR, "Cannot use [] for reading");
    5349             :                 }
    5350           0 :                 container = opline->op1.zv;
    5351           0 :                 zend_fetch_dimension_address_read_R(EX_VAR(opline->result.var), container, _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2), IS_TMP_VAR TSRMLS_CC);
    5352           0 :                 zval_ptr_dtor_nogc(free_op2);
    5353             : 
    5354             :         }
    5355             :         CHECK_EXCEPTION();
    5356           0 :         ZEND_VM_NEXT_OPCODE();
    5357             : }
    5358             : 
    5359           0 : static int ZEND_FASTCALL  ZEND_FETCH_OBJ_R_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5360             : {
    5361           0 :         USE_OPLINE
    5362             : 
    5363             :         zval *container;
    5364             :         zend_free_op free_op2;
    5365             :         zval *offset;
    5366             : 
    5367             :         SAVE_OPLINE();
    5368           0 :         container = opline->op1.zv;
    5369           0 :         offset  = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2);
    5370             : 
    5371           0 :         if ((IS_CONST != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT)) ||
    5372           0 :             UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
    5373           0 :                 zend_error(E_NOTICE, "Trying to get property of non-object");
    5374           0 :                 ZVAL_NULL(EX_VAR(opline->result.var));
    5375             :         } else {
    5376             :                 zval *retval;
    5377             : 
    5378             :                 /* here we are sure we are dealing with an object */
    5379             :                 do {
    5380           0 :                         if (IS_TMP_VAR == IS_CONST &&
    5381             :                                 EXPECTED(Z_OBJCE_P(container) == CACHED_PTR(Z_CACHE_SLOT_P(offset)))) {
    5382             :                                 zend_property_info *prop_info = CACHED_PTR(Z_CACHE_SLOT_P(offset) + 1);
    5383             :                                 zend_object *zobj = Z_OBJ_P(container);
    5384             : 
    5385             :                                 if (EXPECTED(prop_info)) {
    5386             :                                         retval = OBJ_PROP(zobj, prop_info->offset);
    5387             :                                         if (EXPECTED(Z_TYPE_P(retval) != IS_UNDEF)) {
    5388             :                                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    5389             :                                                 break;
    5390             :                                         }
    5391             :                                 } else if (EXPECTED(zobj->properties != NULL)) {
    5392             :                                         retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
    5393             :                                         if (EXPECTED(retval)) {
    5394             :                                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    5395             :                                                 break;
    5396             :                                         }
    5397             :                                 }
    5398             :                         }
    5399             : 
    5400           0 :                         retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_R, ((IS_TMP_VAR == IS_CONST) ? (EX(run_time_cache) + Z_CACHE_SLOT_P(offset)) : NULL), EX_VAR(opline->result.var) TSRMLS_CC);
    5401             : 
    5402           0 :                         if (retval != EX_VAR(opline->result.var)) {
    5403           0 :                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    5404             :                         }
    5405             :                 } while (0);
    5406             :         }
    5407             : 
    5408           0 :         zval_ptr_dtor_nogc(free_op2);
    5409             : 
    5410             :         CHECK_EXCEPTION();
    5411           0 :         ZEND_VM_NEXT_OPCODE();
    5412             : }
    5413             : 
    5414           0 : static int ZEND_FASTCALL  ZEND_FETCH_OBJ_IS_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5415             : {
    5416           0 :         USE_OPLINE
    5417             : 
    5418             :         zval *container;
    5419             :         zend_free_op free_op2;
    5420             :         zval *offset;
    5421             : 
    5422             :         SAVE_OPLINE();
    5423           0 :         container = opline->op1.zv;
    5424           0 :         offset  = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2);
    5425             : 
    5426           0 :         if ((IS_CONST != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT)) ||
    5427           0 :             UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
    5428           0 :                 ZVAL_NULL(EX_VAR(opline->result.var));
    5429             :         } else {
    5430             :                 zval *retval;
    5431             : 
    5432             :                 /* here we are sure we are dealing with an object */
    5433             :                 do {
    5434           0 :                         if (IS_TMP_VAR == IS_CONST &&
    5435             :                                 EXPECTED(Z_OBJCE_P(container) == CACHED_PTR(Z_CACHE_SLOT_P(offset)))) {
    5436             :                                 zend_property_info *prop_info = CACHED_PTR(Z_CACHE_SLOT_P(offset) + 1);
    5437             :                                 zend_object *zobj = Z_OBJ_P(container);
    5438             : 
    5439             :                                 if (EXPECTED(prop_info)) {
    5440             :                                         retval = OBJ_PROP(zobj, prop_info->offset);
    5441             :                                         if (EXPECTED(Z_TYPE_P(retval) != IS_UNDEF)) {
    5442             :                                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    5443             :                                                 break;
    5444             :                                         }
    5445             :                                 } else if (EXPECTED(zobj->properties != NULL)) {
    5446             :                                         retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
    5447             :                                         if (EXPECTED(retval)) {
    5448             :                                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    5449             :                                                 break;
    5450             :                                         }
    5451             :                                 }
    5452             :                         }
    5453             : 
    5454           0 :                         retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_IS, ((IS_TMP_VAR == IS_CONST) ? (EX(run_time_cache) + Z_CACHE_SLOT_P(offset)) : NULL), EX_VAR(opline->result.var) TSRMLS_CC);
    5455             : 
    5456           0 :                         if (retval != EX_VAR(opline->result.var)) {
    5457           0 :                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    5458             :                         }
    5459             :                 } while (0);
    5460             :         }
    5461             : 
    5462           0 :         zval_ptr_dtor_nogc(free_op2);
    5463             : 
    5464             :         CHECK_EXCEPTION();
    5465           0 :         ZEND_VM_NEXT_OPCODE();
    5466             : }
    5467             : 
    5468           0 : static int ZEND_FASTCALL  ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5469             : {
    5470           0 :         USE_OPLINE
    5471             :         zval *container;
    5472             : 
    5473           0 :         if (zend_is_by_ref_func_arg_fetch(opline, EX(call) TSRMLS_CC)) {
    5474             :                 /* Behave like FETCH_OBJ_W */
    5475             :                 zend_free_op free_op1, free_op2;
    5476             :                 zval *property;
    5477             : 
    5478             :                 SAVE_OPLINE();
    5479           0 :                 property = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2);
    5480           0 :                 container = NULL;
    5481             : 
    5482             :         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    5483           0 :             zend_error_noreturn(E_ERROR, "Cannot use temporary expression in write context");
    5484             :         }
    5485             :                 if (IS_CONST == IS_VAR && UNEXPECTED(container == NULL)) {
    5486             :                         zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
    5487             :                 }
    5488             :                 zend_fetch_property_address(EX_VAR(opline->result.var), container, IS_CONST, property, IS_TMP_VAR, ((IS_TMP_VAR == IS_CONST) ? (EX(run_time_cache) + Z_CACHE_SLOT_P(property)) : NULL), BP_VAR_W TSRMLS_CC);
    5489             :                 zval_ptr_dtor_nogc(free_op2);
    5490             :                 if (IS_CONST == IS_VAR && READY_TO_DESTROY(free_op1)) {
    5491             :                         EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
    5492             :                 }
    5493             : 
    5494             :                 CHECK_EXCEPTION();
    5495             :                 ZEND_VM_NEXT_OPCODE();
    5496             :         } else {
    5497           0 :                 return ZEND_FETCH_OBJ_R_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    5498             :         }
    5499             : }
    5500             : 
    5501           0 : static int ZEND_FASTCALL  ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5502             : {
    5503           0 :         USE_OPLINE
    5504             :         zval *function_name;
    5505             :         zend_class_entry *ce;
    5506             :         zend_object *object;
    5507             :         zend_function *fbc;
    5508             : 
    5509             :         SAVE_OPLINE();
    5510             : 
    5511             :         if (IS_CONST == IS_CONST) {
    5512             :                 /* no function found. try a static method in class */
    5513           0 :                 if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op1.zv))) {
    5514           0 :                         ce = CACHED_PTR(Z_CACHE_SLOT_P(opline->op1.zv));
    5515             :                 } else {
    5516           0 :                         ce = zend_fetch_class_by_name(Z_STR_P(opline->op1.zv), opline->op1.zv + 1, ZEND_FETCH_CLASS_DEFAULT TSRMLS_CC);
    5517           0 :                         if (UNEXPECTED(EG(exception) != NULL)) {
    5518           0 :                                 HANDLE_EXCEPTION();
    5519             :                         }
    5520           0 :                         if (UNEXPECTED(ce == NULL)) {
    5521           0 :                                 zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op1.zv));
    5522             :                         }
    5523           0 :                         CACHE_PTR(Z_CACHE_SLOT_P(opline->op1.zv), ce);
    5524             :                 }
    5525             :         } else {
    5526             :                 ce = Z_CE_P(EX_VAR(opline->op1.var));
    5527             :         }
    5528             : 
    5529           0 :         if (IS_CONST == IS_CONST &&
    5530             :             IS_TMP_VAR == IS_CONST &&
    5531             :             CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv))) {
    5532             :                 fbc = CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv));
    5533           0 :         } else if (IS_CONST != IS_CONST &&
    5534             :                    IS_TMP_VAR == IS_CONST &&
    5535             :                    (fbc = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(opline->op2.zv), ce))) {
    5536             :                 /* do nothing */
    5537             :         } else if (IS_TMP_VAR != IS_UNUSED) {
    5538             :                 zend_free_op free_op2;
    5539             : 
    5540           0 :                 function_name = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2);
    5541             :                 if (IS_TMP_VAR != IS_CONST) {
    5542           0 :                         if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
    5543           0 :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    5544           0 :                                         HANDLE_EXCEPTION();
    5545             :                                 }
    5546           0 :                                 zend_error_noreturn(E_ERROR, "Function name must be a string");
    5547             :                         }
    5548             :                 }
    5549             : 
    5550           0 :                 if (ce->get_static_method) {
    5551           0 :                         fbc = ce->get_static_method(ce, Z_STR_P(function_name) TSRMLS_CC);
    5552             :                 } else {
    5553           0 :                         fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_TMP_VAR == IS_CONST) ? (opline->op2.zv + 1) : NULL) TSRMLS_CC);
    5554             :                 }
    5555           0 :                 if (UNEXPECTED(fbc == NULL)) {
    5556           0 :                         zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", ce->name->val, Z_STRVAL_P(function_name));
    5557             :                 }
    5558           0 :                 if (IS_TMP_VAR == IS_CONST &&
    5559             :                     EXPECTED(fbc->type <= ZEND_USER_FUNCTION) &&
    5560             :                     EXPECTED((fbc->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0)) {
    5561             :                         if (IS_CONST == IS_CONST) {
    5562             :                                 CACHE_PTR(Z_CACHE_SLOT_P(function_name), fbc);
    5563             :                         } else {
    5564             :                                 CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), ce, fbc);
    5565             :                         }
    5566             :                 }
    5567             :                 if (IS_TMP_VAR != IS_CONST) {
    5568           0 :                         zval_ptr_dtor_nogc(free_op2);
    5569             :                 }
    5570             :         } else {
    5571             :                 if (UNEXPECTED(ce->constructor == NULL)) {
    5572             :                         zend_error_noreturn(E_ERROR, "Cannot call constructor");
    5573             :                 }
    5574             :                 if (Z_OBJ(EX(This)) && Z_OBJ(EX(This))->ce != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
    5575             :                         zend_error_noreturn(E_ERROR, "Cannot call private %s::__construct()", ce->name->val);
    5576             :                 }
    5577             :                 fbc = ce->constructor;
    5578             :         }
    5579             : 
    5580           0 :         object = NULL;
    5581           0 :         if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
    5582           0 :                 if (Z_OBJ(EX(This))) {
    5583           0 :                         object = Z_OBJ(EX(This));
    5584           0 :                         GC_REFCOUNT(object)++;
    5585             :                 }
    5586           0 :                 if (!object ||
    5587           0 :                     !instanceof_function(object->ce, ce TSRMLS_CC)) {
    5588             :                     /* We are calling method of the other (incompatible) class,
    5589             :                        but passing $this. This is done for compatibility with php-4. */
    5590           0 :                         if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
    5591           0 :                                 zend_error(
    5592             :                                         object ? E_DEPRECATED : E_STRICT,
    5593             :                                         "Non-static method %s::%s() should not be called statically%s",
    5594           0 :                                         fbc->common.scope->name->val, fbc->common.function_name->val,
    5595             :                                         object ? ", assuming $this from incompatible context" : "");
    5596             :                         } else {
    5597             :                                 /* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
    5598           0 :                                 zend_error_noreturn(
    5599             :                                         E_ERROR,
    5600             :                                         "Non-static method %s::%s() cannot be called statically%s",
    5601           0 :                                         fbc->common.scope->name->val, fbc->common.function_name->val,
    5602             :                                         object ? ", assuming $this from incompatible context" : "");
    5603             :                         }
    5604             :                 }
    5605             :         }
    5606             : 
    5607           0 :         if (IS_CONST != IS_CONST) {
    5608             :                 /* previous opcode is ZEND_FETCH_CLASS */
    5609             :                 if ((opline-1)->extended_value == ZEND_FETCH_CLASS_PARENT || (opline-1)->extended_value == ZEND_FETCH_CLASS_SELF) {
    5610             :                         ce = EX(called_scope);
    5611             :                 }
    5612             :         }
    5613             : 
    5614           0 :         EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
    5615           0 :                 fbc, opline->extended_value, ce, object, EX(call) TSRMLS_CC);
    5616             : 
    5617           0 :         if (IS_TMP_VAR == IS_UNUSED) {
    5618             :                 EX(call)->return_value = NULL;
    5619             :         }
    5620             : 
    5621             :         CHECK_EXCEPTION();
    5622           0 :         ZEND_VM_NEXT_OPCODE();
    5623             : }
    5624             : 
    5625          71 : static int ZEND_FASTCALL  ZEND_INIT_USER_CALL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5626             : {
    5627          71 :         USE_OPLINE
    5628             :         zend_free_op free_op2;
    5629         142 :         zval *function_name = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2);
    5630             :         zend_fcall_info_cache fcc;
    5631          71 :         char *error = NULL;
    5632             :         zend_function *func;
    5633             :         zend_class_entry *called_scope;
    5634             :         zend_object *object;
    5635             : 
    5636          71 :         if (zend_is_callable_ex(function_name, NULL, 0, NULL, &fcc, &error TSRMLS_CC)) {
    5637          64 :                 if (error) {
    5638           0 :                         efree(error);
    5639             :                 }
    5640          64 :                 func = fcc.function_handler;
    5641          64 :                 if (func->common.fn_flags & ZEND_ACC_CLOSURE) {
    5642             :                         /* Delay closure destruction until its invocation */
    5643           2 :                         func->common.prototype = (zend_function*)Z_OBJ_P(function_name);
    5644             :                         Z_ADDREF_P(function_name);
    5645             :                 }
    5646          64 :                 called_scope = fcc.called_scope;
    5647          64 :                 object = fcc.object;
    5648          64 :                 if (object) {
    5649          52 :                         GC_REFCOUNT(object)++; /* For $this pointer */
    5650          22 :                 } else if (func->common.scope &&
    5651          10 :                            !(func->common.fn_flags & ZEND_ACC_STATIC)) {
    5652           0 :                         if (func->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
    5653           0 :                                 zend_error(E_STRICT,
    5654             :                                 "Non-static method %s::%s() should not be called statically",
    5655           0 :                                 func->common.scope->name->val, func->common.function_name->val);
    5656             :                         } else {
    5657           0 :                                 zend_error_noreturn(
    5658             :                                         E_ERROR,
    5659             :                                         "Non-static method %s::%s() cannot be called statically",
    5660           0 :                                         func->common.scope->name->val, func->common.function_name->val);
    5661             :                         }
    5662             :                 }
    5663             :         } else {
    5664           7 :                 zend_error(E_WARNING, "%s() expects parameter 1 to be a valid callback, %s", Z_STRVAL_P(opline->op1.zv), error);
    5665           7 :                 efree(error);
    5666           7 :                 func = (zend_function*)&zend_pass_function;
    5667           7 :                 called_scope = NULL;
    5668           7 :                 object = NULL;
    5669             :         }
    5670             : 
    5671         213 :         EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
    5672          71 :                 func, opline->extended_value, called_scope, object, EX(call) TSRMLS_CC);
    5673             : 
    5674          71 :         zval_ptr_dtor_nogc(free_op2);
    5675             :         CHECK_EXCEPTION();
    5676          71 :         ZEND_VM_NEXT_OPCODE();
    5677             : }
    5678             : 
    5679          66 : static int ZEND_FASTCALL  ZEND_CASE_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5680             : {
    5681          66 :         USE_OPLINE
    5682             :         zend_free_op free_op2;
    5683          66 :         zval *result = EX_VAR(opline->result.var);
    5684             : 
    5685             :         SAVE_OPLINE();
    5686         132 :         fast_equal_function(result,
    5687             :                  opline->op1.zv,
    5688             :                  _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2) TSRMLS_CC);
    5689             : 
    5690          66 :         zval_ptr_dtor_nogc(free_op2);
    5691             :         CHECK_EXCEPTION();
    5692          66 :         ZEND_VM_NEXT_OPCODE();
    5693             : }
    5694             : 
    5695         246 : static int ZEND_FASTCALL  ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5696             : {
    5697         246 :         USE_OPLINE
    5698             : 
    5699             :         zval *expr_ptr, new_expr;
    5700             : 
    5701             :         SAVE_OPLINE();
    5702         246 :         if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) &&
    5703             :             (opline->extended_value & ZEND_ARRAY_ELEMENT_REF)) {
    5704             :                 expr_ptr = NULL;
    5705             :                 if (IS_CONST == IS_VAR && UNEXPECTED(expr_ptr == NULL)) {
    5706             :                         zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets");
    5707             :                 }
    5708             :                 ZVAL_MAKE_REF(expr_ptr);
    5709             :                 Z_ADDREF_P(expr_ptr);
    5710             : 
    5711             :         } else {
    5712         246 :                 expr_ptr = opline->op1.zv;
    5713         246 :                 if (IS_CONST == IS_TMP_VAR) {
    5714             :                         ZVAL_COPY_VALUE(&new_expr, expr_ptr);
    5715             :                         expr_ptr = &new_expr;
    5716             :                 } else if (IS_CONST == IS_CONST) {
    5717         246 :                         if (!Z_IMMUTABLE_P(expr_ptr)) {
    5718         246 :                                 ZVAL_DUP(&new_expr, expr_ptr);
    5719         246 :                                 expr_ptr = &new_expr;
    5720             :                         }
    5721             :                 } else if ((IS_CONST == IS_CV || IS_CONST == IS_VAR) && Z_ISREF_P(expr_ptr)) {
    5722             :                         expr_ptr = Z_REFVAL_P(expr_ptr);
    5723             :                         if (Z_REFCOUNTED_P(expr_ptr)) Z_ADDREF_P(expr_ptr);
    5724             : 
    5725             :                 } else if (IS_CONST == IS_CV && Z_REFCOUNTED_P(expr_ptr)) {
    5726             :                         Z_ADDREF_P(expr_ptr);
    5727             :                 }
    5728             :         }
    5729             : 
    5730             :         if (IS_TMP_VAR != IS_UNUSED) {
    5731             :                 zend_free_op free_op2;
    5732         492 :                 zval *offset = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2);
    5733             :                 zend_string *str;
    5734             :                 zend_ulong hval;
    5735             : 
    5736             : add_again:
    5737         246 :                 switch (Z_TYPE_P(offset)) {
    5738             :                         case IS_DOUBLE:
    5739           0 :                                 hval = zend_dval_to_lval(Z_DVAL_P(offset));
    5740           0 :                                 goto num_index;
    5741             :                         case IS_LONG:
    5742         167 :                                 hval = Z_LVAL_P(offset);
    5743             : num_index:
    5744         167 :                                 zend_hash_index_update(Z_ARRVAL_P(EX_VAR(opline->result.var)), hval, expr_ptr);
    5745         167 :                                 break;
    5746             :                         case IS_STRING:
    5747          78 :                                 str = Z_STR_P(offset);
    5748             :                                 if (IS_TMP_VAR != IS_CONST) {
    5749         156 :                                         if (ZEND_HANDLE_NUMERIC(str, hval)) {
    5750           0 :                                                 goto num_index;
    5751             :                                         }
    5752             :                                 }
    5753             : str_index:
    5754          78 :                                 zend_hash_update(Z_ARRVAL_P(EX_VAR(opline->result.var)), str, expr_ptr);
    5755          78 :                                 break;
    5756             :                         case IS_NULL:
    5757           0 :                                 str = STR_EMPTY_ALLOC();
    5758           0 :                                 goto str_index;
    5759             :                         case IS_FALSE:
    5760           0 :                                 hval = 0;
    5761           0 :                                 goto num_index;
    5762             :                         case IS_TRUE:
    5763           0 :                                 hval = 1;
    5764           0 :                                 goto num_index;
    5765             :                         case IS_REFERENCE:
    5766           0 :                                 offset = Z_REFVAL_P(offset);
    5767           0 :                                 goto add_again;
    5768             :                                 break;
    5769             :                         default:
    5770           1 :                                 zend_error(E_WARNING, "Illegal offset type");
    5771             :                                 zval_ptr_dtor(expr_ptr);
    5772             :                                 /* do nothing */
    5773             :                                 break;
    5774             :                 }
    5775         246 :                 zval_ptr_dtor_nogc(free_op2);
    5776             :         } else {
    5777             :                 zend_hash_next_index_insert(Z_ARRVAL_P(EX_VAR(opline->result.var)), expr_ptr);
    5778             :         }
    5779             :         CHECK_EXCEPTION();
    5780         246 :         ZEND_VM_NEXT_OPCODE();
    5781             : }
    5782             : 
    5783         134 : static int ZEND_FASTCALL  ZEND_INIT_ARRAY_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5784             : {
    5785             :         zval *array;
    5786             :         uint32_t size;
    5787         134 :         USE_OPLINE
    5788             : 
    5789         134 :         array = EX_VAR(opline->result.var);
    5790             :         if (IS_CONST != IS_UNUSED) {
    5791         134 :                 size = opline->extended_value >> ZEND_ARRAY_SIZE_SHIFT;
    5792             :         } else {
    5793             :                 size = 0;
    5794             :         }
    5795         134 :         ZVAL_NEW_ARR(array);
    5796         134 :         zend_hash_init(Z_ARRVAL_P(array), size, NULL, ZVAL_PTR_DTOR, 0);
    5797             : 
    5798             :         if (IS_CONST != IS_UNUSED) {
    5799             :                 /* Explicitly initialize array as not-packed if flag is set */
    5800         134 :                 if (opline->extended_value & ZEND_ARRAY_NOT_PACKED) {
    5801           8 :                         zend_hash_real_init(Z_ARRVAL_P(array), 0);
    5802             :                 }
    5803             :         }
    5804             : 
    5805         134 :         if (IS_CONST == IS_UNUSED) {
    5806             :                 ZEND_VM_NEXT_OPCODE();
    5807             : #if 0 || IS_CONST != IS_UNUSED
    5808             :         } else {
    5809         134 :                 return ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    5810             : #endif
    5811             :         }
    5812             : }
    5813             : 
    5814           0 : static int ZEND_FASTCALL  ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5815             : {
    5816           0 :         USE_OPLINE
    5817             :         zend_free_op free_op2;
    5818             :         zval *container;
    5819             :         int result;
    5820             :         zend_ulong hval;
    5821             :         zval *offset;
    5822             : 
    5823             :         SAVE_OPLINE();
    5824           0 :         container = opline->op1.zv;
    5825           0 :         offset = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2);
    5826             : 
    5827           0 :         if (IS_CONST != IS_UNUSED && EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
    5828           0 :                 HashTable *ht = Z_ARRVAL_P(container);
    5829             :                 zval *value;
    5830             :                 zend_string *str;
    5831             : 
    5832             : isset_again:
    5833           0 :                 if (EXPECTED(Z_TYPE_P(offset) == IS_STRING)) {
    5834           0 :                         str = Z_STR_P(offset);
    5835             :                         if (IS_TMP_VAR != IS_CONST) {
    5836           0 :                                 if (ZEND_HANDLE_NUMERIC(str, hval)) {
    5837           0 :                                         goto num_index_prop;
    5838             :                                 }
    5839             :                         }
    5840             : str_index_prop:
    5841           0 :                         value = zend_hash_find_ind(ht, str);
    5842           0 :                 } else if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
    5843           0 :                         hval = Z_LVAL_P(offset);
    5844             : num_index_prop:
    5845           0 :                         value = zend_hash_index_find(ht, hval);
    5846             :                 } else {
    5847           0 :                         switch (Z_TYPE_P(offset)) {
    5848             :                                 case IS_DOUBLE:
    5849           0 :                                         hval = zend_dval_to_lval(Z_DVAL_P(offset));
    5850           0 :                                         goto num_index_prop;
    5851             :                                 case IS_NULL:
    5852           0 :                                         str = STR_EMPTY_ALLOC();
    5853           0 :                                         goto str_index_prop;
    5854             :                                 case IS_FALSE:
    5855           0 :                                         hval = 0;
    5856           0 :                                         goto num_index_prop;
    5857             :                                 case IS_TRUE:
    5858           0 :                                         hval = 1;
    5859           0 :                                         goto num_index_prop;
    5860             :                                 case IS_RESOURCE:
    5861           0 :                                         hval = Z_RES_HANDLE_P(offset);
    5862           0 :                                         goto num_index_prop;
    5863             :                                 case IS_REFERENCE:
    5864           0 :                                         offset = Z_REFVAL_P(offset);
    5865           0 :                                         goto isset_again;
    5866             :                                 default:
    5867           0 :                                         zend_error(E_WARNING, "Illegal offset type in isset or empty");
    5868           0 :                                         value = NULL;
    5869             :                                         break;
    5870             :                         }
    5871             :                 }
    5872             : 
    5873           0 :                 if (opline->extended_value & ZEND_ISSET) {
    5874             :                         /* > IS_NULL means not IS_UNDEF and not IS_NULL */
    5875           0 :                         result = value != NULL && Z_TYPE_P(value) > IS_NULL &&
    5876           0 :                             (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
    5877             :                 } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
    5878           0 :                         result = (value == NULL || !i_zend_is_true(value TSRMLS_CC));
    5879             :                 }
    5880           0 :         } else if (IS_CONST == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
    5881           0 :                 if (EXPECTED(Z_OBJ_HT_P(container)->has_dimension)) {
    5882           0 :                         result = Z_OBJ_HT_P(container)->has_dimension(container, offset, (opline->extended_value & ZEND_ISSET) == 0 TSRMLS_CC);
    5883             :                 } else {
    5884           0 :                         zend_error(E_NOTICE, "Trying to check element of non-array");
    5885           0 :                         result = 0;
    5886             :                 }
    5887           0 :                 if ((opline->extended_value & ZEND_ISSET) == 0) {
    5888           0 :                         result = !result;
    5889             :                 }
    5890           0 :         } else if (EXPECTED(Z_TYPE_P(container) == IS_STRING)) { /* string offsets */
    5891             :                 zval tmp;
    5892             : 
    5893           0 :                 result = 0;
    5894           0 :                 if (UNEXPECTED(Z_TYPE_P(offset) != IS_LONG)) {
    5895           0 :                         if (IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) {
    5896             :                                 ZVAL_DEREF(offset);
    5897             :                         }
    5898           0 :                         if (Z_TYPE_P(offset) < IS_STRING /* simple scalar types */
    5899             :                                         || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */
    5900           0 :                                                 && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) {
    5901           0 :                                 ZVAL_DUP(&tmp, offset);
    5902           0 :                                 convert_to_long(&tmp);
    5903           0 :                                 offset = &tmp;
    5904             :                         }
    5905             :                 }
    5906           0 :                 if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
    5907           0 :                         if (offset->value.lval >= 0 && (size_t)offset->value.lval < Z_STRLEN_P(container)) {
    5908           0 :                                 if ((opline->extended_value & ZEND_ISSET) ||
    5909           0 :                                     Z_STRVAL_P(container)[offset->value.lval] != '0') {
    5910           0 :                                         result = 1;
    5911             :                                 }
    5912             :                         }
    5913             :                 }
    5914           0 :                 if ((opline->extended_value & ZEND_ISSET) == 0) {
    5915           0 :                         result = !result;
    5916             :                 }
    5917             :         } else {
    5918           0 :                 result = ((opline->extended_value & ZEND_ISSET) == 0);
    5919             :         }
    5920             : 
    5921           0 :         zval_ptr_dtor_nogc(free_op2);
    5922           0 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    5923             : 
    5924             :         CHECK_EXCEPTION();
    5925           0 :         ZEND_VM_NEXT_OPCODE();
    5926             : }
    5927             : 
    5928           0 : static int ZEND_FASTCALL  ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5929             : {
    5930           0 :         USE_OPLINE
    5931             :         zend_free_op free_op2;
    5932             :         zval *container;
    5933             :         int result;
    5934             :         zval *offset;
    5935             : 
    5936             :         SAVE_OPLINE();
    5937           0 :         container = opline->op1.zv;
    5938           0 :         offset = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2);
    5939             : 
    5940           0 :         if (IS_CONST == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
    5941           0 :                 if (EXPECTED(Z_OBJ_HT_P(container)->has_property)) {
    5942           0 :                         result = Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISSET) == 0, ((IS_TMP_VAR == IS_CONST) ? (EX(run_time_cache) + Z_CACHE_SLOT_P(offset)) : NULL) TSRMLS_CC);
    5943             :                 } else {
    5944           0 :                         zend_error(E_NOTICE, "Trying to check property of non-object");
    5945           0 :                         result = 0;
    5946             :                 }
    5947           0 :                 if ((opline->extended_value & ZEND_ISSET) == 0) {
    5948           0 :                         result = !result;
    5949             :                 }
    5950             :         } else {
    5951           0 :                 result = ((opline->extended_value & ZEND_ISSET) == 0);
    5952             :         }
    5953             : 
    5954           0 :         zval_ptr_dtor_nogc(free_op2);
    5955           0 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    5956             : 
    5957             :         CHECK_EXCEPTION();
    5958           0 :         ZEND_VM_NEXT_OPCODE();
    5959             : }
    5960             : 
    5961           0 : static int ZEND_FASTCALL  ZEND_YIELD_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5962             : {
    5963           0 :         USE_OPLINE
    5964             : 
    5965             :         /* The generator object is stored in EX(return_value) */
    5966           0 :         zend_generator *generator = (zend_generator *) EX(return_value);
    5967             : 
    5968           0 :         if (generator->flags & ZEND_GENERATOR_FORCED_CLOSE) {
    5969           0 :                 zend_error_noreturn(E_ERROR, "Cannot yield from finally in a force-closed generator");
    5970             :         }
    5971             : 
    5972             :         /* Destroy the previously yielded value */
    5973           0 :         zval_ptr_dtor(&generator->value);
    5974             : 
    5975             :         /* Destroy the previously yielded key */
    5976           0 :         zval_ptr_dtor(&generator->key);
    5977             : 
    5978             :         /* Set the new yielded value */
    5979             :         if (IS_CONST != IS_UNUSED) {
    5980             : 
    5981             : 
    5982           0 :                 if (EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE) {
    5983             :                         /* Constants and temporary variables aren't yieldable by reference,
    5984             :                          * but we still allow them with a notice. */
    5985             :                         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    5986             :                                 zval *value;
    5987             : 
    5988           0 :                                 zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    5989             : 
    5990           0 :                                 value = opline->op1.zv;
    5991           0 :                                 ZVAL_COPY_VALUE(&generator->value, value);
    5992           0 :                                 if (Z_OPT_REFCOUNTED(generator->value)) Z_SET_REFCOUNT(generator->value, 1);
    5993             : 
    5994             :                                 /* Temporary variables don't need ctor copying */
    5995             :                                 if (IS_CONST != IS_TMP_VAR) {
    5996           0 :                                         zval_opt_copy_ctor(&generator->value);
    5997             :                                 }
    5998             :                         } else {
    5999             :                                 zval *value_ptr = NULL;
    6000             : 
    6001             :                                 if (IS_CONST == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
    6002             :                                         zend_error_noreturn(E_ERROR, "Cannot yield string offsets by reference");
    6003             :                                 }
    6004             : 
    6005             :                                 /* If a function call result is yielded and the function did
    6006             :                                  * not return by reference we throw a notice. */
    6007             :                                 if (IS_CONST == IS_VAR &&
    6008             :                                     (value_ptr == &EG(uninitialized_zval) ||
    6009             :                                      (opline->extended_value == ZEND_RETURNS_FUNCTION &&
    6010             :                                       !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
    6011             :                                         zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    6012             :                                 } else {
    6013             :                                         ZVAL_MAKE_REF(value_ptr);
    6014             :                                 }
    6015             :                                 ZVAL_COPY(&generator->value, value_ptr);
    6016             : 
    6017             :                         }
    6018             :                 } else {
    6019           0 :                         zval *value = opline->op1.zv;
    6020             : 
    6021             :                         /* Consts, temporary variables and references need copying */
    6022             :                         if (IS_CONST == IS_CONST) {
    6023           0 :                                 ZVAL_DUP(&generator->value, value);
    6024             :                         } else if (IS_CONST == IS_TMP_VAR) {
    6025             :                                 ZVAL_COPY_VALUE(&generator->value, value);
    6026             :             } else if ((IS_CONST == IS_CV || IS_CONST == IS_VAR) && Z_ISREF_P(value)) {
    6027             :                                 ZVAL_DUP(&generator->value, Z_REFVAL_P(value));
    6028             : 
    6029             :                         } else {
    6030             :                                 ZVAL_COPY_VALUE(&generator->value, value);
    6031             :                                 if (IS_CONST == IS_CV) {
    6032             :                                         if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
    6033             :                                 }
    6034             :                         }
    6035             :                 }
    6036             :         } else {
    6037             :                 /* If no value was specified yield null */
    6038             :                 ZVAL_NULL(&generator->value);
    6039             :         }
    6040             : 
    6041             :         /* Set the new yielded key */
    6042             :         if (IS_TMP_VAR != IS_UNUSED) {
    6043             :                 zend_free_op free_op2;
    6044           0 :                 zval *key = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2);
    6045             : 
    6046             :                 /* Consts, temporary variables and references need copying */
    6047           0 :                 if (IS_TMP_VAR == IS_CONST) {
    6048             :                         ZVAL_DUP(&generator->key, key);
    6049             :                 } else if (IS_TMP_VAR == IS_TMP_VAR) {
    6050           0 :                         ZVAL_COPY_VALUE(&generator->key, key);
    6051             :                 } else if ((IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) && Z_ISREF_P(key)) {
    6052             :                         ZVAL_DUP(&generator->key, Z_REFVAL_P(key));
    6053             : 
    6054             :                 } else {
    6055             :                         ZVAL_COPY_VALUE(&generator->key, key);
    6056             :                         if (IS_TMP_VAR == IS_CV) {
    6057             :                                 if (Z_OPT_REFCOUNTED_P(key)) Z_ADDREF_P(key);
    6058             :                         }
    6059             :                 }
    6060             : 
    6061           0 :                 if (Z_TYPE(generator->key) == IS_LONG
    6062           0 :                     && Z_LVAL(generator->key) > generator->largest_used_integer_key
    6063             :                 ) {
    6064           0 :                         generator->largest_used_integer_key = Z_LVAL(generator->key);
    6065             :                 }
    6066             :         } else {
    6067             :                 /* If no key was specified we use auto-increment keys */
    6068             :                 generator->largest_used_integer_key++;
    6069             :                 ZVAL_LONG(&generator->key, generator->largest_used_integer_key);
    6070             :         }
    6071             : 
    6072           0 :         if (RETURN_VALUE_USED(opline)) {
    6073             :                 /* If the return value of yield is used set the send
    6074             :                  * target and initialize it to NULL */
    6075           0 :                 generator->send_target = EX_VAR(opline->result.var);
    6076           0 :                 ZVAL_NULL(generator->send_target);
    6077             :         } else {
    6078           0 :                 generator->send_target = NULL;
    6079             :         }
    6080             : 
    6081             :         /* We increment to the next op, so we are at the correct position when the
    6082             :          * generator is resumed. */
    6083           0 :         ZEND_VM_INC_OPCODE();
    6084             : 
    6085             :         /* The GOTO VM uses a local opline variable. We need to set the opline
    6086             :          * variable in execute_data so we don't resume at an old position. */
    6087             :         SAVE_OPLINE();
    6088             : 
    6089           0 :         ZEND_VM_RETURN();
    6090             : }
    6091             : 
    6092           0 : static int ZEND_FASTCALL  ZEND_POW_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6093             : {
    6094           0 :         USE_OPLINE
    6095             :         zend_free_op free_op2;
    6096             : 
    6097             :         SAVE_OPLINE();
    6098           0 :         pow_function(EX_VAR(opline->result.var),
    6099             :                 opline->op1.zv,
    6100             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2) TSRMLS_CC);
    6101             : 
    6102           0 :         zval_ptr_dtor_nogc(free_op2);
    6103             :         CHECK_EXCEPTION();
    6104           0 :         ZEND_VM_NEXT_OPCODE();
    6105             : }
    6106             : 
    6107           2 : static int ZEND_FASTCALL  ZEND_ADD_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6108             : {
    6109           2 :         USE_OPLINE
    6110             :         zend_free_op free_op2;
    6111             : 
    6112             :         SAVE_OPLINE();
    6113           4 :         fast_add_function(EX_VAR(opline->result.var),
    6114             :                 opline->op1.zv,
    6115             :                 _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2) TSRMLS_CC);
    6116             : 
    6117           2 :         zval_ptr_dtor_nogc(free_op2);
    6118             :         CHECK_EXCEPTION();
    6119           2 :         ZEND_VM_NEXT_OPCODE();
    6120             : }
    6121             : 
    6122          87 : static int ZEND_FASTCALL  ZEND_SUB_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6123             : {
    6124          87 :         USE_OPLINE
    6125             :         zend_free_op free_op2;
    6126             : 
    6127             :         SAVE_OPLINE();
    6128         174 :         fast_sub_function(EX_VAR(opline->result.var),
    6129             :                 opline->op1.zv,
    6130             :                 _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2) TSRMLS_CC);
    6131             : 
    6132          87 :         zval_ptr_dtor_nogc(free_op2);
    6133             :         CHECK_EXCEPTION();
    6134          87 :         ZEND_VM_NEXT_OPCODE();
    6135             : }
    6136             : 
    6137         621 : static int ZEND_FASTCALL  ZEND_MUL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6138             : {
    6139         621 :         USE_OPLINE
    6140             :         zend_free_op free_op2;
    6141             : 
    6142             :         SAVE_OPLINE();
    6143        1242 :         fast_mul_function(EX_VAR(opline->result.var),
    6144             :                 opline->op1.zv,
    6145             :                 _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2) TSRMLS_CC);
    6146             : 
    6147         621 :         zval_ptr_dtor_nogc(free_op2);
    6148             :         CHECK_EXCEPTION();
    6149         621 :         ZEND_VM_NEXT_OPCODE();
    6150             : }
    6151             : 
    6152           0 : static int ZEND_FASTCALL  ZEND_DIV_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6153             : {
    6154           0 :         USE_OPLINE
    6155             :         zend_free_op free_op2;
    6156             : 
    6157             :         SAVE_OPLINE();
    6158           0 :         fast_div_function(EX_VAR(opline->result.var),
    6159             :                 opline->op1.zv,
    6160             :                 _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2) TSRMLS_CC);
    6161             : 
    6162           0 :         zval_ptr_dtor_nogc(free_op2);
    6163             :         CHECK_EXCEPTION();
    6164           0 :         ZEND_VM_NEXT_OPCODE();
    6165             : }
    6166             : 
    6167           0 : static int ZEND_FASTCALL  ZEND_MOD_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6168             : {
    6169           0 :         USE_OPLINE
    6170             :         zend_free_op free_op2;
    6171             : 
    6172             :         SAVE_OPLINE();
    6173           0 :         fast_mod_function(EX_VAR(opline->result.var),
    6174             :                 opline->op1.zv,
    6175             :                 _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2) TSRMLS_CC);
    6176             : 
    6177           0 :         zval_ptr_dtor_nogc(free_op2);
    6178             :         CHECK_EXCEPTION();
    6179           0 :         ZEND_VM_NEXT_OPCODE();
    6180             : }
    6181             : 
    6182           0 : static int ZEND_FASTCALL  ZEND_SL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6183             : {
    6184           0 :         USE_OPLINE
    6185             :         zend_free_op free_op2;
    6186             : 
    6187             :         SAVE_OPLINE();
    6188           0 :         shift_left_function(EX_VAR(opline->result.var),
    6189             :                 opline->op1.zv,
    6190             :                 _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2) TSRMLS_CC);
    6191             : 
    6192           0 :         zval_ptr_dtor_nogc(free_op2);
    6193             :         CHECK_EXCEPTION();
    6194           0 :         ZEND_VM_NEXT_OPCODE();
    6195             : }
    6196             : 
    6197           0 : static int ZEND_FASTCALL  ZEND_SR_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6198             : {
    6199           0 :         USE_OPLINE
    6200             :         zend_free_op free_op2;
    6201             : 
    6202             :         SAVE_OPLINE();
    6203           0 :         shift_right_function(EX_VAR(opline->result.var),
    6204             :                 opline->op1.zv,
    6205             :                 _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2) TSRMLS_CC);
    6206             : 
    6207           0 :         zval_ptr_dtor_nogc(free_op2);
    6208             :         CHECK_EXCEPTION();
    6209           0 :         ZEND_VM_NEXT_OPCODE();
    6210             : }
    6211             : 
    6212       47635 : static int ZEND_FASTCALL  ZEND_CONCAT_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6213             : {
    6214       47635 :         USE_OPLINE
    6215             :         zend_free_op free_op2;
    6216             : 
    6217             :         SAVE_OPLINE();
    6218       95270 :         concat_function(EX_VAR(opline->result.var),
    6219             :                 opline->op1.zv,
    6220             :                 _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2) TSRMLS_CC);
    6221             : 
    6222       47635 :         zval_ptr_dtor_nogc(free_op2);
    6223             :         CHECK_EXCEPTION();
    6224       47635 :         ZEND_VM_NEXT_OPCODE();
    6225             : }
    6226             : 
    6227        1149 : static int ZEND_FASTCALL  ZEND_IS_IDENTICAL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6228             : {
    6229        1149 :         USE_OPLINE
    6230             :         zend_free_op free_op2;
    6231             : 
    6232             :         SAVE_OPLINE();
    6233        2298 :         fast_is_identical_function(EX_VAR(opline->result.var),
    6234             :                 opline->op1.zv,
    6235             :                 _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2) TSRMLS_CC);
    6236             : 
    6237        1149 :         zval_ptr_dtor_nogc(free_op2);
    6238             :         CHECK_EXCEPTION();
    6239        1149 :         ZEND_VM_NEXT_OPCODE();
    6240             : }
    6241             : 
    6242        7164 : static int ZEND_FASTCALL  ZEND_IS_NOT_IDENTICAL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6243             : {
    6244        7164 :         USE_OPLINE
    6245             :         zend_free_op free_op2;
    6246        7164 :         zval *result = EX_VAR(opline->result.var);
    6247             : 
    6248             :         SAVE_OPLINE();
    6249       14328 :         fast_is_not_identical_function(result,
    6250             :                 opline->op1.zv,
    6251             :                 _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2) TSRMLS_CC);
    6252             : 
    6253        7164 :         zval_ptr_dtor_nogc(free_op2);
    6254             :         CHECK_EXCEPTION();
    6255        7164 :         ZEND_VM_NEXT_OPCODE();
    6256             : }
    6257             : 
    6258        2028 : static int ZEND_FASTCALL  ZEND_IS_EQUAL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6259             : {
    6260        2028 :         USE_OPLINE
    6261             :         zend_free_op free_op2;
    6262        2028 :         zval *result = EX_VAR(opline->result.var);
    6263             : 
    6264             :         SAVE_OPLINE();
    6265        4056 :         fast_equal_function(result,
    6266             :                 opline->op1.zv,
    6267             :                 _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2) TSRMLS_CC);
    6268             : 
    6269        2028 :         zval_ptr_dtor_nogc(free_op2);
    6270             :         CHECK_EXCEPTION();
    6271        2028 :         ZEND_VM_NEXT_OPCODE();
    6272             : }
    6273             : 
    6274         106 : static int ZEND_FASTCALL  ZEND_IS_NOT_EQUAL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6275             : {
    6276         106 :         USE_OPLINE
    6277             :         zend_free_op free_op2;
    6278         106 :         zval *result = EX_VAR(opline->result.var);
    6279             : 
    6280             :         SAVE_OPLINE();
    6281         212 :         fast_not_equal_function(result,
    6282             :                 opline->op1.zv,
    6283             :                 _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2) TSRMLS_CC);
    6284             : 
    6285         106 :         zval_ptr_dtor_nogc(free_op2);
    6286             :         CHECK_EXCEPTION();
    6287         106 :         ZEND_VM_NEXT_OPCODE();
    6288             : }
    6289             : 
    6290      245371 : static int ZEND_FASTCALL  ZEND_IS_SMALLER_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6291             : {
    6292      245371 :         USE_OPLINE
    6293             :         zend_free_op free_op2;
    6294      245371 :         zval *result = EX_VAR(opline->result.var);
    6295             : 
    6296             :         SAVE_OPLINE();
    6297      490742 :         fast_is_smaller_function(result,
    6298             :                 opline->op1.zv,
    6299             :                 _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2) TSRMLS_CC);
    6300             : 
    6301      245371 :         zval_ptr_dtor_nogc(free_op2);
    6302             :         CHECK_EXCEPTION();
    6303      245371 :         ZEND_VM_NEXT_OPCODE();
    6304             : }
    6305             : 
    6306          80 : static int ZEND_FASTCALL  ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6307             : {
    6308          80 :         USE_OPLINE
    6309             :         zend_free_op free_op2;
    6310          80 :         zval *result = EX_VAR(opline->result.var);
    6311             : 
    6312             :         SAVE_OPLINE();
    6313         160 :         fast_is_smaller_or_equal_function(result,
    6314             :                 opline->op1.zv,
    6315             :                 _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2) TSRMLS_CC);
    6316             : 
    6317          80 :         zval_ptr_dtor_nogc(free_op2);
    6318             :         CHECK_EXCEPTION();
    6319          80 :         ZEND_VM_NEXT_OPCODE();
    6320             : }
    6321             : 
    6322           0 : static int ZEND_FASTCALL  ZEND_BW_OR_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6323             : {
    6324           0 :         USE_OPLINE
    6325             :         zend_free_op free_op2;
    6326             : 
    6327             :         SAVE_OPLINE();
    6328           0 :         bitwise_or_function(EX_VAR(opline->result.var),
    6329             :                 opline->op1.zv,
    6330             :                 _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2) TSRMLS_CC);
    6331             : 
    6332           0 :         zval_ptr_dtor_nogc(free_op2);
    6333             :         CHECK_EXCEPTION();
    6334           0 :         ZEND_VM_NEXT_OPCODE();
    6335             : }
    6336             : 
    6337           1 : static int ZEND_FASTCALL  ZEND_BW_AND_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6338             : {
    6339           1 :         USE_OPLINE
    6340             :         zend_free_op free_op2;
    6341             : 
    6342             :         SAVE_OPLINE();
    6343           2 :         bitwise_and_function(EX_VAR(opline->result.var),
    6344             :                 opline->op1.zv,
    6345             :                 _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2) TSRMLS_CC);
    6346             : 
    6347           1 :         zval_ptr_dtor_nogc(free_op2);
    6348             :         CHECK_EXCEPTION();
    6349           1 :         ZEND_VM_NEXT_OPCODE();
    6350             : }
    6351             : 
    6352           0 : static int ZEND_FASTCALL  ZEND_BW_XOR_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6353             : {
    6354           0 :         USE_OPLINE
    6355             :         zend_free_op free_op2;
    6356             : 
    6357             :         SAVE_OPLINE();
    6358           0 :         bitwise_xor_function(EX_VAR(opline->result.var),
    6359             :                 opline->op1.zv,
    6360             :                 _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2) TSRMLS_CC);
    6361             : 
    6362           0 :         zval_ptr_dtor_nogc(free_op2);
    6363             :         CHECK_EXCEPTION();
    6364           0 :         ZEND_VM_NEXT_OPCODE();
    6365             : }
    6366             : 
    6367           0 : static int ZEND_FASTCALL  ZEND_BOOL_XOR_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6368             : {
    6369           0 :         USE_OPLINE
    6370             :         zend_free_op free_op2;
    6371             : 
    6372             :         SAVE_OPLINE();
    6373           0 :         boolean_xor_function(EX_VAR(opline->result.var),
    6374             :                 opline->op1.zv,
    6375             :                 _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2) TSRMLS_CC);
    6376             : 
    6377           0 :         zval_ptr_dtor_nogc(free_op2);
    6378             :         CHECK_EXCEPTION();
    6379           0 :         ZEND_VM_NEXT_OPCODE();
    6380             : }
    6381             : 
    6382         741 : static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CONST_VAR(int type, ZEND_OPCODE_HANDLER_ARGS)
    6383             : {
    6384         741 :         USE_OPLINE
    6385             : 
    6386             :         zval *varname;
    6387             :         zval *retval;
    6388             :         zend_string *name;
    6389             :         HashTable *target_symbol_table;
    6390             : 
    6391             :         SAVE_OPLINE();
    6392         741 :         varname = opline->op1.zv;
    6393             : 
    6394             :         if (IS_CONST == IS_CONST) {
    6395         741 :                 name = Z_STR_P(varname);
    6396             :         } else if (EXPECTED(Z_TYPE_P(varname) == IS_STRING)) {
    6397             :                 name = Z_STR_P(varname);
    6398             :                 zend_string_addref(name);
    6399             :         } else {
    6400             :                 name = zval_get_string(varname);
    6401             :         }
    6402             : 
    6403             :         if (IS_VAR != IS_UNUSED) {
    6404             :                 zend_class_entry *ce;
    6405             : 
    6406         741 :                 if (IS_VAR == IS_CONST) {
    6407             :                         if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv))) {
    6408             :                                 ce = CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv));
    6409             :                         } else {
    6410             :                                 ce = zend_fetch_class_by_name(Z_STR_P(opline->op2.zv), opline->op2.zv + 1, 0 TSRMLS_CC);
    6411             :                                 if (UNEXPECTED(ce == NULL)) {
    6412             :                                         if (IS_CONST != IS_CONST) {
    6413             :                                                 zend_string_release(name);
    6414             :                                         }
    6415             : 
    6416             :                                         CHECK_EXCEPTION();
    6417             :                                         ZEND_VM_NEXT_OPCODE();
    6418             :                                 }
    6419             :                                 CACHE_PTR(Z_CACHE_SLOT_P(opline->op2.zv), ce);
    6420             :                         }
    6421             :                 } else {
    6422         741 :                         ce = Z_CE_P(EX_VAR(opline->op2.var));
    6423             :                 }
    6424         741 :                 retval = zend_std_get_static_property(ce, name, 0, ((IS_CONST == IS_CONST) ? (EX(run_time_cache) + Z_CACHE_SLOT_P(varname)) : NULL) TSRMLS_CC);
    6425             : 
    6426             :         } else {
    6427             :                 target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
    6428             :                 retval = zend_hash_find(target_symbol_table, name);
    6429             :                 if (retval == NULL) {
    6430             :                         switch (type) {
    6431             :                                 case BP_VAR_R:
    6432             :                                 case BP_VAR_UNSET:
    6433             :                                         zend_error(E_NOTICE,"Undefined variable: %s", name->val);
    6434             :                                         /* break missing intentionally */
    6435             :                                 case BP_VAR_IS:
    6436             :                                         retval = &EG(uninitialized_zval);
    6437             :                                         break;
    6438             :                                 case BP_VAR_RW:
    6439             :                                         zend_error(E_NOTICE,"Undefined variable: %s", name->val);
    6440             :                                         /* break missing intentionally */
    6441             :                                 case BP_VAR_W:
    6442             :                                         retval = zend_hash_add_new(target_symbol_table, name, &EG(uninitialized_zval));
    6443             :                                         break;
    6444             :                                 EMPTY_SWITCH_DEFAULT_CASE()
    6445             :                         }
    6446             :                 /* GLOBAL or $$name variable may be an INDIRECT pointer to CV */
    6447             :                 } else if (Z_TYPE_P(retval) == IS_INDIRECT) {
    6448             :                         retval = Z_INDIRECT_P(retval);
    6449             :                         if (Z_TYPE_P(retval) == IS_UNDEF) {
    6450             :                                 switch (type) {
    6451             :                                         case BP_VAR_R:
    6452             :                                         case BP_VAR_UNSET:
    6453             :                                                 zend_error(E_NOTICE,"Undefined variable: %s", name->val);
    6454             :                                                 /* break missing intentionally */
    6455             :                                         case BP_VAR_IS:
    6456             :                                                 retval = &EG(uninitialized_zval);
    6457             :                                                 break;
    6458             :                                         case BP_VAR_RW:
    6459             :                                                 zend_error(E_NOTICE,"Undefined variable: %s", name->val);
    6460             :                                                 /* break missing intentionally */
    6461             :                                         case BP_VAR_W:
    6462             :                                                 ZVAL_NULL(retval);
    6463             :                                                 break;
    6464             :                                         EMPTY_SWITCH_DEFAULT_CASE()
    6465             :                                 }
    6466             :                         }
    6467             :                 }
    6468             :                 if ((opline->extended_value & ZEND_FETCH_TYPE_MASK) == ZEND_FETCH_STATIC) {
    6469             :                         if (Z_CONSTANT_P(retval)) {
    6470             :                                 zval_update_constant(retval, 1 TSRMLS_CC);
    6471             :                         }
    6472             :                 } else if ((opline->extended_value & ZEND_FETCH_TYPE_MASK) != ZEND_FETCH_GLOBAL_LOCK) {
    6473             : 
    6474             :                 }
    6475             :         }
    6476             : 
    6477         736 :         if (IS_CONST != IS_CONST) {
    6478             :                 zend_string_release(name);
    6479             :         }
    6480             : 
    6481             :         ZEND_ASSERT(retval != NULL);
    6482        1282 :         if (type == BP_VAR_R || type == BP_VAR_IS) {
    6483         595 :                 if (/*type == BP_VAR_R &&*/ Z_ISREF_P(retval) && Z_REFCOUNT_P(retval) == 1) {
    6484           2 :                         ZVAL_UNREF(retval);
    6485             :                 }
    6486         546 :                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    6487             :         } else {
    6488         190 :                 ZVAL_INDIRECT(EX_VAR(opline->result.var), retval);
    6489             :         }
    6490             :         CHECK_EXCEPTION();
    6491         736 :         ZEND_VM_NEXT_OPCODE();
    6492             : }
    6493             : 
    6494         528 : static int ZEND_FASTCALL  ZEND_FETCH_R_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6495             : {
    6496         528 :         return zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    6497             : }
    6498             : 
    6499         136 : static int ZEND_FASTCALL  ZEND_FETCH_W_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6500             : {
    6501         136 :         return zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_W, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    6502             : }
    6503             : 
    6504          51 : static int ZEND_FASTCALL  ZEND_FETCH_RW_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6505             : {
    6506          51 :         return zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_RW, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    6507             : }
    6508             : 
    6509           7 : static int ZEND_FASTCALL  ZEND_FETCH_FUNC_ARG_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6510             : {
    6511           7 :         USE_OPLINE
    6512             : 
    6513          14 :         if (zend_is_by_ref_func_arg_fetch(opline, EX(call) TSRMLS_CC)) {
    6514           0 :                 return zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_W, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    6515             :         } else {
    6516           7 :                 return zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    6517             :         }
    6518             : }
    6519             : 
    6520           6 : static int ZEND_FASTCALL  ZEND_FETCH_UNSET_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6521             : {
    6522           6 :         return zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_UNSET, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    6523             : }
    6524             : 
    6525          13 : static int ZEND_FASTCALL  ZEND_FETCH_IS_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6526             : {
    6527          13 :         return zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    6528             : }
    6529             : 
    6530           0 : static int ZEND_FASTCALL  ZEND_FETCH_DIM_R_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6531             : {
    6532           0 :         USE_OPLINE
    6533             :         zend_free_op free_op2;
    6534             :         zval *container;
    6535             : 
    6536             :         SAVE_OPLINE();
    6537           0 :         container = opline->op1.zv;
    6538           0 :         zend_fetch_dimension_address_read_R(EX_VAR(opline->result.var), container, _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2), IS_VAR TSRMLS_CC);
    6539           0 :         zval_ptr_dtor_nogc(free_op2);
    6540             : 
    6541             :         CHECK_EXCEPTION();
    6542           0 :         ZEND_VM_NEXT_OPCODE();
    6543             : }
    6544             : 
    6545           0 : static int ZEND_FASTCALL  ZEND_FETCH_DIM_IS_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6546             : {
    6547           0 :         USE_OPLINE
    6548             :         zend_free_op free_op2;
    6549             :         zval *container;
    6550             : 
    6551             :         SAVE_OPLINE();
    6552           0 :         container = opline->op1.zv;
    6553           0 :         zend_fetch_dimension_address_read_IS(EX_VAR(opline->result.var), container, _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2), IS_VAR TSRMLS_CC);
    6554           0 :         zval_ptr_dtor_nogc(free_op2);
    6555             : 
    6556             :         CHECK_EXCEPTION();
    6557           0 :         ZEND_VM_NEXT_OPCODE();
    6558             : }
    6559             : 
    6560           0 : static int ZEND_FASTCALL  ZEND_FETCH_DIM_FUNC_ARG_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6561             : {
    6562           0 :         USE_OPLINE
    6563             :         zval *container;
    6564             :         zend_free_op free_op1, free_op2;
    6565             : 
    6566             :         SAVE_OPLINE();
    6567             : 
    6568           0 :         if (zend_is_by_ref_func_arg_fetch(opline, EX(call) TSRMLS_CC)) {
    6569             :         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    6570           0 :             zend_error_noreturn(E_ERROR, "Cannot use temporary expression in write context");
    6571             :         }
    6572             :                 container = NULL;
    6573             :                 if (IS_CONST == IS_VAR && UNEXPECTED(container == NULL)) {
    6574             :                         zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
    6575             :                 }
    6576             :                 ZVAL_DEREF(container);
    6577             :                 zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2), IS_VAR TSRMLS_CC);
    6578             :                 if (IS_CONST == IS_VAR && READY_TO_DESTROY(free_op1)) {
    6579             :                         EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
    6580             :                 }
    6581             :                 zval_ptr_dtor_nogc(free_op2);
    6582             : 
    6583             :         } else {
    6584           0 :                 if (IS_VAR == IS_UNUSED) {
    6585             :                         zend_error_noreturn(E_ERROR, "Cannot use [] for reading");
    6586             :                 }
    6587           0 :                 container = opline->op1.zv;
    6588           0 :                 zend_fetch_dimension_address_read_R(EX_VAR(opline->result.var), container, _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2), IS_VAR TSRMLS_CC);
    6589           0 :                 zval_ptr_dtor_nogc(free_op2);
    6590             : 
    6591             :         }
    6592             :         CHECK_EXCEPTION();
    6593           0 :         ZEND_VM_NEXT_OPCODE();
    6594             : }
    6595             : 
    6596           0 : static int ZEND_FASTCALL  ZEND_FETCH_OBJ_R_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6597             : {
    6598           0 :         USE_OPLINE
    6599             : 
    6600             :         zval *container;
    6601             :         zend_free_op free_op2;
    6602             :         zval *offset;
    6603             : 
    6604             :         SAVE_OPLINE();
    6605           0 :         container = opline->op1.zv;
    6606           0 :         offset  = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
    6607             : 
    6608           0 :         if ((IS_CONST != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT)) ||
    6609           0 :             UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
    6610           0 :                 zend_error(E_NOTICE, "Trying to get property of non-object");
    6611           0 :                 ZVAL_NULL(EX_VAR(opline->result.var));
    6612             :         } else {
    6613             :                 zval *retval;
    6614             : 
    6615             :                 /* here we are sure we are dealing with an object */
    6616             :                 do {
    6617           0 :                         if (IS_VAR == IS_CONST &&
    6618             :                                 EXPECTED(Z_OBJCE_P(container) == CACHED_PTR(Z_CACHE_SLOT_P(offset)))) {
    6619             :                                 zend_property_info *prop_info = CACHED_PTR(Z_CACHE_SLOT_P(offset) + 1);
    6620             :                                 zend_object *zobj = Z_OBJ_P(container);
    6621             : 
    6622             :                                 if (EXPECTED(prop_info)) {
    6623             :                                         retval = OBJ_PROP(zobj, prop_info->offset);
    6624             :                                         if (EXPECTED(Z_TYPE_P(retval) != IS_UNDEF)) {
    6625             :                                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    6626             :                                                 break;
    6627             :                                         }
    6628             :                                 } else if (EXPECTED(zobj->properties != NULL)) {
    6629             :                                         retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
    6630             :                                         if (EXPECTED(retval)) {
    6631             :                                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    6632             :                                                 break;
    6633             :                                         }
    6634             :                                 }
    6635             :                         }
    6636             : 
    6637           0 :                         retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_R, ((IS_VAR == IS_CONST) ? (EX(run_time_cache) + Z_CACHE_SLOT_P(offset)) : NULL), EX_VAR(opline->result.var) TSRMLS_CC);
    6638             : 
    6639           0 :                         if (retval != EX_VAR(opline->result.var)) {
    6640           0 :                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    6641             :                         }
    6642             :                 } while (0);
    6643             :         }
    6644             : 
    6645           0 :         zval_ptr_dtor_nogc(free_op2);
    6646             : 
    6647             :         CHECK_EXCEPTION();
    6648           0 :         ZEND_VM_NEXT_OPCODE();
    6649             : }
    6650             : 
    6651           0 : static int ZEND_FASTCALL  ZEND_FETCH_OBJ_IS_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6652             : {
    6653           0 :         USE_OPLINE
    6654             : 
    6655             :         zval *container;
    6656             :         zend_free_op free_op2;
    6657             :         zval *offset;
    6658             : 
    6659             :         SAVE_OPLINE();
    6660           0 :         container = opline->op1.zv;
    6661           0 :         offset  = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
    6662             : 
    6663           0 :         if ((IS_CONST != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT)) ||
    6664           0 :             UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
    6665           0 :                 ZVAL_NULL(EX_VAR(opline->result.var));
    6666             :         } else {
    6667             :                 zval *retval;
    6668             : 
    6669             :                 /* here we are sure we are dealing with an object */
    6670             :                 do {
    6671           0 :                         if (IS_VAR == IS_CONST &&
    6672             :                                 EXPECTED(Z_OBJCE_P(container) == CACHED_PTR(Z_CACHE_SLOT_P(offset)))) {
    6673             :                                 zend_property_info *prop_info = CACHED_PTR(Z_CACHE_SLOT_P(offset) + 1);
    6674             :                                 zend_object *zobj = Z_OBJ_P(container);
    6675             : 
    6676             :                                 if (EXPECTED(prop_info)) {
    6677             :                                         retval = OBJ_PROP(zobj, prop_info->offset);
    6678             :                                         if (EXPECTED(Z_TYPE_P(retval) != IS_UNDEF)) {
    6679             :                                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    6680             :                                                 break;
    6681             :                                         }
    6682             :                                 } else if (EXPECTED(zobj->properties != NULL)) {
    6683             :                                         retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
    6684             :                                         if (EXPECTED(retval)) {
    6685             :                                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    6686             :                                                 break;
    6687             :                                         }
    6688             :                                 }
    6689             :                         }
    6690             : 
    6691           0 :                         retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_IS, ((IS_VAR == IS_CONST) ? (EX(run_time_cache) + Z_CACHE_SLOT_P(offset)) : NULL), EX_VAR(opline->result.var) TSRMLS_CC);
    6692             : 
    6693           0 :                         if (retval != EX_VAR(opline->result.var)) {
    6694           0 :                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    6695             :                         }
    6696             :                 } while (0);
    6697             :         }
    6698             : 
    6699           0 :         zval_ptr_dtor_nogc(free_op2);
    6700             : 
    6701             :         CHECK_EXCEPTION();
    6702           0 :         ZEND_VM_NEXT_OPCODE();
    6703             : }
    6704             : 
    6705           0 : static int ZEND_FASTCALL  ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6706             : {
    6707           0 :         USE_OPLINE
    6708             :         zval *container;
    6709             : 
    6710           0 :         if (zend_is_by_ref_func_arg_fetch(opline, EX(call) TSRMLS_CC)) {
    6711             :                 /* Behave like FETCH_OBJ_W */
    6712             :                 zend_free_op free_op1, free_op2;
    6713             :                 zval *property;
    6714             : 
    6715             :                 SAVE_OPLINE();
    6716           0 :                 property = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
    6717           0 :                 container = NULL;
    6718             : 
    6719             :         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    6720           0 :             zend_error_noreturn(E_ERROR, "Cannot use temporary expression in write context");
    6721             :         }
    6722             :                 if (IS_CONST == IS_VAR && UNEXPECTED(container == NULL)) {
    6723             :                         zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
    6724             :                 }
    6725             :                 zend_fetch_property_address(EX_VAR(opline->result.var), container, IS_CONST, property, IS_VAR, ((IS_VAR == IS_CONST) ? (EX(run_time_cache) + Z_CACHE_SLOT_P(property)) : NULL), BP_VAR_W TSRMLS_CC);
    6726             :                 zval_ptr_dtor_nogc(free_op2);
    6727             :                 if (IS_CONST == IS_VAR && READY_TO_DESTROY(free_op1)) {
    6728             :                         EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
    6729             :                 }
    6730             : 
    6731             :                 CHECK_EXCEPTION();
    6732             :                 ZEND_VM_NEXT_OPCODE();
    6733             :         } else {
    6734           0 :                 return ZEND_FETCH_OBJ_R_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    6735             :         }
    6736             : }
    6737             : 
    6738           2 : static int ZEND_FASTCALL  ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6739             : {
    6740           2 :         USE_OPLINE
    6741             :         zval *function_name;
    6742             :         zend_class_entry *ce;
    6743             :         zend_object *object;
    6744             :         zend_function *fbc;
    6745             : 
    6746             :         SAVE_OPLINE();
    6747             : 
    6748             :         if (IS_CONST == IS_CONST) {
    6749             :                 /* no function found. try a static method in class */
    6750           2 :                 if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op1.zv))) {
    6751           0 :                         ce = CACHED_PTR(Z_CACHE_SLOT_P(opline->op1.zv));
    6752             :                 } else {
    6753           2 :                         ce = zend_fetch_class_by_name(Z_STR_P(opline->op1.zv), opline->op1.zv + 1, ZEND_FETCH_CLASS_DEFAULT TSRMLS_CC);
    6754           2 :                         if (UNEXPECTED(EG(exception) != NULL)) {
    6755           0 :                                 HANDLE_EXCEPTION();
    6756             :                         }
    6757           2 :                         if (UNEXPECTED(ce == NULL)) {
    6758           0 :                                 zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op1.zv));
    6759             :                         }
    6760           2 :                         CACHE_PTR(Z_CACHE_SLOT_P(opline->op1.zv), ce);
    6761             :                 }
    6762             :         } else {
    6763             :                 ce = Z_CE_P(EX_VAR(opline->op1.var));
    6764             :         }
    6765             : 
    6766           2 :         if (IS_CONST == IS_CONST &&
    6767             :             IS_VAR == IS_CONST &&
    6768             :             CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv))) {
    6769             :                 fbc = CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv));
    6770           2 :         } else if (IS_CONST != IS_CONST &&
    6771             :                    IS_VAR == IS_CONST &&
    6772             :                    (fbc = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(opline->op2.zv), ce))) {
    6773             :                 /* do nothing */
    6774             :         } else if (IS_VAR != IS_UNUSED) {
    6775             :                 zend_free_op free_op2;
    6776             : 
    6777           4 :                 function_name = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
    6778             :                 if (IS_VAR != IS_CONST) {
    6779           2 :                         if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
    6780           0 :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    6781           0 :                                         HANDLE_EXCEPTION();
    6782             :                                 }
    6783           0 :                                 zend_error_noreturn(E_ERROR, "Function name must be a string");
    6784             :                         }
    6785             :                 }
    6786             : 
    6787           2 :                 if (ce->get_static_method) {
    6788           0 :                         fbc = ce->get_static_method(ce, Z_STR_P(function_name) TSRMLS_CC);
    6789             :                 } else {
    6790           2 :                         fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_VAR == IS_CONST) ? (opline->op2.zv + 1) : NULL) TSRMLS_CC);
    6791             :                 }
    6792           2 :                 if (UNEXPECTED(fbc == NULL)) {
    6793           0 :                         zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", ce->name->val, Z_STRVAL_P(function_name));
    6794             :                 }
    6795           2 :                 if (IS_VAR == IS_CONST &&
    6796             :                     EXPECTED(fbc->type <= ZEND_USER_FUNCTION) &&
    6797             :                     EXPECTED((fbc->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0)) {
    6798             :                         if (IS_CONST == IS_CONST) {
    6799             :                                 CACHE_PTR(Z_CACHE_SLOT_P(function_name), fbc);
    6800             :                         } else {
    6801             :                                 CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), ce, fbc);
    6802             :                         }
    6803             :                 }
    6804             :                 if (IS_VAR != IS_CONST) {
    6805           2 :                         zval_ptr_dtor_nogc(free_op2);
    6806             :                 }
    6807             :         } else {
    6808             :                 if (UNEXPECTED(ce->constructor == NULL)) {
    6809             :                         zend_error_noreturn(E_ERROR, "Cannot call constructor");
    6810             :                 }
    6811             :                 if (Z_OBJ(EX(This)) && Z_OBJ(EX(This))->ce != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
    6812             :                         zend_error_noreturn(E_ERROR, "Cannot call private %s::__construct()", ce->name->val);
    6813             :                 }
    6814             :                 fbc = ce->constructor;
    6815             :         }
    6816             : 
    6817           2 :         object = NULL;
    6818           2 :         if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
    6819           1 :                 if (Z_OBJ(EX(This))) {
    6820           0 :                         object = Z_OBJ(EX(This));
    6821           0 :                         GC_REFCOUNT(object)++;
    6822             :                 }
    6823           1 :                 if (!object ||
    6824           0 :                     !instanceof_function(object->ce, ce TSRMLS_CC)) {
    6825             :                     /* We are calling method of the other (incompatible) class,
    6826             :                        but passing $this. This is done for compatibility with php-4. */
    6827           1 :                         if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
    6828           3 :                                 zend_error(
    6829             :                                         object ? E_DEPRECATED : E_STRICT,
    6830             :                                         "Non-static method %s::%s() should not be called statically%s",
    6831           2 :                                         fbc->common.scope->name->val, fbc->common.function_name->val,
    6832             :                                         object ? ", assuming $this from incompatible context" : "");
    6833             :                         } else {
    6834             :                                 /* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
    6835           0 :                                 zend_error_noreturn(
    6836             :                                         E_ERROR,
    6837             :                                         "Non-static method %s::%s() cannot be called statically%s",
    6838           0 :                                         fbc->common.scope->name->val, fbc->common.function_name->val,
    6839             :                                         object ? ", assuming $this from incompatible context" : "");
    6840             :                         }
    6841             :                 }
    6842             :         }
    6843             : 
    6844           2 :         if (IS_CONST != IS_CONST) {
    6845             :                 /* previous opcode is ZEND_FETCH_CLASS */
    6846             :                 if ((opline-1)->extended_value == ZEND_FETCH_CLASS_PARENT || (opline-1)->extended_value == ZEND_FETCH_CLASS_SELF) {
    6847             :                         ce = EX(called_scope);
    6848             :                 }
    6849             :         }
    6850             : 
    6851           6 :         EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
    6852           2 :                 fbc, opline->extended_value, ce, object, EX(call) TSRMLS_CC);
    6853             : 
    6854           2 :         if (IS_VAR == IS_UNUSED) {
    6855             :                 EX(call)->return_value = NULL;
    6856             :         }
    6857             : 
    6858             :         CHECK_EXCEPTION();
    6859           2 :         ZEND_VM_NEXT_OPCODE();
    6860             : }
    6861             : 
    6862           0 : static int ZEND_FASTCALL  ZEND_INIT_USER_CALL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6863             : {
    6864           0 :         USE_OPLINE
    6865             :         zend_free_op free_op2;
    6866           0 :         zval *function_name = _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2);
    6867             :         zend_fcall_info_cache fcc;
    6868           0 :         char *error = NULL;
    6869             :         zend_function *func;
    6870             :         zend_class_entry *called_scope;
    6871             :         zend_object *object;
    6872             : 
    6873           0 :         if (zend_is_callable_ex(function_name, NULL, 0, NULL, &fcc, &error TSRMLS_CC)) {
    6874           0 :                 if (error) {
    6875           0 :                         efree(error);
    6876             :                 }
    6877           0 :                 func = fcc.function_handler;
    6878           0 :                 if (func->common.fn_flags & ZEND_ACC_CLOSURE) {
    6879             :                         /* Delay closure destruction until its invocation */
    6880           0 :                         func->common.prototype = (zend_function*)Z_OBJ_P(function_name);
    6881             :                         Z_ADDREF_P(function_name);
    6882             :                 }
    6883           0 :                 called_scope = fcc.called_scope;
    6884           0 :                 object = fcc.object;
    6885           0 :                 if (object) {
    6886           0 :                         GC_REFCOUNT(object)++; /* For $this pointer */
    6887           0 :                 } else if (func->common.scope &&
    6888           0 :                            !(func->common.fn_flags & ZEND_ACC_STATIC)) {
    6889           0 :                         if (func->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
    6890           0 :                                 zend_error(E_STRICT,
    6891             :                                 "Non-static method %s::%s() should not be called statically",
    6892           0 :                                 func->common.scope->name->val, func->common.function_name->val);
    6893             :                         } else {
    6894           0 :                                 zend_error_noreturn(
    6895             :                                         E_ERROR,
    6896             :                                         "Non-static method %s::%s() cannot be called statically",
    6897           0 :                                         func->common.scope->name->val, func->common.function_name->val);
    6898             :                         }
    6899             :                 }
    6900             :         } else {
    6901           0 :                 zend_error(E_WARNING, "%s() expects parameter 1 to be a valid callback, %s", Z_STRVAL_P(opline->op1.zv), error);
    6902           0 :                 efree(error);
    6903           0 :                 func = (zend_function*)&zend_pass_function;
    6904           0 :                 called_scope = NULL;
    6905           0 :                 object = NULL;
    6906             :         }
    6907             : 
    6908           0 :         EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
    6909           0 :                 func, opline->extended_value, called_scope, object, EX(call) TSRMLS_CC);
    6910             : 
    6911           0 :         zval_ptr_dtor_nogc(free_op2);
    6912             :         CHECK_EXCEPTION();
    6913           0 :         ZEND_VM_NEXT_OPCODE();
    6914             : }
    6915             : 
    6916           0 : static int ZEND_FASTCALL  ZEND_CASE_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6917             : {
    6918           0 :         USE_OPLINE
    6919             :         zend_free_op free_op2;
    6920           0 :         zval *result = EX_VAR(opline->result.var);
    6921             : 
    6922             :         SAVE_OPLINE();
    6923           0 :         fast_equal_function(result,
    6924             :                  opline->op1.zv,
    6925             :                  _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2) TSRMLS_CC);
    6926             : 
    6927           0 :         zval_ptr_dtor_nogc(free_op2);
    6928             :         CHECK_EXCEPTION();
    6929           0 :         ZEND_VM_NEXT_OPCODE();
    6930             : }
    6931             : 
    6932          59 : static int ZEND_FASTCALL  ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6933             : {
    6934          59 :         USE_OPLINE
    6935             : 
    6936             :         zval *expr_ptr, new_expr;
    6937             : 
    6938             :         SAVE_OPLINE();
    6939          59 :         if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) &&
    6940             :             (opline->extended_value & ZEND_ARRAY_ELEMENT_REF)) {
    6941             :                 expr_ptr = NULL;
    6942             :                 if (IS_CONST == IS_VAR && UNEXPECTED(expr_ptr == NULL)) {
    6943             :                         zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets");
    6944             :                 }
    6945             :                 ZVAL_MAKE_REF(expr_ptr);
    6946             :                 Z_ADDREF_P(expr_ptr);
    6947             : 
    6948             :         } else {
    6949          59 :                 expr_ptr = opline->op1.zv;
    6950          59 :                 if (IS_CONST == IS_TMP_VAR) {
    6951             :                         ZVAL_COPY_VALUE(&new_expr, expr_ptr);
    6952             :                         expr_ptr = &new_expr;
    6953             :                 } else if (IS_CONST == IS_CONST) {
    6954          59 :                         if (!Z_IMMUTABLE_P(expr_ptr)) {
    6955          59 :                                 ZVAL_DUP(&new_expr, expr_ptr);
    6956          59 :                                 expr_ptr = &new_expr;
    6957             :                         }
    6958             :                 } else if ((IS_CONST == IS_CV || IS_CONST == IS_VAR) && Z_ISREF_P(expr_ptr)) {
    6959             :                         expr_ptr = Z_REFVAL_P(expr_ptr);
    6960             :                         if (Z_REFCOUNTED_P(expr_ptr)) Z_ADDREF_P(expr_ptr);
    6961             : 
    6962             :                 } else if (IS_CONST == IS_CV && Z_REFCOUNTED_P(expr_ptr)) {
    6963             :                         Z_ADDREF_P(expr_ptr);
    6964             :                 }
    6965             :         }
    6966             : 
    6967             :         if (IS_VAR != IS_UNUSED) {
    6968             :                 zend_free_op free_op2;
    6969         118 :                 zval *offset = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
    6970             :                 zend_string *str;
    6971             :                 zend_ulong hval;
    6972             : 
    6973             : add_again:
    6974          59 :                 switch (Z_TYPE_P(offset)) {
    6975             :                         case IS_DOUBLE:
    6976           0 :                                 hval = zend_dval_to_lval(Z_DVAL_P(offset));
    6977           0 :                                 goto num_index;
    6978             :                         case IS_LONG:
    6979           0 :                                 hval = Z_LVAL_P(offset);
    6980             : num_index:
    6981           0 :                                 zend_hash_index_update(Z_ARRVAL_P(EX_VAR(opline->result.var)), hval, expr_ptr);
    6982           0 :                                 break;
    6983             :                         case IS_STRING:
    6984           0 :                                 str = Z_STR_P(offset);
    6985             :                                 if (IS_VAR != IS_CONST) {
    6986           0 :                                         if (ZEND_HANDLE_NUMERIC(str, hval)) {
    6987           0 :                                                 goto num_index;
    6988             :                                         }
    6989             :                                 }
    6990             : str_index:
    6991          47 :                                 zend_hash_update(Z_ARRVAL_P(EX_VAR(opline->result.var)), str, expr_ptr);
    6992          47 :                                 break;
    6993             :                         case IS_NULL:
    6994          47 :                                 str = STR_EMPTY_ALLOC();
    6995          47 :                                 goto str_index;
    6996             :                         case IS_FALSE:
    6997           0 :                                 hval = 0;
    6998           0 :                                 goto num_index;
    6999             :                         case IS_TRUE:
    7000           0 :                                 hval = 1;
    7001           0 :                                 goto num_index;
    7002             :                         case IS_REFERENCE:
    7003           0 :                                 offset = Z_REFVAL_P(offset);
    7004           0 :                                 goto add_again;
    7005             :                                 break;
    7006             :                         default:
    7007          12 :                                 zend_error(E_WARNING, "Illegal offset type");
    7008             :                                 zval_ptr_dtor(expr_ptr);
    7009             :                                 /* do nothing */
    7010             :                                 break;
    7011             :                 }
    7012          59 :                 zval_ptr_dtor_nogc(free_op2);
    7013             :         } else {
    7014             :                 zend_hash_next_index_insert(Z_ARRVAL_P(EX_VAR(opline->result.var)), expr_ptr);
    7015             :         }
    7016             :         CHECK_EXCEPTION();
    7017          59 :         ZEND_VM_NEXT_OPCODE();
    7018             : }
    7019             : 
    7020          39 : static int ZEND_FASTCALL  ZEND_INIT_ARRAY_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7021             : {
    7022             :         zval *array;
    7023             :         uint32_t size;
    7024          39 :         USE_OPLINE
    7025             : 
    7026          39 :         array = EX_VAR(opline->result.var);
    7027             :         if (IS_CONST != IS_UNUSED) {
    7028          39 :                 size = opline->extended_value >> ZEND_ARRAY_SIZE_SHIFT;
    7029             :         } else {
    7030             :                 size = 0;
    7031             :         }
    7032          39 :         ZVAL_NEW_ARR(array);
    7033          39 :         zend_hash_init(Z_ARRVAL_P(array), size, NULL, ZVAL_PTR_DTOR, 0);
    7034             : 
    7035             :         if (IS_CONST != IS_UNUSED) {
    7036             :                 /* Explicitly initialize array as not-packed if flag is set */
    7037          39 :                 if (opline->extended_value & ZEND_ARRAY_NOT_PACKED) {
    7038           0 :                         zend_hash_real_init(Z_ARRVAL_P(array), 0);
    7039             :                 }
    7040             :         }
    7041             : 
    7042          39 :         if (IS_CONST == IS_UNUSED) {
    7043             :                 ZEND_VM_NEXT_OPCODE();
    7044             : #if 0 || IS_CONST != IS_UNUSED
    7045             :         } else {
    7046          39 :                 return ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    7047             : #endif
    7048             :         }
    7049             : }
    7050             : 
    7051           0 : static int ZEND_FASTCALL  ZEND_UNSET_VAR_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7052             : {
    7053           0 :         USE_OPLINE
    7054             :         zval tmp, *varname;
    7055             :         HashTable *target_symbol_table;
    7056             : 
    7057             : 
    7058             :         SAVE_OPLINE();
    7059           0 :         if (IS_CONST == IS_CV &&
    7060             :             IS_VAR == IS_UNUSED &&
    7061             :             (opline->extended_value & ZEND_QUICK_SET)) {
    7062             :                 zval *var = EX_VAR(opline->op1.var);
    7063             : 
    7064             :                 if (Z_REFCOUNTED_P(var)) {
    7065             :                         zend_refcounted *garbage = Z_COUNTED_P(var);
    7066             : 
    7067             :                         if (!--GC_REFCOUNT(garbage)) {
    7068             :                                 ZVAL_UNDEF(var);
    7069             :                                 _zval_dtor_func_for_ptr(garbage ZEND_FILE_LINE_CC);
    7070             :                         } else {
    7071             :                                 GC_ZVAL_CHECK_POSSIBLE_ROOT(var);
    7072             :                                 ZVAL_UNDEF(var);
    7073             :                         }
    7074             :                 } else {
    7075             :                         ZVAL_UNDEF(var);
    7076             :                 }
    7077             :                 CHECK_EXCEPTION();
    7078             :                 ZEND_VM_NEXT_OPCODE();
    7079             :         }
    7080             : 
    7081           0 :         varname = opline->op1.zv;
    7082             : 
    7083           0 :         ZVAL_UNDEF(&tmp);
    7084           0 :         if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
    7085             :                 ZVAL_STR(&tmp, zval_get_string(varname));
    7086             :                 varname = &tmp;
    7087             :         }
    7088             : 
    7089             :         if (IS_VAR != IS_UNUSED) {
    7090             :                 zend_class_entry *ce;
    7091             : 
    7092           0 :                 if (IS_VAR == IS_CONST) {
    7093             :                         if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv))) {
    7094             :                                 ce = CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv));
    7095             :                         } else {
    7096             :                                 ce = zend_fetch_class_by_name(Z_STR_P(opline->op2.zv), opline->op2.zv + 1, 0 TSRMLS_CC);
    7097             :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    7098             :                                         if (IS_CONST != IS_CONST) {
    7099             :                                                 zval_dtor(&tmp);
    7100             :                                         }
    7101             : 
    7102             :                                         HANDLE_EXCEPTION();
    7103             :                                 }
    7104             :                                 if (UNEXPECTED(ce == NULL)) {
    7105             :                                         zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op2.zv));
    7106             :                                 }
    7107             :                                 CACHE_PTR(Z_CACHE_SLOT_P(opline->op2.zv), ce);
    7108             :                         }
    7109             :                 } else {
    7110           0 :                         ce = Z_CE_P(EX_VAR(opline->op2.var));
    7111             :                 }
    7112           0 :                 zend_std_unset_static_property(ce, Z_STR_P(varname), ((IS_CONST == IS_CONST) ? (EX(run_time_cache) + Z_CACHE_SLOT_P(varname)) : NULL) TSRMLS_CC);
    7113             :         } else {
    7114             :                 target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
    7115             :                 zend_hash_del_ind(target_symbol_table, Z_STR_P(varname));
    7116             :         }
    7117             : 
    7118           0 :         if (IS_CONST != IS_CONST) {
    7119             :                 zval_dtor(&tmp);
    7120             :         }
    7121             : 
    7122             :         CHECK_EXCEPTION();
    7123           0 :         ZEND_VM_NEXT_OPCODE();
    7124             : }
    7125             : 
    7126         146 : static int ZEND_FASTCALL  ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7127             : {
    7128         146 :         USE_OPLINE
    7129             :         zval *value;
    7130             : 
    7131             :         SAVE_OPLINE();
    7132         146 :         if (IS_CONST == IS_CV &&
    7133             :             IS_VAR == IS_UNUSED &&
    7134             :             (opline->extended_value & ZEND_QUICK_SET)) {
    7135             :                 value = EX_VAR(opline->op1.var);
    7136             :                 if (opline->extended_value & ZEND_ISSET) {
    7137             :                         ZVAL_BOOL(EX_VAR(opline->result.var),
    7138             :                                 Z_TYPE_P(value) > IS_NULL &&
    7139             :                             (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL));
    7140             :                 } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
    7141             :                         ZVAL_BOOL(EX_VAR(opline->result.var),
    7142             :                                 !i_zend_is_true(value TSRMLS_CC));
    7143             :                         CHECK_EXCEPTION();
    7144             :                 }
    7145             :                 ZEND_VM_NEXT_OPCODE();
    7146             :         } else {
    7147             : 
    7148         146 :                 zval tmp, *varname = opline->op1.zv;
    7149             : 
    7150         146 :                 if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
    7151             :                         ZVAL_STR(&tmp, zval_get_string(varname));
    7152             :                         varname = &tmp;
    7153             :                 }
    7154             : 
    7155             :                 if (IS_VAR != IS_UNUSED) {
    7156             :                         zend_class_entry *ce;
    7157             : 
    7158         146 :                         if (IS_VAR == IS_CONST) {
    7159             :                                 if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv))) {
    7160             :                                         ce = CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv));
    7161             :                                 } else {
    7162             :                                         ce = zend_fetch_class_by_name(Z_STR_P(opline->op2.zv), opline->op2.zv + 1, 0 TSRMLS_CC);
    7163             :                                         if (UNEXPECTED(ce == NULL)) {
    7164             :                                                 CHECK_EXCEPTION();
    7165             :                                                 ZEND_VM_NEXT_OPCODE();
    7166             :                                         }
    7167             :                                         CACHE_PTR(Z_CACHE_SLOT_P(opline->op2.zv), ce);
    7168             :                                 }
    7169             :                         } else {
    7170         146 :                                 ce = Z_CE_P(EX_VAR(opline->op2.var));
    7171             :                         }
    7172         146 :                         value = zend_std_get_static_property(ce, Z_STR_P(varname), 1, ((IS_CONST == IS_CONST) ? (EX(run_time_cache) + Z_CACHE_SLOT_P(varname)) : NULL) TSRMLS_CC);
    7173             :                 } else {
    7174             :                         HashTable *target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
    7175             :                         value = zend_hash_find_ind(target_symbol_table, Z_STR_P(varname));
    7176             :                 }
    7177             : 
    7178         146 :                 if (IS_CONST != IS_CONST && varname == &tmp) {
    7179             :                         zval_dtor(&tmp);
    7180             :                 }
    7181             : 
    7182         146 :                 if (opline->extended_value & ZEND_ISSET) {
    7183         341 :                         ZVAL_BOOL(EX_VAR(opline->result.var),
    7184             :                                 value && Z_TYPE_P(value) > IS_NULL &&
    7185             :                             (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL));
    7186             :                 } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
    7187           0 :                         ZVAL_BOOL(EX_VAR(opline->result.var),
    7188             :                                 !value || !i_zend_is_true(value TSRMLS_CC));
    7189             :                 }
    7190             : 
    7191             :                 CHECK_EXCEPTION();
    7192         146 :                 ZEND_VM_NEXT_OPCODE();
    7193             :         }
    7194             : }
    7195             : 
    7196           0 : static int ZEND_FASTCALL  ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7197             : {
    7198           0 :         USE_OPLINE
    7199             :         zend_free_op free_op2;
    7200             :         zval *container;
    7201             :         int result;
    7202             :         zend_ulong hval;
    7203             :         zval *offset;
    7204             : 
    7205             :         SAVE_OPLINE();
    7206           0 :         container = opline->op1.zv;
    7207           0 :         offset = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
    7208             : 
    7209           0 :         if (IS_CONST != IS_UNUSED && EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
    7210           0 :                 HashTable *ht = Z_ARRVAL_P(container);
    7211             :                 zval *value;
    7212             :                 zend_string *str;
    7213             : 
    7214             : isset_again:
    7215           0 :                 if (EXPECTED(Z_TYPE_P(offset) == IS_STRING)) {
    7216           0 :                         str = Z_STR_P(offset);
    7217             :                         if (IS_VAR != IS_CONST) {
    7218           0 :                                 if (ZEND_HANDLE_NUMERIC(str, hval)) {
    7219           0 :                                         goto num_index_prop;
    7220             :                                 }
    7221             :                         }
    7222             : str_index_prop:
    7223           0 :                         value = zend_hash_find_ind(ht, str);
    7224           0 :                 } else if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
    7225           0 :                         hval = Z_LVAL_P(offset);
    7226             : num_index_prop:
    7227           0 :                         value = zend_hash_index_find(ht, hval);
    7228             :                 } else {
    7229           0 :                         switch (Z_TYPE_P(offset)) {
    7230             :                                 case IS_DOUBLE:
    7231           0 :                                         hval = zend_dval_to_lval(Z_DVAL_P(offset));
    7232           0 :                                         goto num_index_prop;
    7233             :                                 case IS_NULL:
    7234           0 :                                         str = STR_EMPTY_ALLOC();
    7235           0 :                                         goto str_index_prop;
    7236             :                                 case IS_FALSE:
    7237           0 :                                         hval = 0;
    7238           0 :                                         goto num_index_prop;
    7239             :                                 case IS_TRUE:
    7240           0 :                                         hval = 1;
    7241           0 :                                         goto num_index_prop;
    7242             :                                 case IS_RESOURCE:
    7243           0 :                                         hval = Z_RES_HANDLE_P(offset);
    7244           0 :                                         goto num_index_prop;
    7245             :                                 case IS_REFERENCE:
    7246           0 :                                         offset = Z_REFVAL_P(offset);
    7247           0 :                                         goto isset_again;
    7248             :                                 default:
    7249           0 :                                         zend_error(E_WARNING, "Illegal offset type in isset or empty");
    7250           0 :                                         value = NULL;
    7251             :                                         break;
    7252             :                         }
    7253             :                 }
    7254             : 
    7255           0 :                 if (opline->extended_value & ZEND_ISSET) {
    7256             :                         /* > IS_NULL means not IS_UNDEF and not IS_NULL */
    7257           0 :                         result = value != NULL && Z_TYPE_P(value) > IS_NULL &&
    7258           0 :                             (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
    7259             :                 } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
    7260           0 :                         result = (value == NULL || !i_zend_is_true(value TSRMLS_CC));
    7261             :                 }
    7262           0 :         } else if (IS_CONST == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
    7263           0 :                 if (EXPECTED(Z_OBJ_HT_P(container)->has_dimension)) {
    7264           0 :                         result = Z_OBJ_HT_P(container)->has_dimension(container, offset, (opline->extended_value & ZEND_ISSET) == 0 TSRMLS_CC);
    7265             :                 } else {
    7266           0 :                         zend_error(E_NOTICE, "Trying to check element of non-array");
    7267           0 :                         result = 0;
    7268             :                 }
    7269           0 :                 if ((opline->extended_value & ZEND_ISSET) == 0) {
    7270           0 :                         result = !result;
    7271             :                 }
    7272           0 :         } else if (EXPECTED(Z_TYPE_P(container) == IS_STRING)) { /* string offsets */
    7273             :                 zval tmp;
    7274             : 
    7275           0 :                 result = 0;
    7276           0 :                 if (UNEXPECTED(Z_TYPE_P(offset) != IS_LONG)) {
    7277             :                         if (IS_VAR == IS_CV || IS_VAR == IS_VAR) {
    7278           0 :                                 ZVAL_DEREF(offset);
    7279             :                         }
    7280           0 :                         if (Z_TYPE_P(offset) < IS_STRING /* simple scalar types */
    7281             :                                         || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */
    7282           0 :                                                 && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) {
    7283           0 :                                 ZVAL_DUP(&tmp, offset);
    7284           0 :                                 convert_to_long(&tmp);
    7285           0 :                                 offset = &tmp;
    7286             :                         }
    7287             :                 }
    7288           0 :                 if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
    7289           0 :                         if (offset->value.lval >= 0 && (size_t)offset->value.lval < Z_STRLEN_P(container)) {
    7290           0 :                                 if ((opline->extended_value & ZEND_ISSET) ||
    7291           0 :                                     Z_STRVAL_P(container)[offset->value.lval] != '0') {
    7292           0 :                                         result = 1;
    7293             :                                 }
    7294             :                         }
    7295             :                 }
    7296           0 :                 if ((opline->extended_value & ZEND_ISSET) == 0) {
    7297           0 :                         result = !result;
    7298             :                 }
    7299             :         } else {
    7300           0 :                 result = ((opline->extended_value & ZEND_ISSET) == 0);
    7301             :         }
    7302             : 
    7303           0 :         zval_ptr_dtor_nogc(free_op2);
    7304           0 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    7305             : 
    7306             :         CHECK_EXCEPTION();
    7307           0 :         ZEND_VM_NEXT_OPCODE();
    7308             : }
    7309             : 
    7310           0 : static int ZEND_FASTCALL  ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7311             : {
    7312           0 :         USE_OPLINE
    7313             :         zend_free_op free_op2;
    7314             :         zval *container;
    7315             :         int result;
    7316             :         zval *offset;
    7317             : 
    7318             :         SAVE_OPLINE();
    7319           0 :         container = opline->op1.zv;
    7320           0 :         offset = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
    7321             : 
    7322           0 :         if (IS_CONST == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
    7323           0 :                 if (EXPECTED(Z_OBJ_HT_P(container)->has_property)) {
    7324           0 :                         result = Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISSET) == 0, ((IS_VAR == IS_CONST) ? (EX(run_time_cache) + Z_CACHE_SLOT_P(offset)) : NULL) TSRMLS_CC);
    7325             :                 } else {
    7326           0 :                         zend_error(E_NOTICE, "Trying to check property of non-object");
    7327           0 :                         result = 0;
    7328             :                 }
    7329           0 :                 if ((opline->extended_value & ZEND_ISSET) == 0) {
    7330           0 :                         result = !result;
    7331             :                 }
    7332             :         } else {
    7333           0 :                 result = ((opline->extended_value & ZEND_ISSET) == 0);
    7334             :         }
    7335             : 
    7336           0 :         zval_ptr_dtor_nogc(free_op2);
    7337           0 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    7338             : 
    7339             :         CHECK_EXCEPTION();
    7340           0 :         ZEND_VM_NEXT_OPCODE();
    7341             : }
    7342             : 
    7343           1 : static int ZEND_FASTCALL  ZEND_YIELD_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7344             : {
    7345           1 :         USE_OPLINE
    7346             : 
    7347             :         /* The generator object is stored in EX(return_value) */
    7348           1 :         zend_generator *generator = (zend_generator *) EX(return_value);
    7349             : 
    7350           1 :         if (generator->flags & ZEND_GENERATOR_FORCED_CLOSE) {
    7351           0 :                 zend_error_noreturn(E_ERROR, "Cannot yield from finally in a force-closed generator");
    7352             :         }
    7353             : 
    7354             :         /* Destroy the previously yielded value */
    7355           1 :         zval_ptr_dtor(&generator->value);
    7356             : 
    7357             :         /* Destroy the previously yielded key */
    7358           1 :         zval_ptr_dtor(&generator->key);
    7359             : 
    7360             :         /* Set the new yielded value */
    7361             :         if (IS_CONST != IS_UNUSED) {
    7362             : 
    7363             : 
    7364           1 :                 if (EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE) {
    7365             :                         /* Constants and temporary variables aren't yieldable by reference,
    7366             :                          * but we still allow them with a notice. */
    7367             :                         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    7368             :                                 zval *value;
    7369             : 
    7370           0 :                                 zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    7371             : 
    7372           0 :                                 value = opline->op1.zv;
    7373           0 :                                 ZVAL_COPY_VALUE(&generator->value, value);
    7374           0 :                                 if (Z_OPT_REFCOUNTED(generator->value)) Z_SET_REFCOUNT(generator->value, 1);
    7375             : 
    7376             :                                 /* Temporary variables don't need ctor copying */
    7377             :                                 if (IS_CONST != IS_TMP_VAR) {
    7378           0 :                                         zval_opt_copy_ctor(&generator->value);
    7379             :                                 }
    7380             :                         } else {
    7381             :                                 zval *value_ptr = NULL;
    7382             : 
    7383             :                                 if (IS_CONST == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
    7384             :                                         zend_error_noreturn(E_ERROR, "Cannot yield string offsets by reference");
    7385             :                                 }
    7386             : 
    7387             :                                 /* If a function call result is yielded and the function did
    7388             :                                  * not return by reference we throw a notice. */
    7389             :                                 if (IS_CONST == IS_VAR &&
    7390             :                                     (value_ptr == &EG(uninitialized_zval) ||
    7391             :                                      (opline->extended_value == ZEND_RETURNS_FUNCTION &&
    7392             :                                       !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
    7393             :                                         zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    7394             :                                 } else {
    7395             :                                         ZVAL_MAKE_REF(value_ptr);
    7396             :                                 }
    7397             :                                 ZVAL_COPY(&generator->value, value_ptr);
    7398             : 
    7399             :                         }
    7400             :                 } else {
    7401           1 :                         zval *value = opline->op1.zv;
    7402             : 
    7403             :                         /* Consts, temporary variables and references need copying */
    7404             :                         if (IS_CONST == IS_CONST) {
    7405           1 :                                 ZVAL_DUP(&generator->value, value);
    7406             :                         } else if (IS_CONST == IS_TMP_VAR) {
    7407             :                                 ZVAL_COPY_VALUE(&generator->value, value);
    7408             :             } else if ((IS_CONST == IS_CV || IS_CONST == IS_VAR) && Z_ISREF_P(value)) {
    7409             :                                 ZVAL_DUP(&generator->value, Z_REFVAL_P(value));
    7410             : 
    7411             :                         } else {
    7412             :                                 ZVAL_COPY_VALUE(&generator->value, value);
    7413             :                                 if (IS_CONST == IS_CV) {
    7414             :                                         if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
    7415             :                                 }
    7416             :                         }
    7417             :                 }
    7418             :         } else {
    7419             :                 /* If no value was specified yield null */
    7420             :                 ZVAL_NULL(&generator->value);
    7421             :         }
    7422             : 
    7423             :         /* Set the new yielded key */
    7424             :         if (IS_VAR != IS_UNUSED) {
    7425             :                 zend_free_op free_op2;
    7426           2 :                 zval *key = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
    7427             : 
    7428             :                 /* Consts, temporary variables and references need copying */
    7429           1 :                 if (IS_VAR == IS_CONST) {
    7430             :                         ZVAL_DUP(&generator->key, key);
    7431           1 :                 } else if (IS_VAR == IS_TMP_VAR) {
    7432             :                         ZVAL_COPY_VALUE(&generator->key, key);
    7433           1 :                 } else if ((IS_VAR == IS_VAR || IS_VAR == IS_CV) && Z_ISREF_P(key)) {
    7434           0 :                         ZVAL_DUP(&generator->key, Z_REFVAL_P(key));
    7435           0 :                         zval_ptr_dtor_nogc(free_op2);
    7436             :                 } else {
    7437           1 :                         ZVAL_COPY_VALUE(&generator->key, key);
    7438           1 :                         if (IS_VAR == IS_CV) {
    7439             :                                 if (Z_OPT_REFCOUNTED_P(key)) Z_ADDREF_P(key);
    7440             :                         }
    7441             :                 }
    7442             : 
    7443           2 :                 if (Z_TYPE(generator->key) == IS_LONG
    7444           0 :                     && Z_LVAL(generator->key) > generator->largest_used_integer_key
    7445             :                 ) {
    7446           0 :                         generator->largest_used_integer_key = Z_LVAL(generator->key);
    7447             :                 }
    7448             :         } else {
    7449             :                 /* If no key was specified we use auto-increment keys */
    7450             :                 generator->largest_used_integer_key++;
    7451             :                 ZVAL_LONG(&generator->key, generator->largest_used_integer_key);
    7452             :         }
    7453             : 
    7454           1 :         if (RETURN_VALUE_USED(opline)) {
    7455             :                 /* If the return value of yield is used set the send
    7456             :                  * target and initialize it to NULL */
    7457           0 :                 generator->send_target = EX_VAR(opline->result.var);
    7458           0 :                 ZVAL_NULL(generator->send_target);
    7459             :         } else {
    7460           1 :                 generator->send_target = NULL;
    7461             :         }
    7462             : 
    7463             :         /* We increment to the next op, so we are at the correct position when the
    7464             :          * generator is resumed. */
    7465           1 :         ZEND_VM_INC_OPCODE();
    7466             : 
    7467             :         /* The GOTO VM uses a local opline variable. We need to set the opline
    7468             :          * variable in execute_data so we don't resume at an old position. */
    7469             :         SAVE_OPLINE();
    7470             : 
    7471           1 :         ZEND_VM_RETURN();
    7472             : }
    7473             : 
    7474           0 : static int ZEND_FASTCALL  ZEND_POW_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7475             : {
    7476           0 :         USE_OPLINE
    7477             :         zend_free_op free_op2;
    7478             : 
    7479             :         SAVE_OPLINE();
    7480           0 :         pow_function(EX_VAR(opline->result.var),
    7481             :                 opline->op1.zv,
    7482             :                 _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2) TSRMLS_CC);
    7483             : 
    7484           0 :         zval_ptr_dtor_nogc(free_op2);
    7485             :         CHECK_EXCEPTION();
    7486           0 :         ZEND_VM_NEXT_OPCODE();
    7487             : }
    7488             : 
    7489      103963 : static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CONST_UNUSED(int type, ZEND_OPCODE_HANDLER_ARGS)
    7490             : {
    7491      103963 :         USE_OPLINE
    7492             : 
    7493             :         zval *varname;
    7494             :         zval *retval;
    7495             :         zend_string *name;
    7496             :         HashTable *target_symbol_table;
    7497             : 
    7498             :         SAVE_OPLINE();
    7499      103963 :         varname = opline->op1.zv;
    7500             : 
    7501             :         if (IS_CONST == IS_CONST) {
    7502      103963 :                 name = Z_STR_P(varname);
    7503             :         } else if (EXPECTED(Z_TYPE_P(varname) == IS_STRING)) {
    7504             :                 name = Z_STR_P(varname);
    7505             :                 zend_string_addref(name);
    7506             :         } else {
    7507             :                 name = zval_get_string(varname);
    7508             :         }
    7509             : 
    7510      103963 :         if (IS_UNUSED != IS_UNUSED) {
    7511             :                 zend_class_entry *ce;
    7512             : 
    7513             :                 if (IS_UNUSED == IS_CONST) {
    7514             :                         if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv))) {
    7515             :                                 ce = CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv));
    7516             :                         } else {
    7517             :                                 ce = zend_fetch_class_by_name(Z_STR_P(opline->op2.zv), opline->op2.zv + 1, 0 TSRMLS_CC);
    7518             :                                 if (UNEXPECTED(ce == NULL)) {
    7519             :                                         if (IS_CONST != IS_CONST) {
    7520             :                                                 zend_string_release(name);
    7521             :                                         }
    7522             : 
    7523             :                                         CHECK_EXCEPTION();
    7524             :                                         ZEND_VM_NEXT_OPCODE();
    7525             :                                 }
    7526             :                                 CACHE_PTR(Z_CACHE_SLOT_P(opline->op2.zv), ce);
    7527             :                         }
    7528             :                 } else {
    7529             :                         ce = Z_CE_P(EX_VAR(opline->op2.var));
    7530             :                 }
    7531             :                 retval = zend_std_get_static_property(ce, name, 0, ((IS_CONST == IS_CONST) ? (EX(run_time_cache) + Z_CACHE_SLOT_P(varname)) : NULL) TSRMLS_CC);
    7532             : 
    7533             :         } else {
    7534      207926 :                 target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
    7535      103963 :                 retval = zend_hash_find(target_symbol_table, name);
    7536      103963 :                 if (retval == NULL) {
    7537         808 :                         switch (type) {
    7538             :                                 case BP_VAR_R:
    7539             :                                 case BP_VAR_UNSET:
    7540         804 :                                         zend_error(E_NOTICE,"Undefined variable: %s", name->val);
    7541             :                                         /* break missing intentionally */
    7542             :                                 case BP_VAR_IS:
    7543         804 :                                         retval = &EG(uninitialized_zval);
    7544         804 :                                         break;
    7545             :                                 case BP_VAR_RW:
    7546           0 :                                         zend_error(E_NOTICE,"Undefined variable: %s", name->val);
    7547             :                                         /* break missing intentionally */
    7548             :                                 case BP_VAR_W:
    7549           4 :                                         retval = zend_hash_add_new(target_symbol_table, name, &EG(uninitialized_zval));
    7550             :                                         break;
    7551             :                                 EMPTY_SWITCH_DEFAULT_CASE()
    7552             :                         }
    7553             :                 /* GLOBAL or $$name variable may be an INDIRECT pointer to CV */
    7554      103155 :                 } else if (Z_TYPE_P(retval) == IS_INDIRECT) {
    7555       88393 :                         retval = Z_INDIRECT_P(retval);
    7556       88393 :                         if (Z_TYPE_P(retval) == IS_UNDEF) {
    7557         700 :                                 switch (type) {
    7558             :                                         case BP_VAR_R:
    7559             :                                         case BP_VAR_UNSET:
    7560         700 :                                                 zend_error(E_NOTICE,"Undefined variable: %s", name->val);
    7561             :                                                 /* break missing intentionally */
    7562             :                                         case BP_VAR_IS:
    7563         700 :                                                 retval = &EG(uninitialized_zval);
    7564         700 :                                                 break;
    7565             :                                         case BP_VAR_RW:
    7566           0 :                                                 zend_error(E_NOTICE,"Undefined variable: %s", name->val);
    7567             :                                                 /* break missing intentionally */
    7568             :                                         case BP_VAR_W:
    7569           0 :                                                 ZVAL_NULL(retval);
    7570             :                                                 break;
    7571             :                                         EMPTY_SWITCH_DEFAULT_CASE()
    7572             :                                 }
    7573             :                         }
    7574             :                 }
    7575      103963 :                 if ((opline->extended_value & ZEND_FETCH_TYPE_MASK) == ZEND_FETCH_STATIC) {
    7576        1437 :                         if (Z_CONSTANT_P(retval)) {
    7577           7 :                                 zval_update_constant(retval, 1 TSRMLS_CC);
    7578             :                         }
    7579      102526 :                 } else if ((opline->extended_value & ZEND_FETCH_TYPE_MASK) != ZEND_FETCH_GLOBAL_LOCK) {
    7580             : 
    7581             :                 }
    7582             :         }
    7583             : 
    7584      103963 :         if (IS_CONST != IS_CONST) {
    7585             :                 zend_string_release(name);
    7586             :         }
    7587             : 
    7588             :         ZEND_ASSERT(retval != NULL);
    7589      206082 :         if (type == BP_VAR_R || type == BP_VAR_IS) {
    7590      102604 :                 if (/*type == BP_VAR_R &&*/ Z_ISREF_P(retval) && Z_REFCOUNT_P(retval) == 1) {
    7591         168 :                         ZVAL_UNREF(retval);
    7592             :                 }
    7593      102119 :                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    7594             :         } else {
    7595        1844 :                 ZVAL_INDIRECT(EX_VAR(opline->result.var), retval);
    7596             :         }
    7597             :         CHECK_EXCEPTION();
    7598      103963 :         ZEND_VM_NEXT_OPCODE();
    7599             : }
    7600             : 
    7601      102098 : static int ZEND_FASTCALL  ZEND_FETCH_R_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7602             : {
    7603      102098 :         return zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    7604             : }
    7605             : 
    7606        1809 : static int ZEND_FASTCALL  ZEND_FETCH_W_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7607             : {
    7608        1809 :         return zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_W, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    7609             : }
    7610             : 
    7611           5 : static int ZEND_FASTCALL  ZEND_FETCH_RW_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7612             : {
    7613           5 :         return zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_RW, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    7614             : }
    7615             : 
    7616           4 : static int ZEND_FASTCALL  ZEND_FETCH_FUNC_ARG_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7617             : {
    7618           4 :         USE_OPLINE
    7619             : 
    7620           8 :         if (zend_is_by_ref_func_arg_fetch(opline, EX(call) TSRMLS_CC)) {
    7621           0 :                 return zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_W, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    7622             :         } else {
    7623           4 :                 return zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    7624             :         }
    7625             : }
    7626             : 
    7627          30 : static int ZEND_FASTCALL  ZEND_FETCH_UNSET_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7628             : {
    7629          30 :         return zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_UNSET, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    7630             : }
    7631             : 
    7632          17 : static int ZEND_FASTCALL  ZEND_FETCH_IS_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7633             : {
    7634          17 :         return zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    7635             : }
    7636             : 
    7637           0 : static int ZEND_FASTCALL  ZEND_FETCH_DIM_FUNC_ARG_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7638             : {
    7639           0 :         USE_OPLINE
    7640             :         zval *container;
    7641             :         zend_free_op free_op1;
    7642             : 
    7643             :         SAVE_OPLINE();
    7644             : 
    7645           0 :         if (zend_is_by_ref_func_arg_fetch(opline, EX(call) TSRMLS_CC)) {
    7646             :         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    7647           0 :             zend_error_noreturn(E_ERROR, "Cannot use temporary expression in write context");
    7648             :         }
    7649             :                 container = NULL;
    7650             :                 if (IS_CONST == IS_VAR && UNEXPECTED(container == NULL)) {
    7651             :                         zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
    7652             :                 }
    7653             :                 ZVAL_DEREF(container);
    7654             :                 zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, NULL, IS_UNUSED TSRMLS_CC);
    7655             :                 if (IS_CONST == IS_VAR && READY_TO_DESTROY(free_op1)) {
    7656             :                         EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
    7657             :                 }
    7658             : 
    7659             : 
    7660             :         } else {
    7661             :                 if (IS_UNUSED == IS_UNUSED) {
    7662           0 :                         zend_error_noreturn(E_ERROR, "Cannot use [] for reading");
    7663             :                 }
    7664             :                 container = opline->op1.zv;
    7665             :                 zend_fetch_dimension_address_read_R(EX_VAR(opline->result.var), container, NULL, IS_UNUSED TSRMLS_CC);
    7666             : 
    7667             : 
    7668             :         }
    7669             :         CHECK_EXCEPTION();
    7670             :         ZEND_VM_NEXT_OPCODE();
    7671             : }
    7672             : 
    7673           2 : static int ZEND_FASTCALL  ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7674             : {
    7675           2 :         USE_OPLINE
    7676             :         zval *function_name;
    7677             :         zend_class_entry *ce;
    7678             :         zend_object *object;
    7679             :         zend_function *fbc;
    7680             : 
    7681             :         SAVE_OPLINE();
    7682             : 
    7683             :         if (IS_CONST == IS_CONST) {
    7684             :                 /* no function found. try a static method in class */
    7685           2 :                 if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op1.zv))) {
    7686           0 :                         ce = CACHED_PTR(Z_CACHE_SLOT_P(opline->op1.zv));
    7687             :                 } else {
    7688           2 :                         ce = zend_fetch_class_by_name(Z_STR_P(opline->op1.zv), opline->op1.zv + 1, ZEND_FETCH_CLASS_DEFAULT TSRMLS_CC);
    7689           2 :                         if (UNEXPECTED(EG(exception) != NULL)) {
    7690           0 :                                 HANDLE_EXCEPTION();
    7691             :                         }
    7692           2 :                         if (UNEXPECTED(ce == NULL)) {
    7693           0 :                                 zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op1.zv));
    7694             :                         }
    7695           2 :                         CACHE_PTR(Z_CACHE_SLOT_P(opline->op1.zv), ce);
    7696             :                 }
    7697             :         } else {
    7698             :                 ce = Z_CE_P(EX_VAR(opline->op1.var));
    7699             :         }
    7700             : 
    7701           2 :         if (IS_CONST == IS_CONST &&
    7702             :             IS_UNUSED == IS_CONST &&
    7703             :             CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv))) {
    7704             :                 fbc = CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv));
    7705           2 :         } else if (IS_CONST != IS_CONST &&
    7706             :                    IS_UNUSED == IS_CONST &&
    7707             :                    (fbc = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(opline->op2.zv), ce))) {
    7708             :                 /* do nothing */
    7709           2 :         } else if (IS_UNUSED != IS_UNUSED) {
    7710             : 
    7711             : 
    7712             :                 function_name = NULL;
    7713             :                 if (IS_UNUSED != IS_CONST) {
    7714             :                         if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
    7715             :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    7716             :                                         HANDLE_EXCEPTION();
    7717             :                                 }
    7718             :                                 zend_error_noreturn(E_ERROR, "Function name must be a string");
    7719             :                         }
    7720             :                 }
    7721             : 
    7722             :                 if (ce->get_static_method) {
    7723             :                         fbc = ce->get_static_method(ce, Z_STR_P(function_name) TSRMLS_CC);
    7724             :                 } else {
    7725             :                         fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_UNUSED == IS_CONST) ? (opline->op2.zv + 1) : NULL) TSRMLS_CC);
    7726             :                 }
    7727             :                 if (UNEXPECTED(fbc == NULL)) {
    7728             :                         zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", ce->name->val, Z_STRVAL_P(function_name));
    7729             :                 }
    7730             :                 if (IS_UNUSED == IS_CONST &&
    7731             :                     EXPECTED(fbc->type <= ZEND_USER_FUNCTION) &&
    7732             :                     EXPECTED((fbc->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0)) {
    7733             :                         if (IS_CONST == IS_CONST) {
    7734             :                                 CACHE_PTR(Z_CACHE_SLOT_P(function_name), fbc);
    7735             :                         } else {
    7736             :                                 CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), ce, fbc);
    7737             :                         }
    7738             :                 }
    7739             :                 if (IS_UNUSED != IS_CONST) {
    7740             : 
    7741             :                 }
    7742             :         } else {
    7743           2 :                 if (UNEXPECTED(ce->constructor == NULL)) {
    7744           1 :                         zend_error_noreturn(E_ERROR, "Cannot call constructor");
    7745             :                 }
    7746           1 :                 if (Z_OBJ(EX(This)) && Z_OBJ(EX(This))->ce != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
    7747           0 :                         zend_error_noreturn(E_ERROR, "Cannot call private %s::__construct()", ce->name->val);
    7748             :                 }
    7749           1 :                 fbc = ce->constructor;
    7750             :         }
    7751             : 
    7752           1 :         object = NULL;
    7753           1 :         if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
    7754           1 :                 if (Z_OBJ(EX(This))) {
    7755           1 :                         object = Z_OBJ(EX(This));
    7756           1 :                         GC_REFCOUNT(object)++;
    7757             :                 }
    7758           2 :                 if (!object ||
    7759           1 :                     !instanceof_function(object->ce, ce TSRMLS_CC)) {
    7760             :                     /* We are calling method of the other (incompatible) class,
    7761             :                        but passing $this. This is done for compatibility with php-4. */
    7762           0 :                         if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
    7763           0 :                                 zend_error(
    7764             :                                         object ? E_DEPRECATED : E_STRICT,
    7765             :                                         "Non-static method %s::%s() should not be called statically%s",
    7766           0 :                                         fbc->common.scope->name->val, fbc->common.function_name->val,
    7767             :                                         object ? ", assuming $this from incompatible context" : "");
    7768             :                         } else {
    7769             :                                 /* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
    7770           0 :                                 zend_error_noreturn(
    7771             :                                         E_ERROR,
    7772             :                                         "Non-static method %s::%s() cannot be called statically%s",
    7773           0 :                                         fbc->common.scope->name->val, fbc->common.function_name->val,
    7774             :                                         object ? ", assuming $this from incompatible context" : "");
    7775             :                         }
    7776             :                 }
    7777             :         }
    7778             : 
    7779           1 :         if (IS_CONST != IS_CONST) {
    7780             :                 /* previous opcode is ZEND_FETCH_CLASS */
    7781             :                 if ((opline-1)->extended_value == ZEND_FETCH_CLASS_PARENT || (opline-1)->extended_value == ZEND_FETCH_CLASS_SELF) {
    7782             :                         ce = EX(called_scope);
    7783             :                 }
    7784             :         }
    7785             : 
    7786           3 :         EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
    7787           1 :                 fbc, opline->extended_value, ce, object, EX(call) TSRMLS_CC);
    7788             : 
    7789             :         if (IS_UNUSED == IS_UNUSED) {
    7790           1 :                 EX(call)->return_value = NULL;
    7791             :         }
    7792             : 
    7793             :         CHECK_EXCEPTION();
    7794           1 :         ZEND_VM_NEXT_OPCODE();
    7795             : }
    7796             : 
    7797       13628 : static int ZEND_FASTCALL  ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7798             : {
    7799       13628 :         USE_OPLINE
    7800             : 
    7801             :         zval *expr_ptr, new_expr;
    7802             : 
    7803             :         SAVE_OPLINE();
    7804       13628 :         if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) &&
    7805             :             (opline->extended_value & ZEND_ARRAY_ELEMENT_REF)) {
    7806             :                 expr_ptr = NULL;
    7807             :                 if (IS_CONST == IS_VAR && UNEXPECTED(expr_ptr == NULL)) {
    7808             :                         zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets");
    7809             :                 }
    7810             :                 ZVAL_MAKE_REF(expr_ptr);
    7811             :                 Z_ADDREF_P(expr_ptr);
    7812             : 
    7813             :         } else {
    7814       13628 :                 expr_ptr = opline->op1.zv;
    7815       13628 :                 if (IS_CONST == IS_TMP_VAR) {
    7816             :                         ZVAL_COPY_VALUE(&new_expr, expr_ptr);
    7817             :                         expr_ptr = &new_expr;
    7818             :                 } else if (IS_CONST == IS_CONST) {
    7819       13628 :                         if (!Z_IMMUTABLE_P(expr_ptr)) {
    7820       13628 :                                 ZVAL_DUP(&new_expr, expr_ptr);
    7821       13628 :                                 expr_ptr = &new_expr;
    7822             :                         }
    7823             :                 } else if ((IS_CONST == IS_CV || IS_CONST == IS_VAR) && Z_ISREF_P(expr_ptr)) {
    7824             :                         expr_ptr = Z_REFVAL_P(expr_ptr);
    7825             :                         if (Z_REFCOUNTED_P(expr_ptr)) Z_ADDREF_P(expr_ptr);
    7826             : 
    7827             :                 } else if (IS_CONST == IS_CV && Z_REFCOUNTED_P(expr_ptr)) {
    7828             :                         Z_ADDREF_P(expr_ptr);
    7829             :                 }
    7830             :         }
    7831             : 
    7832       13628 :         if (IS_UNUSED != IS_UNUSED) {
    7833             : 
    7834             :                 zval *offset = NULL;
    7835             :                 zend_string *str;
    7836             :                 zend_ulong hval;
    7837             : 
    7838             : add_again:
    7839             :                 switch (Z_TYPE_P(offset)) {
    7840             :                         case IS_DOUBLE:
    7841             :                                 hval = zend_dval_to_lval(Z_DVAL_P(offset));
    7842             :                                 goto num_index;
    7843             :                         case IS_LONG:
    7844             :                                 hval = Z_LVAL_P(offset);
    7845             : num_index:
    7846             :                                 zend_hash_index_update(Z_ARRVAL_P(EX_VAR(opline->result.var)), hval, expr_ptr);
    7847             :                                 break;
    7848             :                         case IS_STRING:
    7849             :                                 str = Z_STR_P(offset);
    7850             :                                 if (IS_UNUSED != IS_CONST) {
    7851             :                                         if (ZEND_HANDLE_NUMERIC(str, hval)) {
    7852             :                                                 goto num_index;
    7853             :                                         }
    7854             :                                 }
    7855             : str_index:
    7856             :                                 zend_hash_update(Z_ARRVAL_P(EX_VAR(opline->result.var)), str, expr_ptr);
    7857             :                                 break;
    7858             :                         case IS_NULL:
    7859             :                                 str = STR_EMPTY_ALLOC();
    7860             :                                 goto str_index;
    7861             :                         case IS_FALSE:
    7862             :                                 hval = 0;
    7863             :                                 goto num_index;
    7864             :                         case IS_TRUE:
    7865             :                                 hval = 1;
    7866             :                                 goto num_index;
    7867             :                         case IS_REFERENCE:
    7868             :                                 offset = Z_REFVAL_P(offset);
    7869             :                                 goto add_again;
    7870             :                                 break;
    7871             :                         default:
    7872             :                                 zend_error(E_WARNING, "Illegal offset type");
    7873             :                                 zval_ptr_dtor(expr_ptr);
    7874             :                                 /* do nothing */
    7875             :                                 break;
    7876             :                 }
    7877             : 
    7878             :         } else {
    7879       13628 :                 zend_hash_next_index_insert(Z_ARRVAL_P(EX_VAR(opline->result.var)), expr_ptr);
    7880             :         }
    7881             :         CHECK_EXCEPTION();
    7882       13628 :         ZEND_VM_NEXT_OPCODE();
    7883             : }
    7884             : 
    7885        1036 : static int ZEND_FASTCALL  ZEND_INIT_ARRAY_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7886             : {
    7887             :         zval *array;
    7888             :         uint32_t size;
    7889        1036 :         USE_OPLINE
    7890             : 
    7891        1036 :         array = EX_VAR(opline->result.var);
    7892             :         if (IS_CONST != IS_UNUSED) {
    7893        1036 :                 size = opline->extended_value >> ZEND_ARRAY_SIZE_SHIFT;
    7894             :         } else {
    7895             :                 size = 0;
    7896             :         }
    7897        1036 :         ZVAL_NEW_ARR(array);
    7898        1036 :         zend_hash_init(Z_ARRVAL_P(array), size, NULL, ZVAL_PTR_DTOR, 0);
    7899             : 
    7900             :         if (IS_CONST != IS_UNUSED) {
    7901             :                 /* Explicitly initialize array as not-packed if flag is set */
    7902        1036 :                 if (opline->extended_value & ZEND_ARRAY_NOT_PACKED) {
    7903          13 :                         zend_hash_real_init(Z_ARRVAL_P(array), 0);
    7904             :                 }
    7905             :         }
    7906             : 
    7907        1036 :         if (IS_CONST == IS_UNUSED) {
    7908             :                 ZEND_VM_NEXT_OPCODE();
    7909             : #if 0 || IS_CONST != IS_UNUSED
    7910             :         } else {
    7911        1036 :                 return ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    7912             : #endif
    7913             :         }
    7914             : }
    7915             : 
    7916           5 : static int ZEND_FASTCALL  ZEND_UNSET_VAR_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7917             : {
    7918           5 :         USE_OPLINE
    7919             :         zval tmp, *varname;
    7920             :         HashTable *target_symbol_table;
    7921             : 
    7922             : 
    7923             :         SAVE_OPLINE();
    7924           5 :         if (IS_CONST == IS_CV &&
    7925             :             IS_UNUSED == IS_UNUSED &&
    7926             :             (opline->extended_value & ZEND_QUICK_SET)) {
    7927             :                 zval *var = EX_VAR(opline->op1.var);
    7928             : 
    7929             :                 if (Z_REFCOUNTED_P(var)) {
    7930             :                         zend_refcounted *garbage = Z_COUNTED_P(var);
    7931             : 
    7932             :                         if (!--GC_REFCOUNT(garbage)) {
    7933             :                                 ZVAL_UNDEF(var);
    7934             :                                 _zval_dtor_func_for_ptr(garbage ZEND_FILE_LINE_CC);
    7935             :                         } else {
    7936             :                                 GC_ZVAL_CHECK_POSSIBLE_ROOT(var);
    7937             :                                 ZVAL_UNDEF(var);
    7938             :                         }
    7939             :                 } else {
    7940             :                         ZVAL_UNDEF(var);
    7941             :                 }
    7942             :                 CHECK_EXCEPTION();
    7943             :                 ZEND_VM_NEXT_OPCODE();
    7944             :         }
    7945             : 
    7946           5 :         varname = opline->op1.zv;
    7947             : 
    7948           5 :         ZVAL_UNDEF(&tmp);
    7949           5 :         if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
    7950             :                 ZVAL_STR(&tmp, zval_get_string(varname));
    7951             :                 varname = &tmp;
    7952             :         }
    7953             : 
    7954           5 :         if (IS_UNUSED != IS_UNUSED) {
    7955             :                 zend_class_entry *ce;
    7956             : 
    7957             :                 if (IS_UNUSED == IS_CONST) {
    7958             :                         if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv))) {
    7959             :                                 ce = CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv));
    7960             :                         } else {
    7961             :                                 ce = zend_fetch_class_by_name(Z_STR_P(opline->op2.zv), opline->op2.zv + 1, 0 TSRMLS_CC);
    7962             :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    7963             :                                         if (IS_CONST != IS_CONST) {
    7964             :                                                 zval_dtor(&tmp);
    7965             :                                         }
    7966             : 
    7967             :                                         HANDLE_EXCEPTION();
    7968             :                                 }
    7969             :                                 if (UNEXPECTED(ce == NULL)) {
    7970             :                                         zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op2.zv));
    7971             :                                 }
    7972             :                                 CACHE_PTR(Z_CACHE_SLOT_P(opline->op2.zv), ce);
    7973             :                         }
    7974             :                 } else {
    7975             :                         ce = Z_CE_P(EX_VAR(opline->op2.var));
    7976             :                 }
    7977             :                 zend_std_unset_static_property(ce, Z_STR_P(varname), ((IS_CONST == IS_CONST) ? (EX(run_time_cache) + Z_CACHE_SLOT_P(varname)) : NULL) TSRMLS_CC);
    7978             :         } else {
    7979          10 :                 target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
    7980           5 :                 zend_hash_del_ind(target_symbol_table, Z_STR_P(varname));
    7981             :         }
    7982             : 
    7983           5 :         if (IS_CONST != IS_CONST) {
    7984             :                 zval_dtor(&tmp);
    7985             :         }
    7986             : 
    7987             :         CHECK_EXCEPTION();
    7988           5 :         ZEND_VM_NEXT_OPCODE();
    7989             : }
    7990             : 
    7991          11 : static int ZEND_FASTCALL  ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7992             : {
    7993          11 :         USE_OPLINE
    7994             :         zval *value;
    7995             : 
    7996             :         SAVE_OPLINE();
    7997          11 :         if (IS_CONST == IS_CV &&
    7998             :             IS_UNUSED == IS_UNUSED &&
    7999             :             (opline->extended_value & ZEND_QUICK_SET)) {
    8000             :                 value = EX_VAR(opline->op1.var);
    8001             :                 if (opline->extended_value & ZEND_ISSET) {
    8002             :                         ZVAL_BOOL(EX_VAR(opline->result.var),
    8003             :                                 Z_TYPE_P(value) > IS_NULL &&
    8004             :                             (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL));
    8005             :                 } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
    8006             :                         ZVAL_BOOL(EX_VAR(opline->result.var),
    8007             :                                 !i_zend_is_true(value TSRMLS_CC));
    8008             :                         CHECK_EXCEPTION();
    8009             :                 }
    8010             :                 ZEND_VM_NEXT_OPCODE();
    8011             :         } else {
    8012             : 
    8013          11 :                 zval tmp, *varname = opline->op1.zv;
    8014             : 
    8015          11 :                 if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
    8016             :                         ZVAL_STR(&tmp, zval_get_string(varname));
    8017             :                         varname = &tmp;
    8018             :                 }
    8019             : 
    8020          11 :                 if (IS_UNUSED != IS_UNUSED) {
    8021             :                         zend_class_entry *ce;
    8022             : 
    8023             :                         if (IS_UNUSED == IS_CONST) {
    8024             :                                 if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv))) {
    8025             :                                         ce = CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv));
    8026             :                                 } else {
    8027             :                                         ce = zend_fetch_class_by_name(Z_STR_P(opline->op2.zv), opline->op2.zv + 1, 0 TSRMLS_CC);
    8028             :                                         if (UNEXPECTED(ce == NULL)) {
    8029             :                                                 CHECK_EXCEPTION();
    8030             :                                                 ZEND_VM_NEXT_OPCODE();
    8031             :                                         }
    8032             :                                         CACHE_PTR(Z_CACHE_SLOT_P(opline->op2.zv), ce);
    8033             :                                 }
    8034             :                         } else {
    8035             :                                 ce = Z_CE_P(EX_VAR(opline->op2.var));
    8036             :                         }
    8037             :                         value = zend_std_get_static_property(ce, Z_STR_P(varname), 1, ((IS_CONST == IS_CONST) ? (EX(run_time_cache) + Z_CACHE_SLOT_P(varname)) : NULL) TSRMLS_CC);
    8038             :                 } else {
    8039          22 :                         HashTable *target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
    8040          22 :                         value = zend_hash_find_ind(target_symbol_table, Z_STR_P(varname));
    8041             :                 }
    8042             : 
    8043          11 :                 if (IS_CONST != IS_CONST && varname == &tmp) {
    8044             :                         zval_dtor(&tmp);
    8045             :                 }
    8046             : 
    8047          11 :                 if (opline->extended_value & ZEND_ISSET) {
    8048          23 :                         ZVAL_BOOL(EX_VAR(opline->result.var),
    8049             :                                 value && Z_TYPE_P(value) > IS_NULL &&
    8050             :                             (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL));
    8051             :                 } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
    8052           8 :                         ZVAL_BOOL(EX_VAR(opline->result.var),
    8053             :                                 !value || !i_zend_is_true(value TSRMLS_CC));
    8054             :                 }
    8055             : 
    8056             :                 CHECK_EXCEPTION();
    8057          11 :                 ZEND_VM_NEXT_OPCODE();
    8058             :         }
    8059             : }
    8060             : 
    8061         339 : static int ZEND_FASTCALL  ZEND_DECLARE_LAMBDA_FUNCTION_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8062             : {
    8063         339 :         USE_OPLINE
    8064             :         zval *zfunc;
    8065             :         int closure_is_static, closure_is_being_defined_inside_static_context;
    8066             : 
    8067             :         SAVE_OPLINE();
    8068             : 
    8069         678 :         if (UNEXPECTED((zfunc = zend_hash_find(EG(function_table), Z_STR_P(opline->op1.zv))) == NULL) ||
    8070         339 :             UNEXPECTED(Z_FUNC_P(zfunc)->type != ZEND_USER_FUNCTION)) {
    8071           0 :                 zend_error_noreturn(E_ERROR, "Base lambda function for closure not found");
    8072             :         }
    8073             : 
    8074         339 :         closure_is_static = Z_FUNC_P(zfunc)->common.fn_flags & ZEND_ACC_STATIC;
    8075         339 :         closure_is_being_defined_inside_static_context = EX(func)->common.fn_flags & ZEND_ACC_STATIC;
    8076         357 :         if (closure_is_static || closure_is_being_defined_inside_static_context) {
    8077          18 :                 zend_create_closure(EX_VAR(opline->result.var), Z_FUNC_P(zfunc), EX(called_scope), NULL TSRMLS_CC);
    8078             :         } else {
    8079         321 :                 zend_create_closure(EX_VAR(opline->result.var), Z_FUNC_P(zfunc), EX(scope), Z_OBJ(EX(This)) ? &EX(This) : NULL TSRMLS_CC);
    8080             :         }
    8081             : 
    8082             :         CHECK_EXCEPTION();
    8083         339 :         ZEND_VM_NEXT_OPCODE();
    8084             : }
    8085             : 
    8086          28 : static int ZEND_FASTCALL  ZEND_YIELD_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8087             : {
    8088          28 :         USE_OPLINE
    8089             : 
    8090             :         /* The generator object is stored in EX(return_value) */
    8091          28 :         zend_generator *generator = (zend_generator *) EX(return_value);
    8092             : 
    8093          28 :         if (generator->flags & ZEND_GENERATOR_FORCED_CLOSE) {
    8094           0 :                 zend_error_noreturn(E_ERROR, "Cannot yield from finally in a force-closed generator");
    8095             :         }
    8096             : 
    8097             :         /* Destroy the previously yielded value */
    8098          28 :         zval_ptr_dtor(&generator->value);
    8099             : 
    8100             :         /* Destroy the previously yielded key */
    8101          28 :         zval_ptr_dtor(&generator->key);
    8102             : 
    8103             :         /* Set the new yielded value */
    8104             :         if (IS_CONST != IS_UNUSED) {
    8105             : 
    8106             : 
    8107          28 :                 if (EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE) {
    8108             :                         /* Constants and temporary variables aren't yieldable by reference,
    8109             :                          * but we still allow them with a notice. */
    8110             :                         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    8111             :                                 zval *value;
    8112             : 
    8113           1 :                                 zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    8114             : 
    8115           1 :                                 value = opline->op1.zv;
    8116           1 :                                 ZVAL_COPY_VALUE(&generator->value, value);
    8117           1 :                                 if (Z_OPT_REFCOUNTED(generator->value)) Z_SET_REFCOUNT(generator->value, 1);
    8118             : 
    8119             :                                 /* Temporary variables don't need ctor copying */
    8120             :                                 if (IS_CONST != IS_TMP_VAR) {
    8121           1 :                                         zval_opt_copy_ctor(&generator->value);
    8122             :                                 }
    8123             :                         } else {
    8124             :                                 zval *value_ptr = NULL;
    8125             : 
    8126             :                                 if (IS_CONST == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
    8127             :                                         zend_error_noreturn(E_ERROR, "Cannot yield string offsets by reference");
    8128             :                                 }
    8129             : 
    8130             :                                 /* If a function call result is yielded and the function did
    8131             :                                  * not return by reference we throw a notice. */
    8132             :                                 if (IS_CONST == IS_VAR &&
    8133             :                                     (value_ptr == &EG(uninitialized_zval) ||
    8134             :                                      (opline->extended_value == ZEND_RETURNS_FUNCTION &&
    8135             :                                       !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
    8136             :                                         zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    8137             :                                 } else {
    8138             :                                         ZVAL_MAKE_REF(value_ptr);
    8139             :                                 }
    8140             :                                 ZVAL_COPY(&generator->value, value_ptr);
    8141             : 
    8142             :                         }
    8143             :                 } else {
    8144          27 :                         zval *value = opline->op1.zv;
    8145             : 
    8146             :                         /* Consts, temporary variables and references need copying */
    8147             :                         if (IS_CONST == IS_CONST) {
    8148          27 :                                 ZVAL_DUP(&generator->value, value);
    8149             :                         } else if (IS_CONST == IS_TMP_VAR) {
    8150             :                                 ZVAL_COPY_VALUE(&generator->value, value);
    8151             :             } else if ((IS_CONST == IS_CV || IS_CONST == IS_VAR) && Z_ISREF_P(value)) {
    8152             :                                 ZVAL_DUP(&generator->value, Z_REFVAL_P(value));
    8153             : 
    8154             :                         } else {
    8155             :                                 ZVAL_COPY_VALUE(&generator->value, value);
    8156             :                                 if (IS_CONST == IS_CV) {
    8157             :                                         if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
    8158             :                                 }
    8159             :                         }
    8160             :                 }
    8161             :         } else {
    8162             :                 /* If no value was specified yield null */
    8163             :                 ZVAL_NULL(&generator->value);
    8164             :         }
    8165             : 
    8166             :         /* Set the new yielded key */
    8167          28 :         if (IS_UNUSED != IS_UNUSED) {
    8168             : 
    8169             :                 zval *key = NULL;
    8170             : 
    8171             :                 /* Consts, temporary variables and references need copying */
    8172             :                 if (IS_UNUSED == IS_CONST) {
    8173             :                         ZVAL_DUP(&generator->key, key);
    8174             :                 } else if (IS_UNUSED == IS_TMP_VAR) {
    8175             :                         ZVAL_COPY_VALUE(&generator->key, key);
    8176             :                 } else if ((IS_UNUSED == IS_VAR || IS_UNUSED == IS_CV) && Z_ISREF_P(key)) {
    8177             :                         ZVAL_DUP(&generator->key, Z_REFVAL_P(key));
    8178             : 
    8179             :                 } else {
    8180             :                         ZVAL_COPY_VALUE(&generator->key, key);
    8181             :                         if (IS_UNUSED == IS_CV) {
    8182             :                                 if (Z_OPT_REFCOUNTED_P(key)) Z_ADDREF_P(key);
    8183             :                         }
    8184             :                 }
    8185             : 
    8186             :                 if (Z_TYPE(generator->key) == IS_LONG
    8187             :                     && Z_LVAL(generator->key) > generator->largest_used_integer_key
    8188             :                 ) {
    8189             :                         generator->largest_used_integer_key = Z_LVAL(generator->key);
    8190             :                 }
    8191             :         } else {
    8192             :                 /* If no key was specified we use auto-increment keys */
    8193          28 :                 generator->largest_used_integer_key++;
    8194          28 :                 ZVAL_LONG(&generator->key, generator->largest_used_integer_key);
    8195             :         }
    8196             : 
    8197          28 :         if (RETURN_VALUE_USED(opline)) {
    8198             :                 /* If the return value of yield is used set the send
    8199             :                  * target and initialize it to NULL */
    8200           2 :                 generator->send_target = EX_VAR(opline->result.var);
    8201           2 :                 ZVAL_NULL(generator->send_target);
    8202             :         } else {
    8203          26 :                 generator->send_target = NULL;
    8204             :         }
    8205             : 
    8206             :         /* We increment to the next op, so we are at the correct position when the
    8207             :          * generator is resumed. */
    8208          28 :         ZEND_VM_INC_OPCODE();
    8209             : 
    8210             :         /* The GOTO VM uses a local opline variable. We need to set the opline
    8211             :          * variable in execute_data so we don't resume at an old position. */
    8212             :         SAVE_OPLINE();
    8213             : 
    8214          28 :         ZEND_VM_RETURN();
    8215             : }
    8216             : 
    8217          54 : static int ZEND_FASTCALL  ZEND_ADD_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8218             : {
    8219          54 :         USE_OPLINE
    8220             : 
    8221             : 
    8222             :         SAVE_OPLINE();
    8223         108 :         fast_add_function(EX_VAR(opline->result.var),
    8224             :                 opline->op1.zv,
    8225             :                 _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    8226             : 
    8227             : 
    8228             :         CHECK_EXCEPTION();
    8229          54 :         ZEND_VM_NEXT_OPCODE();
    8230             : }
    8231             : 
    8232         118 : static int ZEND_FASTCALL  ZEND_SUB_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8233             : {
    8234         118 :         USE_OPLINE
    8235             : 
    8236             : 
    8237             :         SAVE_OPLINE();
    8238         236 :         fast_sub_function(EX_VAR(opline->result.var),
    8239             :                 opline->op1.zv,
    8240             :                 _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    8241             : 
    8242             : 
    8243             :         CHECK_EXCEPTION();
    8244         118 :         ZEND_VM_NEXT_OPCODE();
    8245             : }
    8246             : 
    8247        2116 : static int ZEND_FASTCALL  ZEND_MUL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8248             : {
    8249        2116 :         USE_OPLINE
    8250             : 
    8251             : 
    8252             :         SAVE_OPLINE();
    8253        4232 :         fast_mul_function(EX_VAR(opline->result.var),
    8254             :                 opline->op1.zv,
    8255             :                 _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    8256             : 
    8257             : 
    8258             :         CHECK_EXCEPTION();
    8259        2116 :         ZEND_VM_NEXT_OPCODE();
    8260             : }
    8261             : 
    8262           3 : static int ZEND_FASTCALL  ZEND_DIV_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8263             : {
    8264           3 :         USE_OPLINE
    8265             : 
    8266             : 
    8267             :         SAVE_OPLINE();
    8268           6 :         fast_div_function(EX_VAR(opline->result.var),
    8269             :                 opline->op1.zv,
    8270             :                 _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    8271             : 
    8272             : 
    8273             :         CHECK_EXCEPTION();
    8274           3 :         ZEND_VM_NEXT_OPCODE();
    8275             : }
    8276             : 
    8277           1 : static int ZEND_FASTCALL  ZEND_MOD_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8278             : {
    8279           1 :         USE_OPLINE
    8280             : 
    8281             : 
    8282             :         SAVE_OPLINE();
    8283           2 :         fast_mod_function(EX_VAR(opline->result.var),
    8284             :                 opline->op1.zv,
    8285             :                 _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    8286             : 
    8287             : 
    8288             :         CHECK_EXCEPTION();
    8289           1 :         ZEND_VM_NEXT_OPCODE();
    8290             : }
    8291             : 
    8292           1 : static int ZEND_FASTCALL  ZEND_SL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8293             : {
    8294           1 :         USE_OPLINE
    8295             : 
    8296             : 
    8297             :         SAVE_OPLINE();
    8298           2 :         shift_left_function(EX_VAR(opline->result.var),
    8299             :                 opline->op1.zv,
    8300             :                 _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    8301             : 
    8302             : 
    8303             :         CHECK_EXCEPTION();
    8304           1 :         ZEND_VM_NEXT_OPCODE();
    8305             : }
    8306             : 
    8307           0 : static int ZEND_FASTCALL  ZEND_SR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8308             : {
    8309           0 :         USE_OPLINE
    8310             : 
    8311             : 
    8312             :         SAVE_OPLINE();
    8313           0 :         shift_right_function(EX_VAR(opline->result.var),
    8314             :                 opline->op1.zv,
    8315             :                 _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    8316             : 
    8317             : 
    8318             :         CHECK_EXCEPTION();
    8319           0 :         ZEND_VM_NEXT_OPCODE();
    8320             : }
    8321             : 
    8322      320873 : static int ZEND_FASTCALL  ZEND_CONCAT_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8323             : {
    8324      320873 :         USE_OPLINE
    8325             : 
    8326             : 
    8327             :         SAVE_OPLINE();
    8328      641746 :         concat_function(EX_VAR(opline->result.var),
    8329             :                 opline->op1.zv,
    8330             :                 _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    8331             : 
    8332             : 
    8333             :         CHECK_EXCEPTION();
    8334      320873 :         ZEND_VM_NEXT_OPCODE();
    8335             : }
    8336             : 
    8337          41 : static int ZEND_FASTCALL  ZEND_IS_IDENTICAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8338             : {
    8339          41 :         USE_OPLINE
    8340             : 
    8341             : 
    8342             :         SAVE_OPLINE();
    8343          82 :         fast_is_identical_function(EX_VAR(opline->result.var),
    8344             :                 opline->op1.zv,
    8345             :                 _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    8346             : 
    8347             : 
    8348             :         CHECK_EXCEPTION();
    8349          41 :         ZEND_VM_NEXT_OPCODE();
    8350             : }
    8351             : 
    8352         139 : static int ZEND_FASTCALL  ZEND_IS_NOT_IDENTICAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8353             : {
    8354         139 :         USE_OPLINE
    8355             : 
    8356         139 :         zval *result = EX_VAR(opline->result.var);
    8357             : 
    8358             :         SAVE_OPLINE();
    8359         278 :         fast_is_not_identical_function(result,
    8360             :                 opline->op1.zv,
    8361             :                 _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    8362             : 
    8363             : 
    8364             :         CHECK_EXCEPTION();
    8365         139 :         ZEND_VM_NEXT_OPCODE();
    8366             : }
    8367             : 
    8368        3148 : static int ZEND_FASTCALL  ZEND_IS_EQUAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8369             : {
    8370        3148 :         USE_OPLINE
    8371             : 
    8372        3148 :         zval *result = EX_VAR(opline->result.var);
    8373             : 
    8374             :         SAVE_OPLINE();
    8375        6296 :         fast_equal_function(result,
    8376             :                 opline->op1.zv,
    8377             :                 _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    8378             : 
    8379             : 
    8380             :         CHECK_EXCEPTION();
    8381        3148 :         ZEND_VM_NEXT_OPCODE();
    8382             : }
    8383             : 
    8384         147 : static int ZEND_FASTCALL  ZEND_IS_NOT_EQUAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8385             : {
    8386         147 :         USE_OPLINE
    8387             : 
    8388         147 :         zval *result = EX_VAR(opline->result.var);
    8389             : 
    8390             :         SAVE_OPLINE();
    8391         294 :         fast_not_equal_function(result,
    8392             :                 opline->op1.zv,
    8393             :                 _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    8394             : 
    8395             : 
    8396             :         CHECK_EXCEPTION();
    8397         147 :         ZEND_VM_NEXT_OPCODE();
    8398             : }
    8399             : 
    8400     1017333 : static int ZEND_FASTCALL  ZEND_IS_SMALLER_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8401             : {
    8402     1017333 :         USE_OPLINE
    8403             : 
    8404     1017333 :         zval *result = EX_VAR(opline->result.var);
    8405             : 
    8406             :         SAVE_OPLINE();
    8407     2034666 :         fast_is_smaller_function(result,
    8408             :                 opline->op1.zv,
    8409             :                 _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    8410             : 
    8411             : 
    8412             :         CHECK_EXCEPTION();
    8413     1017333 :         ZEND_VM_NEXT_OPCODE();
    8414             : }
    8415             : 
    8416      158333 : static int ZEND_FASTCALL  ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8417             : {
    8418      158333 :         USE_OPLINE
    8419             : 
    8420      158333 :         zval *result = EX_VAR(opline->result.var);
    8421             : 
    8422             :         SAVE_OPLINE();
    8423      316666 :         fast_is_smaller_or_equal_function(result,
    8424             :                 opline->op1.zv,
    8425             :                 _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    8426             : 
    8427             : 
    8428             :         CHECK_EXCEPTION();
    8429      158333 :         ZEND_VM_NEXT_OPCODE();
    8430             : }
    8431             : 
    8432           1 : static int ZEND_FASTCALL  ZEND_BW_OR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8433             : {
    8434           1 :         USE_OPLINE
    8435             : 
    8436             : 
    8437             :         SAVE_OPLINE();
    8438           2 :         bitwise_or_function(EX_VAR(opline->result.var),
    8439             :                 opline->op1.zv,
    8440             :                 _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    8441             : 
    8442             : 
    8443             :         CHECK_EXCEPTION();
    8444           1 :         ZEND_VM_NEXT_OPCODE();
    8445             : }
    8446             : 
    8447           1 : static int ZEND_FASTCALL  ZEND_BW_AND_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8448             : {
    8449           1 :         USE_OPLINE
    8450             : 
    8451             : 
    8452             :         SAVE_OPLINE();
    8453           2 :         bitwise_and_function(EX_VAR(opline->result.var),
    8454             :                 opline->op1.zv,
    8455             :                 _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    8456             : 
    8457             : 
    8458             :         CHECK_EXCEPTION();
    8459           1 :         ZEND_VM_NEXT_OPCODE();
    8460             : }
    8461             : 
    8462           1 : static int ZEND_FASTCALL  ZEND_BW_XOR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8463             : {
    8464           1 :         USE_OPLINE
    8465             : 
    8466             : 
    8467             :         SAVE_OPLINE();
    8468           2 :         bitwise_xor_function(EX_VAR(opline->result.var),
    8469             :                 opline->op1.zv,
    8470             :                 _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    8471             : 
    8472             : 
    8473             :         CHECK_EXCEPTION();
    8474           1 :         ZEND_VM_NEXT_OPCODE();
    8475             : }
    8476             : 
    8477           0 : static int ZEND_FASTCALL  ZEND_BOOL_XOR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8478             : {
    8479           0 :         USE_OPLINE
    8480             : 
    8481             : 
    8482             :         SAVE_OPLINE();
    8483           0 :         boolean_xor_function(EX_VAR(opline->result.var),
    8484             :                 opline->op1.zv,
    8485             :                 _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    8486             : 
    8487             : 
    8488             :         CHECK_EXCEPTION();
    8489           0 :         ZEND_VM_NEXT_OPCODE();
    8490             : }
    8491             : 
    8492           0 : static int ZEND_FASTCALL  ZEND_FETCH_DIM_R_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8493             : {
    8494           0 :         USE_OPLINE
    8495             : 
    8496             :         zval *container;
    8497             : 
    8498             :         SAVE_OPLINE();
    8499           0 :         container = opline->op1.zv;
    8500           0 :         zend_fetch_dimension_address_read_R(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC), IS_CV TSRMLS_CC);
    8501             : 
    8502             : 
    8503             :         CHECK_EXCEPTION();
    8504           0 :         ZEND_VM_NEXT_OPCODE();
    8505             : }
    8506             : 
    8507           0 : static int ZEND_FASTCALL  ZEND_FETCH_DIM_IS_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8508             : {
    8509           0 :         USE_OPLINE
    8510             : 
    8511             :         zval *container;
    8512             : 
    8513             :         SAVE_OPLINE();
    8514           0 :         container = opline->op1.zv;
    8515           0 :         zend_fetch_dimension_address_read_IS(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC), IS_CV TSRMLS_CC);
    8516             : 
    8517             : 
    8518             :         CHECK_EXCEPTION();
    8519           0 :         ZEND_VM_NEXT_OPCODE();
    8520             : }
    8521             : 
    8522           0 : static int ZEND_FASTCALL  ZEND_FETCH_DIM_FUNC_ARG_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8523             : {
    8524           0 :         USE_OPLINE
    8525             :         zval *container;
    8526             :         zend_free_op free_op1;
    8527             : 
    8528             :         SAVE_OPLINE();
    8529             : 
    8530           0 :         if (zend_is_by_ref_func_arg_fetch(opline, EX(call) TSRMLS_CC)) {
    8531             :         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    8532           0 :             zend_error_noreturn(E_ERROR, "Cannot use temporary expression in write context");
    8533             :         }
    8534             :                 container = NULL;
    8535             :                 if (IS_CONST == IS_VAR && UNEXPECTED(container == NULL)) {
    8536             :                         zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
    8537             :                 }
    8538             :                 ZVAL_DEREF(container);
    8539             :                 zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC), IS_CV TSRMLS_CC);
    8540             :                 if (IS_CONST == IS_VAR && READY_TO_DESTROY(free_op1)) {
    8541             :                         EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
    8542             :                 }
    8543             : 
    8544             : 
    8545             :         } else {
    8546           0 :                 if (IS_CV == IS_UNUSED) {
    8547             :                         zend_error_noreturn(E_ERROR, "Cannot use [] for reading");
    8548             :                 }
    8549           0 :                 container = opline->op1.zv;
    8550           0 :                 zend_fetch_dimension_address_read_R(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC), IS_CV TSRMLS_CC);
    8551             : 
    8552             : 
    8553             :         }
    8554             :         CHECK_EXCEPTION();
    8555           0 :         ZEND_VM_NEXT_OPCODE();
    8556             : }
    8557             : 
    8558           0 : static int ZEND_FASTCALL  ZEND_FETCH_OBJ_R_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8559             : {
    8560           0 :         USE_OPLINE
    8561             : 
    8562             :         zval *container;
    8563             : 
    8564             :         zval *offset;
    8565             : 
    8566             :         SAVE_OPLINE();
    8567           0 :         container = opline->op1.zv;
    8568           0 :         offset  = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
    8569             : 
    8570           0 :         if ((IS_CONST != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT)) ||
    8571           0 :             UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
    8572           0 :                 zend_error(E_NOTICE, "Trying to get property of non-object");
    8573           0 :                 ZVAL_NULL(EX_VAR(opline->result.var));
    8574             :         } else {
    8575             :                 zval *retval;
    8576             : 
    8577             :                 /* here we are sure we are dealing with an object */
    8578             :                 do {
    8579           0 :                         if (IS_CV == IS_CONST &&
    8580             :                                 EXPECTED(Z_OBJCE_P(container) == CACHED_PTR(Z_CACHE_SLOT_P(offset)))) {
    8581             :                                 zend_property_info *prop_info = CACHED_PTR(Z_CACHE_SLOT_P(offset) + 1);
    8582             :                                 zend_object *zobj = Z_OBJ_P(container);
    8583             : 
    8584             :                                 if (EXPECTED(prop_info)) {
    8585             :                                         retval = OBJ_PROP(zobj, prop_info->offset);
    8586             :                                         if (EXPECTED(Z_TYPE_P(retval) != IS_UNDEF)) {
    8587             :                                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    8588             :                                                 break;
    8589             :                                         }
    8590             :                                 } else if (EXPECTED(zobj->properties != NULL)) {
    8591             :                                         retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
    8592             :                                         if (EXPECTED(retval)) {
    8593             :                                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    8594             :                                                 break;
    8595             :                                         }
    8596             :                                 }
    8597             :                         }
    8598             : 
    8599           0 :                         retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_R, ((IS_CV == IS_CONST) ? (EX(run_time_cache) + Z_CACHE_SLOT_P(offset)) : NULL), EX_VAR(opline->result.var) TSRMLS_CC);
    8600             : 
    8601           0 :                         if (retval != EX_VAR(opline->result.var)) {
    8602           0 :                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    8603             :                         }
    8604             :                 } while (0);
    8605             :         }
    8606             : 
    8607             : 
    8608             :         CHECK_EXCEPTION();
    8609           0 :         ZEND_VM_NEXT_OPCODE();
    8610             : }
    8611             : 
    8612           0 : static int ZEND_FASTCALL  ZEND_FETCH_OBJ_IS_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8613             : {
    8614           0 :         USE_OPLINE
    8615             : 
    8616             :         zval *container;
    8617             : 
    8618             :         zval *offset;
    8619             : 
    8620             :         SAVE_OPLINE();
    8621           0 :         container = opline->op1.zv;
    8622           0 :         offset  = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
    8623             : 
    8624           0 :         if ((IS_CONST != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT)) ||
    8625           0 :             UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
    8626           0 :                 ZVAL_NULL(EX_VAR(opline->result.var));
    8627             :         } else {
    8628             :                 zval *retval;
    8629             : 
    8630             :                 /* here we are sure we are dealing with an object */
    8631             :                 do {
    8632           0 :                         if (IS_CV == IS_CONST &&
    8633             :                                 EXPECTED(Z_OBJCE_P(container) == CACHED_PTR(Z_CACHE_SLOT_P(offset)))) {
    8634             :                                 zend_property_info *prop_info = CACHED_PTR(Z_CACHE_SLOT_P(offset) + 1);
    8635             :                                 zend_object *zobj = Z_OBJ_P(container);
    8636             : 
    8637             :                                 if (EXPECTED(prop_info)) {
    8638             :                                         retval = OBJ_PROP(zobj, prop_info->offset);
    8639             :                                         if (EXPECTED(Z_TYPE_P(retval) != IS_UNDEF)) {
    8640             :                                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    8641             :                                                 break;
    8642             :                                         }
    8643             :                                 } else if (EXPECTED(zobj->properties != NULL)) {
    8644             :                                         retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
    8645             :                                         if (EXPECTED(retval)) {
    8646             :                                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    8647             :                                                 break;
    8648             :                                         }
    8649             :                                 }
    8650             :                         }
    8651             : 
    8652           0 :                         retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_IS, ((IS_CV == IS_CONST) ? (EX(run_time_cache) + Z_CACHE_SLOT_P(offset)) : NULL), EX_VAR(opline->result.var) TSRMLS_CC);
    8653             : 
    8654           0 :                         if (retval != EX_VAR(opline->result.var)) {
    8655           0 :                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    8656             :                         }
    8657             :                 } while (0);
    8658             :         }
    8659             : 
    8660             : 
    8661             :         CHECK_EXCEPTION();
    8662           0 :         ZEND_VM_NEXT_OPCODE();
    8663             : }
    8664             : 
    8665           0 : static int ZEND_FASTCALL  ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8666             : {
    8667           0 :         USE_OPLINE
    8668             :         zval *container;
    8669             : 
    8670           0 :         if (zend_is_by_ref_func_arg_fetch(opline, EX(call) TSRMLS_CC)) {
    8671             :                 /* Behave like FETCH_OBJ_W */
    8672             :                 zend_free_op free_op1;
    8673             :                 zval *property;
    8674             : 
    8675             :                 SAVE_OPLINE();
    8676           0 :                 property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
    8677           0 :                 container = NULL;
    8678             : 
    8679             :         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    8680           0 :             zend_error_noreturn(E_ERROR, "Cannot use temporary expression in write context");
    8681             :         }
    8682             :                 if (IS_CONST == IS_VAR && UNEXPECTED(container == NULL)) {
    8683             :                         zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
    8684             :                 }
    8685             :                 zend_fetch_property_address(EX_VAR(opline->result.var), container, IS_CONST, property, IS_CV, ((IS_CV == IS_CONST) ? (EX(run_time_cache) + Z_CACHE_SLOT_P(property)) : NULL), BP_VAR_W TSRMLS_CC);
    8686             : 
    8687             :                 if (IS_CONST == IS_VAR && READY_TO_DESTROY(free_op1)) {
    8688             :                         EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
    8689             :                 }
    8690             : 
    8691             :                 CHECK_EXCEPTION();
    8692             :                 ZEND_VM_NEXT_OPCODE();
    8693             :         } else {
    8694           0 :                 return ZEND_FETCH_OBJ_R_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    8695             :         }
    8696             : }
    8697             : 
    8698          10 : static int ZEND_FASTCALL  ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8699             : {
    8700          10 :         USE_OPLINE
    8701             :         zval *function_name;
    8702             :         zend_class_entry *ce;
    8703             :         zend_object *object;
    8704             :         zend_function *fbc;
    8705             : 
    8706             :         SAVE_OPLINE();
    8707             : 
    8708             :         if (IS_CONST == IS_CONST) {
    8709             :                 /* no function found. try a static method in class */
    8710          10 :                 if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op1.zv))) {
    8711           2 :                         ce = CACHED_PTR(Z_CACHE_SLOT_P(opline->op1.zv));
    8712             :                 } else {
    8713           8 :                         ce = zend_fetch_class_by_name(Z_STR_P(opline->op1.zv), opline->op1.zv + 1, ZEND_FETCH_CLASS_DEFAULT TSRMLS_CC);
    8714           8 :                         if (UNEXPECTED(EG(exception) != NULL)) {
    8715           0 :                                 HANDLE_EXCEPTION();
    8716             :                         }
    8717           8 :                         if (UNEXPECTED(ce == NULL)) {
    8718           0 :                                 zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op1.zv));
    8719             :                         }
    8720           8 :                         CACHE_PTR(Z_CACHE_SLOT_P(opline->op1.zv), ce);
    8721             :                 }
    8722             :         } else {
    8723             :                 ce = Z_CE_P(EX_VAR(opline->op1.var));
    8724             :         }
    8725             : 
    8726          10 :         if (IS_CONST == IS_CONST &&
    8727             :             IS_CV == IS_CONST &&
    8728             :             CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv))) {
    8729             :                 fbc = CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv));
    8730          10 :         } else if (IS_CONST != IS_CONST &&
    8731             :                    IS_CV == IS_CONST &&
    8732             :                    (fbc = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(opline->op2.zv), ce))) {
    8733             :                 /* do nothing */
    8734             :         } else if (IS_CV != IS_UNUSED) {
    8735             : 
    8736             : 
    8737          20 :                 function_name = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
    8738             :                 if (IS_CV != IS_CONST) {
    8739          10 :                         if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
    8740           2 :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    8741           1 :                                         HANDLE_EXCEPTION();
    8742             :                                 }
    8743           1 :                                 zend_error_noreturn(E_ERROR, "Function name must be a string");
    8744             :                         }
    8745             :                 }
    8746             : 
    8747           8 :                 if (ce->get_static_method) {
    8748           0 :                         fbc = ce->get_static_method(ce, Z_STR_P(function_name) TSRMLS_CC);
    8749             :                 } else {
    8750           8 :                         fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_CV == IS_CONST) ? (opline->op2.zv + 1) : NULL) TSRMLS_CC);
    8751             :                 }
    8752           8 :                 if (UNEXPECTED(fbc == NULL)) {
    8753           0 :                         zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", ce->name->val, Z_STRVAL_P(function_name));
    8754             :                 }
    8755           8 :                 if (IS_CV == IS_CONST &&
    8756             :                     EXPECTED(fbc->type <= ZEND_USER_FUNCTION) &&
    8757             :                     EXPECTED((fbc->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0)) {
    8758             :                         if (IS_CONST == IS_CONST) {
    8759             :                                 CACHE_PTR(Z_CACHE_SLOT_P(function_name), fbc);
    8760             :                         } else {
    8761             :                                 CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), ce, fbc);
    8762             :                         }
    8763             :                 }
    8764             :                 if (IS_CV != IS_CONST) {
    8765             : 
    8766             :                 }
    8767             :         } else {
    8768             :                 if (UNEXPECTED(ce->constructor == NULL)) {
    8769             :                         zend_error_noreturn(E_ERROR, "Cannot call constructor");
    8770             :                 }
    8771             :                 if (Z_OBJ(EX(This)) && Z_OBJ(EX(This))->ce != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
    8772             :                         zend_error_noreturn(E_ERROR, "Cannot call private %s::__construct()", ce->name->val);
    8773             :                 }
    8774             :                 fbc = ce->constructor;
    8775             :         }
    8776             : 
    8777           8 :         object = NULL;
    8778           8 :         if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
    8779           1 :                 if (Z_OBJ(EX(This))) {
    8780           0 :                         object = Z_OBJ(EX(This));
    8781           0 :                         GC_REFCOUNT(object)++;
    8782             :                 }
    8783           1 :                 if (!object ||
    8784           0 :                     !instanceof_function(object->ce, ce TSRMLS_CC)) {
    8785             :                     /* We are calling method of the other (incompatible) class,
    8786             :                        but passing $this. This is done for compatibility with php-4. */
    8787           1 :                         if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
    8788           3 :                                 zend_error(
    8789             :                                         object ? E_DEPRECATED : E_STRICT,
    8790             :                                         "Non-static method %s::%s() should not be called statically%s",
    8791           2 :                                         fbc->common.scope->name->val, fbc->common.function_name->val,
    8792             :                                         object ? ", assuming $this from incompatible context" : "");
    8793             :                         } else {
    8794             :                                 /* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
    8795           0 :                                 zend_error_noreturn(
    8796             :                                         E_ERROR,
    8797             :                                         "Non-static method %s::%s() cannot be called statically%s",
    8798           0 :                                         fbc->common.scope->name->val, fbc->common.function_name->val,
    8799             :                                         object ? ", assuming $this from incompatible context" : "");
    8800             :                         }
    8801             :                 }
    8802             :         }
    8803             : 
    8804           8 :         if (IS_CONST != IS_CONST) {
    8805             :                 /* previous opcode is ZEND_FETCH_CLASS */
    8806             :                 if ((opline-1)->extended_value == ZEND_FETCH_CLASS_PARENT || (opline-1)->extended_value == ZEND_FETCH_CLASS_SELF) {
    8807             :                         ce = EX(called_scope);
    8808             :                 }
    8809             :         }
    8810             : 
    8811          24 :         EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
    8812           8 :                 fbc, opline->extended_value, ce, object, EX(call) TSRMLS_CC);
    8813             : 
    8814           8 :         if (IS_CV == IS_UNUSED) {
    8815             :                 EX(call)->return_value = NULL;
    8816             :         }
    8817             : 
    8818             :         CHECK_EXCEPTION();
    8819           8 :         ZEND_VM_NEXT_OPCODE();
    8820             : }
    8821             : 
    8822          94 : static int ZEND_FASTCALL  ZEND_INIT_USER_CALL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8823             : {
    8824          94 :         USE_OPLINE
    8825             : 
    8826         188 :         zval *function_name = _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
    8827             :         zend_fcall_info_cache fcc;
    8828          94 :         char *error = NULL;
    8829             :         zend_function *func;
    8830             :         zend_class_entry *called_scope;
    8831             :         zend_object *object;
    8832             : 
    8833          94 :         if (zend_is_callable_ex(function_name, NULL, 0, NULL, &fcc, &error TSRMLS_CC)) {
    8834          68 :                 if (error) {
    8835           1 :                         efree(error);
    8836             :                 }
    8837          68 :                 func = fcc.function_handler;
    8838          68 :                 if (func->common.fn_flags & ZEND_ACC_CLOSURE) {
    8839             :                         /* Delay closure destruction until its invocation */
    8840           2 :                         func->common.prototype = (zend_function*)Z_OBJ_P(function_name);
    8841             :                         Z_ADDREF_P(function_name);
    8842             :                 }
    8843          68 :                 called_scope = fcc.called_scope;
    8844          68 :                 object = fcc.object;
    8845          68 :                 if (object) {
    8846          19 :                         GC_REFCOUNT(object)++; /* For $this pointer */
    8847          52 :                 } else if (func->common.scope &&
    8848           3 :                            !(func->common.fn_flags & ZEND_ACC_STATIC)) {
    8849           1 :                         if (func->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
    8850           2 :                                 zend_error(E_STRICT,
    8851             :                                 "Non-static method %s::%s() should not be called statically",
    8852           2 :                                 func->common.scope->name->val, func->common.function_name->val);
    8853             :                         } else {
    8854           0 :                                 zend_error_noreturn(
    8855             :                                         E_ERROR,
    8856             :                                         "Non-static method %s::%s() cannot be called statically",
    8857           0 :                                         func->common.scope->name->val, func->common.function_name->val);
    8858             :                         }
    8859             :                 }
    8860             :         } else {
    8861          26 :                 zend_error(E_WARNING, "%s() expects parameter 1 to be a valid callback, %s", Z_STRVAL_P(opline->op1.zv), error);
    8862          26 :                 efree(error);
    8863          26 :                 func = (zend_function*)&zend_pass_function;
    8864          26 :                 called_scope = NULL;
    8865          26 :                 object = NULL;
    8866             :         }
    8867             : 
    8868         282 :         EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
    8869          94 :                 func, opline->extended_value, called_scope, object, EX(call) TSRMLS_CC);
    8870             : 
    8871             :         CHECK_EXCEPTION();
    8872          94 :         ZEND_VM_NEXT_OPCODE();
    8873             : }
    8874             : 
    8875        1124 : static int ZEND_FASTCALL  ZEND_CATCH_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8876             : {
    8877        1124 :         USE_OPLINE
    8878             :         zend_class_entry *ce, *catch_ce;
    8879             :         zend_object *exception;
    8880             : 
    8881             :         SAVE_OPLINE();
    8882             :         /* Check whether an exception has been thrown, if not, jump over code */
    8883        1124 :         zend_exception_restore(TSRMLS_C);
    8884        1124 :         if (EG(exception) == NULL) {
    8885           0 :                 ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[opline->extended_value]);
    8886           0 :                 ZEND_VM_CONTINUE(); /* CHECK_ME */
    8887             :         }
    8888        1124 :         if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op1.zv))) {
    8889         298 :                 catch_ce = CACHED_PTR(Z_CACHE_SLOT_P(opline->op1.zv));
    8890             :         } else {
    8891         826 :                 catch_ce = zend_fetch_class_by_name(Z_STR_P(opline->op1.zv), opline->op1.zv + 1, ZEND_FETCH_CLASS_NO_AUTOLOAD TSRMLS_CC);
    8892             : 
    8893         826 :                 CACHE_PTR(Z_CACHE_SLOT_P(opline->op1.zv), catch_ce);
    8894             :         }
    8895        1124 :         ce = EG(exception)->ce;
    8896             : 
    8897             : #ifdef HAVE_DTRACE
    8898             :         if (DTRACE_EXCEPTION_CAUGHT_ENABLED()) {
    8899             :                 DTRACE_EXCEPTION_CAUGHT((char *)ce->name);
    8900             :         }
    8901             : #endif /* HAVE_DTRACE */
    8902             : 
    8903        1124 :         if (ce != catch_ce) {
    8904         516 :                 if (!instanceof_function(ce, catch_ce TSRMLS_CC)) {
    8905          11 :                         if (opline->result.num) {
    8906           6 :                                 zend_throw_exception_internal(NULL TSRMLS_CC);
    8907           6 :                                 HANDLE_EXCEPTION();
    8908             :                         }
    8909           5 :                         ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[opline->extended_value]);
    8910           5 :                         ZEND_VM_CONTINUE(); /* CHECK_ME */
    8911             :                 }
    8912             :         }
    8913             : 
    8914        1113 :         exception = EG(exception);
    8915        1113 :         if (Z_REFCOUNTED_P(EX_VAR(opline->op2.var))) {
    8916         513 :                 zval_ptr_dtor(EX_VAR(opline->op2.var));
    8917             :         }
    8918        1113 :         ZVAL_OBJ(EX_VAR(opline->op2.var), EG(exception));
    8919        1113 :         if (UNEXPECTED(EG(exception) != exception)) {
    8920           1 :                 GC_REFCOUNT(EG(exception))++;
    8921           1 :                 HANDLE_EXCEPTION();
    8922             :         } else {
    8923        1112 :                 EG(exception) = NULL;
    8924        1112 :                 ZEND_VM_NEXT_OPCODE();
    8925             :         }
    8926             : }
    8927             : 
    8928           0 : static int ZEND_FASTCALL  ZEND_CASE_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8929             : {
    8930           0 :         USE_OPLINE
    8931             : 
    8932           0 :         zval *result = EX_VAR(opline->result.var);
    8933             : 
    8934             :         SAVE_OPLINE();
    8935           0 :         fast_equal_function(result,
    8936             :                  opline->op1.zv,
    8937             :                  _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    8938             : 
    8939             :         CHECK_EXCEPTION();
    8940           0 :         ZEND_VM_NEXT_OPCODE();
    8941             : }
    8942             : 
    8943          70 : static int ZEND_FASTCALL  ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8944             : {
    8945          70 :         USE_OPLINE
    8946             : 
    8947             :         zval *expr_ptr, new_expr;
    8948             : 
    8949             :         SAVE_OPLINE();
    8950          70 :         if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) &&
    8951             :             (opline->extended_value & ZEND_ARRAY_ELEMENT_REF)) {
    8952             :                 expr_ptr = NULL;
    8953             :                 if (IS_CONST == IS_VAR && UNEXPECTED(expr_ptr == NULL)) {
    8954             :                         zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets");
    8955             :                 }
    8956             :                 ZVAL_MAKE_REF(expr_ptr);
    8957             :                 Z_ADDREF_P(expr_ptr);
    8958             : 
    8959             :         } else {
    8960          70 :                 expr_ptr = opline->op1.zv;
    8961          70 :                 if (IS_CONST == IS_TMP_VAR) {
    8962             :                         ZVAL_COPY_VALUE(&new_expr, expr_ptr);
    8963             :                         expr_ptr = &new_expr;
    8964             :                 } else if (IS_CONST == IS_CONST) {
    8965          70 :                         if (!Z_IMMUTABLE_P(expr_ptr)) {
    8966          70 :                                 ZVAL_DUP(&new_expr, expr_ptr);
    8967          70 :                                 expr_ptr = &new_expr;
    8968             :                         }
    8969             :                 } else if ((IS_CONST == IS_CV || IS_CONST == IS_VAR) && Z_ISREF_P(expr_ptr)) {
    8970             :                         expr_ptr = Z_REFVAL_P(expr_ptr);
    8971             :                         if (Z_REFCOUNTED_P(expr_ptr)) Z_ADDREF_P(expr_ptr);
    8972             : 
    8973             :                 } else if (IS_CONST == IS_CV && Z_REFCOUNTED_P(expr_ptr)) {
    8974             :                         Z_ADDREF_P(expr_ptr);
    8975             :                 }
    8976             :         }
    8977             : 
    8978             :         if (IS_CV != IS_UNUSED) {
    8979             : 
    8980         140 :                 zval *offset = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
    8981             :                 zend_string *str;
    8982             :                 zend_ulong hval;
    8983             : 
    8984             : add_again:
    8985          71 :                 switch (Z_TYPE_P(offset)) {
    8986             :                         case IS_DOUBLE:
    8987           0 :                                 hval = zend_dval_to_lval(Z_DVAL_P(offset));
    8988           0 :                                 goto num_index;
    8989             :                         case IS_LONG:
    8990           4 :                                 hval = Z_LVAL_P(offset);
    8991             : num_index:
    8992           4 :                                 zend_hash_index_update(Z_ARRVAL_P(EX_VAR(opline->result.var)), hval, expr_ptr);
    8993           4 :                                 break;
    8994             :                         case IS_STRING:
    8995          56 :                                 str = Z_STR_P(offset);
    8996             :                                 if (IS_CV != IS_CONST) {
    8997         112 :                                         if (ZEND_HANDLE_NUMERIC(str, hval)) {
    8998           0 :                                                 goto num_index;
    8999             :                                         }
    9000             :                                 }
    9001             : str_index:
    9002          56 :                                 zend_hash_update(Z_ARRVAL_P(EX_VAR(opline->result.var)), str, expr_ptr);
    9003          56 :                                 break;
    9004             :                         case IS_NULL:
    9005           0 :                                 str = STR_EMPTY_ALLOC();
    9006           0 :                                 goto str_index;
    9007             :                         case IS_FALSE:
    9008           0 :                                 hval = 0;
    9009           0 :                                 goto num_index;
    9010             :                         case IS_TRUE:
    9011           0 :                                 hval = 1;
    9012           0 :                                 goto num_index;
    9013             :                         case IS_REFERENCE:
    9014           1 :                                 offset = Z_REFVAL_P(offset);
    9015           1 :                                 goto add_again;
    9016             :                                 break;
    9017             :                         default:
    9018          10 :                                 zend_error(E_WARNING, "Illegal offset type");
    9019             :                                 zval_ptr_dtor(expr_ptr);
    9020             :                                 /* do nothing */
    9021             :                                 break;
    9022             :                 }
    9023             : 
    9024             :         } else {
    9025             :                 zend_hash_next_index_insert(Z_ARRVAL_P(EX_VAR(opline->result.var)), expr_ptr);
    9026             :         }
    9027             :         CHECK_EXCEPTION();
    9028          70 :         ZEND_VM_NEXT_OPCODE();
    9029             : }
    9030             : 
    9031           6 : static int ZEND_FASTCALL  ZEND_INIT_ARRAY_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9032             : {
    9033             :         zval *array;
    9034             :         uint32_t size;
    9035           6 :         USE_OPLINE
    9036             : 
    9037           6 :         array = EX_VAR(opline->result.var);
    9038             :         if (IS_CONST != IS_UNUSED) {
    9039           6 :                 size = opline->extended_value >> ZEND_ARRAY_SIZE_SHIFT;
    9040             :         } else {
    9041             :                 size = 0;
    9042             :         }
    9043           6 :         ZVAL_NEW_ARR(array);
    9044           6 :         zend_hash_init(Z_ARRVAL_P(array), size, NULL, ZVAL_PTR_DTOR, 0);
    9045             : 
    9046             :         if (IS_CONST != IS_UNUSED) {
    9047             :                 /* Explicitly initialize array as not-packed if flag is set */
    9048           6 :                 if (opline->extended_value & ZEND_ARRAY_NOT_PACKED) {
    9049           0 :                         zend_hash_real_init(Z_ARRVAL_P(array), 0);
    9050             :                 }
    9051             :         }
    9052             : 
    9053           6 :         if (IS_CONST == IS_UNUSED) {
    9054             :                 ZEND_VM_NEXT_OPCODE();
    9055             : #if 0 || IS_CONST != IS_UNUSED
    9056             :         } else {
    9057           6 :                 return ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    9058             : #endif
    9059             :         }
    9060             : }
    9061             : 
    9062           0 : static int ZEND_FASTCALL  ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9063             : {
    9064           0 :         USE_OPLINE
    9065             : 
    9066             :         zval *container;
    9067             :         int result;
    9068             :         zend_ulong hval;
    9069             :         zval *offset;
    9070             : 
    9071             :         SAVE_OPLINE();
    9072           0 :         container = opline->op1.zv;
    9073           0 :         offset = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
    9074             : 
    9075           0 :         if (IS_CONST != IS_UNUSED && EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
    9076           0 :                 HashTable *ht = Z_ARRVAL_P(container);
    9077             :                 zval *value;
    9078             :                 zend_string *str;
    9079             : 
    9080             : isset_again:
    9081           0 :                 if (EXPECTED(Z_TYPE_P(offset) == IS_STRING)) {
    9082           0 :                         str = Z_STR_P(offset);
    9083             :                         if (IS_CV != IS_CONST) {
    9084           0 :                                 if (ZEND_HANDLE_NUMERIC(str, hval)) {
    9085           0 :                                         goto num_index_prop;
    9086             :                                 }
    9087             :                         }
    9088             : str_index_prop:
    9089           0 :                         value = zend_hash_find_ind(ht, str);
    9090           0 :                 } else if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
    9091           0 :                         hval = Z_LVAL_P(offset);
    9092             : num_index_prop:
    9093           0 :                         value = zend_hash_index_find(ht, hval);
    9094             :                 } else {
    9095           0 :                         switch (Z_TYPE_P(offset)) {
    9096             :                                 case IS_DOUBLE:
    9097           0 :                                         hval = zend_dval_to_lval(Z_DVAL_P(offset));
    9098           0 :                                         goto num_index_prop;
    9099             :                                 case IS_NULL:
    9100           0 :                                         str = STR_EMPTY_ALLOC();
    9101           0 :                                         goto str_index_prop;
    9102             :                                 case IS_FALSE:
    9103           0 :                                         hval = 0;
    9104           0 :                                         goto num_index_prop;
    9105             :                                 case IS_TRUE:
    9106           0 :                                         hval = 1;
    9107           0 :                                         goto num_index_prop;
    9108             :                                 case IS_RESOURCE:
    9109           0 :                                         hval = Z_RES_HANDLE_P(offset);
    9110           0 :                                         goto num_index_prop;
    9111             :                                 case IS_REFERENCE:
    9112           0 :                                         offset = Z_REFVAL_P(offset);
    9113           0 :                                         goto isset_again;
    9114             :                                 default:
    9115           0 :                                         zend_error(E_WARNING, "Illegal offset type in isset or empty");
    9116           0 :                                         value = NULL;
    9117             :                                         break;
    9118             :                         }
    9119             :                 }
    9120             : 
    9121           0 :                 if (opline->extended_value & ZEND_ISSET) {
    9122             :                         /* > IS_NULL means not IS_UNDEF and not IS_NULL */
    9123           0 :                         result = value != NULL && Z_TYPE_P(value) > IS_NULL &&
    9124           0 :                             (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
    9125             :                 } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
    9126           0 :                         result = (value == NULL || !i_zend_is_true(value TSRMLS_CC));
    9127             :                 }
    9128           0 :         } else if (IS_CONST == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
    9129           0 :                 if (EXPECTED(Z_OBJ_HT_P(container)->has_dimension)) {
    9130           0 :                         result = Z_OBJ_HT_P(container)->has_dimension(container, offset, (opline->extended_value & ZEND_ISSET) == 0 TSRMLS_CC);
    9131             :                 } else {
    9132           0 :                         zend_error(E_NOTICE, "Trying to check element of non-array");
    9133           0 :                         result = 0;
    9134             :                 }
    9135           0 :                 if ((opline->extended_value & ZEND_ISSET) == 0) {
    9136           0 :                         result = !result;
    9137             :                 }
    9138           0 :         } else if (EXPECTED(Z_TYPE_P(container) == IS_STRING)) { /* string offsets */
    9139             :                 zval tmp;
    9140             : 
    9141           0 :                 result = 0;
    9142           0 :                 if (UNEXPECTED(Z_TYPE_P(offset) != IS_LONG)) {
    9143             :                         if (IS_CV == IS_CV || IS_CV == IS_VAR) {
    9144           0 :                                 ZVAL_DEREF(offset);
    9145             :                         }
    9146           0 :                         if (Z_TYPE_P(offset) < IS_STRING /* simple scalar types */
    9147             :                                         || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */
    9148           0 :                                                 && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) {
    9149           0 :                                 ZVAL_DUP(&tmp, offset);
    9150           0 :                                 convert_to_long(&tmp);
    9151           0 :                                 offset = &tmp;
    9152             :                         }
    9153             :                 }
    9154           0 :                 if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
    9155           0 :                         if (offset->value.lval >= 0 && (size_t)offset->value.lval < Z_STRLEN_P(container)) {
    9156           0 :                                 if ((opline->extended_value & ZEND_ISSET) ||
    9157           0 :                                     Z_STRVAL_P(container)[offset->value.lval] != '0') {
    9158           0 :                                         result = 1;
    9159             :                                 }
    9160             :                         }
    9161             :                 }
    9162           0 :                 if ((opline->extended_value & ZEND_ISSET) == 0) {
    9163           0 :                         result = !result;
    9164             :                 }
    9165             :         } else {
    9166           0 :                 result = ((opline->extended_value & ZEND_ISSET) == 0);
    9167             :         }
    9168             : 
    9169           0 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    9170             : 
    9171             :         CHECK_EXCEPTION();
    9172           0 :         ZEND_VM_NEXT_OPCODE();
    9173             : }
    9174             : 
    9175           0 : static int ZEND_FASTCALL  ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9176             : {
    9177           0 :         USE_OPLINE
    9178             : 
    9179             :         zval *container;
    9180             :         int result;
    9181             :         zval *offset;
    9182             : 
    9183             :         SAVE_OPLINE();
    9184           0 :         container = opline->op1.zv;
    9185           0 :         offset = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
    9186             : 
    9187           0 :         if (IS_CONST == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
    9188           0 :                 if (EXPECTED(Z_OBJ_HT_P(container)->has_property)) {
    9189           0 :                         result = Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISSET) == 0, ((IS_CV == IS_CONST) ? (EX(run_time_cache) + Z_CACHE_SLOT_P(offset)) : NULL) TSRMLS_CC);
    9190             :                 } else {
    9191           0 :                         zend_error(E_NOTICE, "Trying to check property of non-object");
    9192           0 :                         result = 0;
    9193             :                 }
    9194           0 :                 if ((opline->extended_value & ZEND_ISSET) == 0) {
    9195           0 :                         result = !result;
    9196             :                 }
    9197             :         } else {
    9198           0 :                 result = ((opline->extended_value & ZEND_ISSET) == 0);
    9199             :         }
    9200             : 
    9201           0 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    9202             : 
    9203             :         CHECK_EXCEPTION();
    9204           0 :         ZEND_VM_NEXT_OPCODE();
    9205             : }
    9206             : 
    9207           0 : static int ZEND_FASTCALL  ZEND_YIELD_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9208             : {
    9209           0 :         USE_OPLINE
    9210             : 
    9211             :         /* The generator object is stored in EX(return_value) */
    9212           0 :         zend_generator *generator = (zend_generator *) EX(return_value);
    9213             : 
    9214           0 :         if (generator->flags & ZEND_GENERATOR_FORCED_CLOSE) {
    9215           0 :                 zend_error_noreturn(E_ERROR, "Cannot yield from finally in a force-closed generator");
    9216             :         }
    9217             : 
    9218             :         /* Destroy the previously yielded value */
    9219           0 :         zval_ptr_dtor(&generator->value);
    9220             : 
    9221             :         /* Destroy the previously yielded key */
    9222           0 :         zval_ptr_dtor(&generator->key);
    9223             : 
    9224             :         /* Set the new yielded value */
    9225             :         if (IS_CONST != IS_UNUSED) {
    9226             : 
    9227             : 
    9228           0 :                 if (EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE) {
    9229             :                         /* Constants and temporary variables aren't yieldable by reference,
    9230             :                          * but we still allow them with a notice. */
    9231             :                         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    9232             :                                 zval *value;
    9233             : 
    9234           0 :                                 zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    9235             : 
    9236           0 :                                 value = opline->op1.zv;
    9237           0 :                                 ZVAL_COPY_VALUE(&generator->value, value);
    9238           0 :                                 if (Z_OPT_REFCOUNTED(generator->value)) Z_SET_REFCOUNT(generator->value, 1);
    9239             : 
    9240             :                                 /* Temporary variables don't need ctor copying */
    9241             :                                 if (IS_CONST != IS_TMP_VAR) {
    9242           0 :                                         zval_opt_copy_ctor(&generator->value);
    9243             :                                 }
    9244             :                         } else {
    9245             :                                 zval *value_ptr = NULL;
    9246             : 
    9247             :                                 if (IS_CONST == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
    9248             :                                         zend_error_noreturn(E_ERROR, "Cannot yield string offsets by reference");
    9249             :                                 }
    9250             : 
    9251             :                                 /* If a function call result is yielded and the function did
    9252             :                                  * not return by reference we throw a notice. */
    9253             :                                 if (IS_CONST == IS_VAR &&
    9254             :                                     (value_ptr == &EG(uninitialized_zval) ||
    9255             :                                      (opline->extended_value == ZEND_RETURNS_FUNCTION &&
    9256             :                                       !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
    9257             :                                         zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    9258             :                                 } else {
    9259             :                                         ZVAL_MAKE_REF(value_ptr);
    9260             :                                 }
    9261             :                                 ZVAL_COPY(&generator->value, value_ptr);
    9262             : 
    9263             :                         }
    9264             :                 } else {
    9265           0 :                         zval *value = opline->op1.zv;
    9266             : 
    9267             :                         /* Consts, temporary variables and references need copying */
    9268             :                         if (IS_CONST == IS_CONST) {
    9269           0 :                                 ZVAL_DUP(&generator->value, value);
    9270             :                         } else if (IS_CONST == IS_TMP_VAR) {
    9271             :                                 ZVAL_COPY_VALUE(&generator->value, value);
    9272             :             } else if ((IS_CONST == IS_CV || IS_CONST == IS_VAR) && Z_ISREF_P(value)) {
    9273             :                                 ZVAL_DUP(&generator->value, Z_REFVAL_P(value));
    9274             : 
    9275             :                         } else {
    9276             :                                 ZVAL_COPY_VALUE(&generator->value, value);
    9277             :                                 if (IS_CONST == IS_CV) {
    9278             :                                         if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
    9279             :                                 }
    9280             :                         }
    9281             :                 }
    9282             :         } else {
    9283             :                 /* If no value was specified yield null */
    9284             :                 ZVAL_NULL(&generator->value);
    9285             :         }
    9286             : 
    9287             :         /* Set the new yielded key */
    9288             :         if (IS_CV != IS_UNUSED) {
    9289             : 
    9290           0 :                 zval *key = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
    9291             : 
    9292             :                 /* Consts, temporary variables and references need copying */
    9293           0 :                 if (IS_CV == IS_CONST) {
    9294             :                         ZVAL_DUP(&generator->key, key);
    9295           0 :                 } else if (IS_CV == IS_TMP_VAR) {
    9296             :                         ZVAL_COPY_VALUE(&generator->key, key);
    9297           0 :                 } else if ((IS_CV == IS_VAR || IS_CV == IS_CV) && Z_ISREF_P(key)) {
    9298           0 :                         ZVAL_DUP(&generator->key, Z_REFVAL_P(key));
    9299             : 
    9300             :                 } else {
    9301           0 :                         ZVAL_COPY_VALUE(&generator->key, key);
    9302             :                         if (IS_CV == IS_CV) {
    9303           0 :                                 if (Z_OPT_REFCOUNTED_P(key)) Z_ADDREF_P(key);
    9304             :                         }
    9305             :                 }
    9306             : 
    9307           0 :                 if (Z_TYPE(generator->key) == IS_LONG
    9308           0 :                     && Z_LVAL(generator->key) > generator->largest_used_integer_key
    9309             :                 ) {
    9310           0 :                         generator->largest_used_integer_key = Z_LVAL(generator->key);
    9311             :                 }
    9312             :         } else {
    9313             :                 /* If no key was specified we use auto-increment keys */
    9314             :                 generator->largest_used_integer_key++;
    9315             :                 ZVAL_LONG(&generator->key, generator->largest_used_integer_key);
    9316             :         }
    9317             : 
    9318           0 :         if (RETURN_VALUE_USED(opline)) {
    9319             :                 /* If the return value of yield is used set the send
    9320             :                  * target and initialize it to NULL */
    9321           0 :                 generator->send_target = EX_VAR(opline->result.var);
    9322           0 :                 ZVAL_NULL(generator->send_target);
    9323             :         } else {
    9324           0 :                 generator->send_target = NULL;
    9325             :         }
    9326             : 
    9327             :         /* We increment to the next op, so we are at the correct position when the
    9328             :          * generator is resumed. */
    9329           0 :         ZEND_VM_INC_OPCODE();
    9330             : 
    9331             :         /* The GOTO VM uses a local opline variable. We need to set the opline
    9332             :          * variable in execute_data so we don't resume at an old position. */
    9333             :         SAVE_OPLINE();
    9334             : 
    9335           0 :         ZEND_VM_RETURN();
    9336             : }
    9337             : 
    9338           1 : static int ZEND_FASTCALL  ZEND_POW_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9339             : {
    9340           1 :         USE_OPLINE
    9341             : 
    9342             : 
    9343             :         SAVE_OPLINE();
    9344           2 :         pow_function(EX_VAR(opline->result.var),
    9345             :                 opline->op1.zv,
    9346             :                 _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    9347             : 
    9348             : 
    9349             :         CHECK_EXCEPTION();
    9350           1 :         ZEND_VM_NEXT_OPCODE();
    9351             : }
    9352             : 
    9353           0 : static int ZEND_FASTCALL  ZEND_BW_NOT_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9354             : {
    9355           0 :         USE_OPLINE
    9356             :         zend_free_op free_op1;
    9357             : 
    9358             :         SAVE_OPLINE();
    9359           0 :         bitwise_not_function(EX_VAR(opline->result.var),
    9360             :                 _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1) TSRMLS_CC);
    9361           0 :         zval_ptr_dtor_nogc(free_op1);
    9362             :         CHECK_EXCEPTION();
    9363           0 :         ZEND_VM_NEXT_OPCODE();
    9364             : }
    9365             : 
    9366      229939 : static int ZEND_FASTCALL  ZEND_BOOL_NOT_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9367             : {
    9368      229939 :         USE_OPLINE
    9369             :         zend_free_op free_op1;
    9370             : 
    9371             :         SAVE_OPLINE();
    9372      459878 :         boolean_not_function(EX_VAR(opline->result.var),
    9373             :                 _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1) TSRMLS_CC);
    9374      229939 :         zval_ptr_dtor_nogc(free_op1);
    9375             :         CHECK_EXCEPTION();
    9376      229939 :         ZEND_VM_NEXT_OPCODE();
    9377             : }
    9378             : 
    9379      101552 : static int ZEND_FASTCALL  ZEND_ECHO_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9380             : {
    9381      101552 :         USE_OPLINE
    9382             :         zend_free_op free_op1;
    9383             :         zval *z;
    9384             : 
    9385             :         SAVE_OPLINE();
    9386      203104 :         z = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1);
    9387             : 
    9388      101552 :         zend_print_variable(z TSRMLS_CC);
    9389             : 
    9390      101552 :         zval_ptr_dtor_nogc(free_op1);
    9391             :         CHECK_EXCEPTION();
    9392      101552 :         ZEND_VM_NEXT_OPCODE();
    9393             : }
    9394             : 
    9395        8128 : static int ZEND_FASTCALL  ZEND_PRINT_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9396             : {
    9397        8128 :         USE_OPLINE
    9398             : 
    9399        8128 :         ZVAL_LONG(EX_VAR(opline->result.var), 1);
    9400        8128 :         return ZEND_ECHO_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    9401             : }
    9402             : 
    9403    19230250 : static int ZEND_FASTCALL  ZEND_JMPZ_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9404             : {
    9405    19230250 :         USE_OPLINE
    9406             :         zend_free_op free_op1;
    9407             :         zval *val;
    9408             : 
    9409             :         SAVE_OPLINE();
    9410    38460500 :         val = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1);
    9411             : 
    9412             :         if (IS_TMP_VAR == IS_TMP_VAR) {
    9413    19230250 :                 if (Z_TYPE_P(val) == IS_TRUE) {
    9414     8739785 :                         ZEND_VM_SET_OPCODE(opline + 1);
    9415     8739785 :                         ZEND_VM_CONTINUE();
    9416    10490465 :                 } else if (EXPECTED(Z_TYPE_P(val) <= IS_TRUE)) {
    9417    10477641 :                         ZEND_VM_SET_OPCODE(opline->op2.jmp_addr);
    9418    10477641 :                         ZEND_VM_CONTINUE();
    9419             :                 }
    9420             :         }
    9421             : 
    9422       12824 :         if (i_zend_is_true(val TSRMLS_CC)) {
    9423       12571 :                 opline++;
    9424             :         } else {
    9425         253 :                 opline = opline->op2.jmp_addr;
    9426             :         }
    9427       12824 :         zval_ptr_dtor_nogc(free_op1);
    9428       12824 :         if (UNEXPECTED(EG(exception) != NULL)) {
    9429           0 :                 HANDLE_EXCEPTION();
    9430             :         }
    9431       12824 :         ZEND_VM_JMP(opline);
    9432             : }
    9433             : 
    9434      100818 : static int ZEND_FASTCALL  ZEND_JMPNZ_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9435             : {
    9436      100818 :         USE_OPLINE
    9437             :         zend_free_op free_op1;
    9438             :         zval *val;
    9439             : 
    9440             :         SAVE_OPLINE();
    9441      201636 :         val = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1);
    9442             : 
    9443             :         if (IS_TMP_VAR == IS_TMP_VAR) {
    9444      100818 :                 if (Z_TYPE_P(val) == IS_TRUE) {
    9445       98527 :                         ZEND_VM_SET_OPCODE(opline->op2.jmp_addr);
    9446       98527 :                         ZEND_VM_CONTINUE();
    9447        2291 :                 } else if (EXPECTED(Z_TYPE_P(val) <= IS_TRUE)) {
    9448        2291 :                         ZEND_VM_SET_OPCODE(opline + 1);
    9449        2291 :                         ZEND_VM_CONTINUE();
    9450             :                 }
    9451             :         }
    9452             : 
    9453           0 :         if (i_zend_is_true(val TSRMLS_CC)) {
    9454           0 :                 opline = opline->op2.jmp_addr;
    9455             :         } else {
    9456           0 :                 opline++;
    9457             :         }
    9458           0 :         zval_ptr_dtor_nogc(free_op1);
    9459           0 :         if (UNEXPECTED(EG(exception) != NULL)) {
    9460           0 :                 HANDLE_EXCEPTION();
    9461             :         }
    9462           0 :         ZEND_VM_JMP(opline);
    9463             : }
    9464             : 
    9465           0 : static int ZEND_FASTCALL  ZEND_JMPZNZ_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9466             : {
    9467           0 :         USE_OPLINE
    9468             :         zend_free_op free_op1;
    9469             :         zval *val;
    9470             : 
    9471             :         SAVE_OPLINE();
    9472           0 :         val = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1);
    9473             : 
    9474             :         if (IS_TMP_VAR == IS_TMP_VAR) {
    9475           0 :                 if (EXPECTED(Z_TYPE_P(val) == IS_TRUE)) {
    9476           0 :                         ZEND_VM_SET_RELATIVE_OPCODE(opline, opline->extended_value);
    9477           0 :                         ZEND_VM_CONTINUE();
    9478           0 :                 } else if (EXPECTED(Z_TYPE_P(val) <= IS_TRUE)) {
    9479           0 :                         ZEND_VM_SET_OPCODE(opline->op2.jmp_addr);
    9480           0 :                         ZEND_VM_CONTINUE();
    9481             :                 }
    9482             :         }
    9483             : 
    9484           0 :         if (i_zend_is_true(val TSRMLS_CC)) {
    9485           0 :                 opline = (zend_op*)(((char*)opline) + opline->extended_value);
    9486             :         } else {
    9487           0 :                 opline = opline->op2.jmp_addr;
    9488             :         }
    9489           0 :         zval_ptr_dtor_nogc(free_op1);
    9490           0 :         if (UNEXPECTED(EG(exception) != NULL)) {
    9491           0 :                 HANDLE_EXCEPTION();
    9492             :         }
    9493           0 :         ZEND_VM_JMP(opline);
    9494             : }
    9495             : 
    9496     2405009 : static int ZEND_FASTCALL  ZEND_JMPZ_EX_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9497             : {
    9498     2405009 :         USE_OPLINE
    9499             :         zend_free_op free_op1;
    9500             :         zval *val;
    9501             : 
    9502             :         SAVE_OPLINE();
    9503     4810018 :         val = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1);
    9504             : 
    9505             :         if (IS_TMP_VAR == IS_TMP_VAR) {
    9506     2405009 :                 if (Z_TYPE_P(val) == IS_TRUE) {
    9507     1380238 :                         ZVAL_TRUE(EX_VAR(opline->result.var));
    9508     1380238 :                         ZEND_VM_SET_OPCODE(opline + 1);
    9509     1380238 :                         ZEND_VM_CONTINUE();
    9510     1024771 :                 } else if (EXPECTED(Z_TYPE_P(val) <= IS_TRUE)) {
    9511     1024761 :                         ZVAL_FALSE(EX_VAR(opline->result.var));
    9512     1024761 :                         ZEND_VM_SET_OPCODE(opline->op2.jmp_addr);
    9513     1024761 :                         ZEND_VM_CONTINUE();
    9514             :                 }
    9515             :         }
    9516             : 
    9517          10 :         if (i_zend_is_true(val TSRMLS_CC)) {
    9518           8 :                 zval_ptr_dtor_nogc(free_op1);
    9519           8 :                 ZVAL_TRUE(EX_VAR(opline->result.var));
    9520           8 :                 opline++;
    9521             :         } else {
    9522           2 :                 zval_ptr_dtor_nogc(free_op1);
    9523           2 :                 ZVAL_FALSE(EX_VAR(opline->result.var));
    9524           2 :                 opline = opline->op2.jmp_addr;
    9525             :         }
    9526          10 :         if (UNEXPECTED(EG(exception) != NULL)) {
    9527           0 :                 HANDLE_EXCEPTION();
    9528             :         }
    9529          10 :         ZEND_VM_JMP(opline);
    9530             : }
    9531             : 
    9532      434768 : static int ZEND_FASTCALL  ZEND_JMPNZ_EX_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9533             : {
    9534      434768 :         USE_OPLINE
    9535             :         zend_free_op free_op1;
    9536             :         zval *val;
    9537             : 
    9538             :         SAVE_OPLINE();
    9539      869536 :         val = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1);
    9540             : 
    9541             :         if (IS_TMP_VAR == IS_TMP_VAR) {
    9542      434768 :                 if (Z_TYPE_P(val) == IS_TRUE) {
    9543       52853 :                         ZVAL_TRUE(EX_VAR(opline->result.var));
    9544       52853 :                         ZEND_VM_SET_OPCODE(opline->op2.jmp_addr);
    9545       52853 :                         ZEND_VM_CONTINUE();
    9546      381915 :                 } else if (EXPECTED(Z_TYPE_P(val) <= IS_TRUE)) {
    9547      381915 :                         ZVAL_FALSE(EX_VAR(opline->result.var));
    9548      381915 :                         ZEND_VM_SET_OPCODE(opline + 1);
    9549      381915 :                         ZEND_VM_CONTINUE();
    9550             :                 }
    9551             :         }
    9552           0 :         if (i_zend_is_true(val TSRMLS_CC)) {
    9553           0 :                 ZVAL_TRUE(EX_VAR(opline->result.var));
    9554           0 :                 opline = opline->op2.jmp_addr;
    9555             :         } else {
    9556           0 :                 ZVAL_FALSE(EX_VAR(opline->result.var));
    9557           0 :                 opline++;
    9558             :         }
    9559           0 :         zval_ptr_dtor_nogc(free_op1);
    9560           0 :         if (UNEXPECTED(EG(exception) != NULL)) {
    9561           0 :                 HANDLE_EXCEPTION();
    9562             :         }
    9563           0 :         ZEND_VM_JMP(opline);
    9564             : }
    9565             : 
    9566     4923402 : static int ZEND_FASTCALL  ZEND_FREE_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9567             : {
    9568     4923402 :         USE_OPLINE
    9569             : 
    9570             :         SAVE_OPLINE();
    9571     4923402 :         zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
    9572             :         CHECK_EXCEPTION();
    9573     4923402 :         ZEND_VM_NEXT_OPCODE();
    9574             : }
    9575             : 
    9576      210518 : static int ZEND_FASTCALL  ZEND_RETURN_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9577             : {
    9578      210518 :         USE_OPLINE
    9579             :         zval *retval_ptr;
    9580             :         zend_free_op free_op1;
    9581             : 
    9582             :         SAVE_OPLINE();
    9583      421036 :         retval_ptr = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1);
    9584             : 
    9585      210518 :         if (!EX(return_value)) {
    9586         323 :                 zval_ptr_dtor_nogc(free_op1);
    9587             :         } else {
    9588             :                 if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR) {
    9589      210195 :                         ZVAL_COPY_VALUE(EX(return_value), retval_ptr);
    9590      210195 :                         if (IS_TMP_VAR == IS_CONST) {
    9591             :                                 if (UNEXPECTED(Z_OPT_COPYABLE_P(EX(return_value)))) {
    9592             :                                         zval_copy_ctor_func(EX(return_value));
    9593             :                                 }
    9594             :                         }
    9595             :                 } else if ((IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) && Z_ISREF_P(retval_ptr)) {
    9596             :                         ZVAL_COPY(EX(return_value), Z_REFVAL_P(retval_ptr));
    9597             : 
    9598             :                 } else {
    9599             :                         ZVAL_COPY_VALUE(EX(return_value), retval_ptr);
    9600             :                         if (IS_TMP_VAR == IS_CV) {
    9601             :                                 if (Z_OPT_REFCOUNTED_P(retval_ptr)) Z_ADDREF_P(retval_ptr);
    9602             :                         }
    9603             :                 }
    9604             :         }
    9605      210518 :         return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    9606             : }
    9607             : 
    9608           0 : static int ZEND_FASTCALL  ZEND_RETURN_BY_REF_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9609             : {
    9610           0 :         USE_OPLINE
    9611             :         zval *retval_ptr;
    9612             :         zend_free_op free_op1;
    9613             : 
    9614             :         SAVE_OPLINE();
    9615             : 
    9616             :         do {
    9617             :                 if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR ||
    9618             :                     (IS_TMP_VAR == IS_VAR && opline->extended_value == ZEND_RETURNS_VALUE)) {
    9619             :                         /* Not supposed to happen, but we'll allow it */
    9620           0 :                         zend_error(E_NOTICE, "Only variable references should be returned by reference");
    9621             : 
    9622           0 :                         retval_ptr = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1);
    9623           0 :                         if (!EX(return_value)) {
    9624             :                                 if (IS_TMP_VAR == IS_TMP_VAR) {
    9625           0 :                                         zval_ptr_dtor_nogc(free_op1);
    9626             :                                 }
    9627             :                         } else {
    9628           0 :                                 ZVAL_COPY_VALUE(EX(return_value), retval_ptr);
    9629           0 :                                 Z_VAR_FLAGS_P(EX(return_value)) = IS_VAR_RET_REF;
    9630           0 :                                 if (IS_TMP_VAR != IS_TMP_VAR) {
    9631             :                                         zval_opt_copy_ctor_no_imm(EX(return_value));
    9632             :                                 }
    9633             :                         }
    9634           0 :                         break;
    9635             :                 }
    9636             : 
    9637             :                 retval_ptr = NULL;
    9638             : 
    9639             :                 if (IS_TMP_VAR == IS_VAR && UNEXPECTED(retval_ptr == NULL)) {
    9640             :                         zend_error_noreturn(E_ERROR, "Cannot return string offsets by reference");
    9641             :                 }
    9642             : 
    9643             :                 if (IS_TMP_VAR == IS_VAR) {
    9644             :                         if (retval_ptr == &EG(uninitialized_zval) ||
    9645             :                             (opline->extended_value == ZEND_RETURNS_FUNCTION &&
    9646             :                              !(Z_VAR_FLAGS_P(retval_ptr) & IS_VAR_RET_REF))) {
    9647             :                                 zend_error(E_NOTICE, "Only variable references should be returned by reference");
    9648             :                                 if (EX(return_value)) {
    9649             :                                         ZVAL_NEW_REF(EX(return_value), retval_ptr);
    9650             :                                         Z_VAR_FLAGS_P(EX(return_value)) = IS_VAR_RET_REF;
    9651             :                                         if (Z_REFCOUNTED_P(retval_ptr)) Z_ADDREF_P(retval_ptr);
    9652             :                                 }
    9653             :                                 break;
    9654             :                         }
    9655             :                 }
    9656             : 
    9657             :                 if (EX(return_value)) {
    9658             :                         ZVAL_MAKE_REF(retval_ptr);
    9659             :                         Z_ADDREF_P(retval_ptr);
    9660             :                         ZVAL_REF(EX(return_value), Z_REF_P(retval_ptr));
    9661             :                         Z_VAR_FLAGS_P(EX(return_value)) = IS_VAR_RET_REF;
    9662             :                 }
    9663             :         } while (0);
    9664             : 
    9665           0 :         return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    9666             : }
    9667             : 
    9668           0 : static int ZEND_FASTCALL  ZEND_THROW_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9669             : {
    9670           0 :         USE_OPLINE
    9671             :         zval *value;
    9672             :         zend_free_op free_op1;
    9673             : 
    9674             :         SAVE_OPLINE();
    9675           0 :         value = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1);
    9676             : 
    9677           0 :         if (IS_TMP_VAR == IS_CONST || UNEXPECTED(Z_TYPE_P(value) != IS_OBJECT)) {
    9678           0 :                 if (UNEXPECTED(EG(exception) != NULL)) {
    9679           0 :                         HANDLE_EXCEPTION();
    9680             :                 }
    9681           0 :                 zend_error_noreturn(E_ERROR, "Can only throw objects");
    9682             :         }
    9683             : 
    9684           0 :         zend_exception_save(TSRMLS_C);
    9685           0 :         if (IS_TMP_VAR != IS_TMP_VAR) {
    9686             :                 if (Z_REFCOUNTED_P(value)) Z_ADDREF_P(value);
    9687             :         }
    9688             : 
    9689           0 :         zend_throw_exception_object(value TSRMLS_CC);
    9690           0 :         zend_exception_restore(TSRMLS_C);
    9691             : 
    9692           0 :         HANDLE_EXCEPTION();
    9693             : }
    9694             : 
    9695     1572462 : static int ZEND_FASTCALL  ZEND_SEND_VAL_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9696             : {
    9697     1572462 :         USE_OPLINE
    9698             :         zval *value, *arg;
    9699             :         zend_free_op free_op1;
    9700             : 
    9701             :         SAVE_OPLINE();
    9702     3144924 :         value = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1);
    9703     1572462 :         arg = ZEND_CALL_ARG(EX(call), opline->op2.num);
    9704     1572462 :         EX(call)->num_args = opline->op2.num;
    9705     1572462 :         ZVAL_COPY_VALUE(arg, value);
    9706     1572462 :         if (IS_TMP_VAR == IS_CONST) {
    9707             :                 if (UNEXPECTED(Z_OPT_COPYABLE_P(arg))) {
    9708             :                         zval_copy_ctor_func(arg);
    9709             :                 }
    9710             :         }
    9711     1572462 :         ZEND_VM_NEXT_OPCODE();
    9712             : }
    9713             : 
    9714       29739 : static int ZEND_FASTCALL  ZEND_SEND_VAL_EX_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9715             : {
    9716       29739 :         USE_OPLINE
    9717             :         zval *value, *arg;
    9718             :         zend_free_op free_op1;
    9719             : 
    9720             :         SAVE_OPLINE();
    9721       59478 :         if (ARG_MUST_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
    9722           0 :                 zend_error_noreturn(E_ERROR, "Cannot pass parameter %d by reference", opline->op2.num);
    9723             :         }
    9724       59478 :         value = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1);
    9725       29739 :         arg = ZEND_CALL_ARG(EX(call), opline->op2.num);
    9726       29739 :         EX(call)->num_args = opline->op2.num;
    9727       29739 :         ZVAL_COPY_VALUE(arg, value);
    9728       29739 :         if (IS_TMP_VAR == IS_CONST) {
    9729             :                 if (UNEXPECTED(Z_OPT_COPYABLE_P(arg))) {
    9730             :                         zval_copy_ctor_func(arg);
    9731             :                 }
    9732             :         }
    9733       29739 :         ZEND_VM_NEXT_OPCODE();
    9734             : }
    9735             : 
    9736     1384966 : static int ZEND_FASTCALL  ZEND_BOOL_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9737             : {
    9738     1384966 :         USE_OPLINE
    9739             :         zend_free_op free_op1;
    9740     1384966 :         zval *retval = EX_VAR(opline->result.var);
    9741             : 
    9742             :         SAVE_OPLINE();
    9743             :         /* PHP 3.0 returned "" for false and 1 for true, here we use 0 and 1 for now */
    9744     2769932 :         ZVAL_BOOL(retval, i_zend_is_true(_get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1) TSRMLS_CC));
    9745     1384966 :         zval_ptr_dtor_nogc(free_op1);
    9746             : 
    9747             :         CHECK_EXCEPTION();
    9748     1384966 :         ZEND_VM_NEXT_OPCODE();
    9749             : }
    9750             : 
    9751           0 : static int ZEND_FASTCALL  ZEND_CLONE_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9752             : {
    9753           0 :         USE_OPLINE
    9754             :         zend_free_op free_op1;
    9755             :         zval *obj;
    9756             :         zend_class_entry *ce;
    9757             :         zend_function *clone;
    9758             :         zend_object_clone_obj_t clone_call;
    9759             : 
    9760             :         SAVE_OPLINE();
    9761           0 :         obj = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1);
    9762             : 
    9763           0 :         if (IS_TMP_VAR == IS_CONST ||
    9764             :             (IS_TMP_VAR != IS_UNUSED && UNEXPECTED(Z_TYPE_P(obj) != IS_OBJECT))) {
    9765           0 :                 if (UNEXPECTED(EG(exception) != NULL)) {
    9766           0 :                         HANDLE_EXCEPTION();
    9767             :                 }
    9768           0 :                 zend_error_noreturn(E_ERROR, "__clone method called on non-object");
    9769             :         }
    9770             : 
    9771           0 :         ce = Z_OBJCE_P(obj);
    9772           0 :         clone = ce ? ce->clone : NULL;
    9773           0 :         clone_call =  Z_OBJ_HT_P(obj)->clone_obj;
    9774           0 :         if (UNEXPECTED(clone_call == NULL)) {
    9775           0 :                 if (ce) {
    9776           0 :                         zend_error_noreturn(E_ERROR, "Trying to clone an uncloneable object of class %s", ce->name->val);
    9777             :                 } else {
    9778           0 :                         zend_error_noreturn(E_ERROR, "Trying to clone an uncloneable object");
    9779             :                 }
    9780             :         }
    9781             : 
    9782           0 :         if (ce && clone) {
    9783           0 :                 if (clone->op_array.fn_flags & ZEND_ACC_PRIVATE) {
    9784             :                         /* Ensure that if we're calling a private function, we're allowed to do so.
    9785             :                          */
    9786           0 :                         if (UNEXPECTED(ce != EX(scope))) {
    9787           0 :                                 zend_error_noreturn(E_ERROR, "Call to private %s::__clone() from context '%s'", ce->name->val, EX(scope) ? EX(scope)->name->val : "");
    9788             :                         }
    9789           0 :                 } else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) {
    9790             :                         /* Ensure that if we're calling a protected function, we're allowed to do so.
    9791             :                          */
    9792           0 :                         if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(clone), EX(scope)))) {
    9793           0 :                                 zend_error_noreturn(E_ERROR, "Call to protected %s::__clone() from context '%s'", ce->name->val, EX(scope) ? EX(scope)->name->val : "");
    9794             :                         }
    9795             :                 }
    9796             :         }
    9797             : 
    9798           0 :         if (EXPECTED(EG(exception) == NULL)) {
    9799           0 :                 ZVAL_OBJ(EX_VAR(opline->result.var), clone_call(obj TSRMLS_CC));
    9800           0 :                 if (!RETURN_VALUE_USED(opline) || UNEXPECTED(EG(exception) != NULL)) {
    9801           0 :                         zval_ptr_dtor(EX_VAR(opline->result.var));
    9802             :                 }
    9803             :         }
    9804             : 
    9805             :         CHECK_EXCEPTION();
    9806           0 :         ZEND_VM_NEXT_OPCODE();
    9807             : }
    9808             : 
    9809         154 : static int ZEND_FASTCALL  ZEND_CAST_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9810             : {
    9811         154 :         USE_OPLINE
    9812             :         zend_free_op free_op1;
    9813             :         zval *expr;
    9814         154 :         zval *result = EX_VAR(opline->result.var);
    9815             :