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: 7346 16599 44.3 %
Date: 2014-11-10 Functions: 636 1300 48.9 %
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   190547146 : 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   190547146 :                 if (UNEXPECTED((ret = OPLINE->handler(execute_data TSRMLS_CC)) != 0)) {
     353     3695184 :                         if (EXPECTED(ret > 0)) {
     354     3207334 :                                 execute_data = EG(current_execute_data);
     355             :                         } else {
     356      487850 :                                 return;
     357             :                         }
     358             :                 }
     359             : 
     360   190057718 :         }
     361             :         zend_error_noreturn(E_ERROR, "Arrived at end of main loop which shouldn't happen");
     362             : }
     363             : 
     364       20340 : ZEND_API void zend_execute(zend_op_array *op_array, zval *return_value TSRMLS_DC)
     365             : {
     366             :         zend_execute_data *execute_data;
     367             : 
     368       20340 :         if (EG(exception) != NULL) {
     369           0 :                 return;
     370             :         }
     371             : 
     372       61326 :         execute_data = zend_vm_stack_push_call_frame(VM_FRAME_TOP_CODE,
     373       40986 :                 (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       20340 :         if (EG(current_execute_data)) {
     375         153 :                 execute_data->symbol_table = zend_rebuild_symbol_table(TSRMLS_C);
     376             :         } else {
     377       20187 :                 execute_data->symbol_table = &EG(symbol_table);
     378             :         }
     379       20340 :         EX(prev_execute_data) = EG(current_execute_data);
     380             :         i_init_execute_data(execute_data, op_array, return_value TSRMLS_CC);
     381       20340 :         zend_execute_ex(execute_data TSRMLS_CC);
     382             : }
     383             : 
     384     2091204 : static int ZEND_FASTCALL zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS)
     385             : {
     386     2091204 :         vm_frame_kind frame_kind = VM_FRAME_KIND(EX(frame_info));
     387             : 
     388     2091204 :         if (frame_kind == VM_FRAME_NESTED_FUNCTION) {
     389             :                 zend_object *object;
     390             : 
     391             :                 i_free_compiled_variables(execute_data TSRMLS_CC);
     392     1594635 :                 if (UNEXPECTED(EX(symbol_table) != NULL)) {
     393       87750 :                         zend_clean_and_cache_symbol_table(EX(symbol_table) TSRMLS_CC);
     394             :                 }
     395             :                 zend_vm_stack_free_extra_args(execute_data TSRMLS_CC);
     396     1594635 :                 EG(current_execute_data) = EX(prev_execute_data);
     397     1594635 :                 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     1594635 :                 object = Z_OBJ(EX(This));
     401             :                 zend_vm_stack_free_call_frame(execute_data TSRMLS_CC);
     402             : 
     403     1594635 :                 execute_data = EG(current_execute_data);
     404             : 
     405     1594635 :                 if (object) {
     406      100788 :                         if (UNEXPECTED(EG(exception) != NULL) && (EX(opline)->op1.num & ZEND_CALL_CTOR)) {
     407          22 :                                 if (!(EX(opline)->op1.num & ZEND_CALL_CTOR_RESULT_UNUSED)) {
     408          19 :                                         GC_REFCOUNT(object)--;
     409             :                                 }
     410          22 :                                 if (GC_REFCOUNT(object) == 1) {
     411          21 :                                         zend_object_store_ctor_failed(object TSRMLS_CC);
     412             :                                 }
     413             :                         }
     414             :                         OBJ_RELEASE(object);
     415             :                 }
     416     1594635 :                 EG(scope) = EX(scope);
     417             : 
     418     1594635 :                 if (UNEXPECTED(EG(exception) != NULL)) {
     419         161 :                         const zend_op *opline = EX(opline);
     420         161 :                         zend_throw_exception_internal(NULL TSRMLS_CC);
     421         161 :                         if (RETURN_VALUE_USED(opline)) {
     422          28 :                                 zval_ptr_dtor(EX_VAR(opline->result.var));
     423             :                         }
     424         161 :                         HANDLE_EXCEPTION_LEAVE();
     425             :                 }
     426             : 
     427             :                 LOAD_OPLINE();
     428     1594474 :                 ZEND_VM_INC_OPCODE();
     429     1594474 :                 ZEND_VM_LEAVE();
     430      496569 :         } else if (frame_kind == VM_FRAME_NESTED_CODE) {
     431        8919 :                 zend_detach_symbol_table(execute_data);
     432        8919 :                 destroy_op_array(&EX(func)->op_array TSRMLS_CC);
     433        8919 :                 efree_size(EX(func), sizeof(zend_op_array));
     434        8919 :                 EG(current_execute_data) = EX(prev_execute_data);
     435             :                 zend_vm_stack_free_call_frame(execute_data TSRMLS_CC);
     436             : 
     437        8919 :                 execute_data = EG(current_execute_data);
     438        8919 :                 zend_attach_symbol_table(execute_data);
     439        8919 :                 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        8898 :                 ZEND_VM_INC_OPCODE();
     446        8898 :                 ZEND_VM_LEAVE();
     447             :         } else {
     448      487650 :                 if (frame_kind == VM_FRAME_TOP_FUNCTION) {
     449             :                         i_free_compiled_variables(execute_data TSRMLS_CC);
     450      468836 :                         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      468836 :                         EG(current_execute_data) = EX(prev_execute_data);
     455      468836 :                         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       18814 :                         zend_array *symbol_table = EX(symbol_table);
     460             :                         zend_execute_data *old_execute_data;
     461             : 
     462       18814 :                         zend_detach_symbol_table(execute_data);
     463       18814 :                         old_execute_data = EX(prev_execute_data);
     464       37782 :                         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       18814 :                         EG(current_execute_data) = EX(prev_execute_data);
     474             :                 }
     475             :                 zend_vm_stack_free_call_frame(execute_data TSRMLS_CC);
     476             : 
     477      487650 :                 ZEND_VM_RETURN();
     478             :         }
     479             : }
     480             : 
     481     9946389 : static int ZEND_FASTCALL  ZEND_JMP_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
     482             : {
     483     9946389 :         USE_OPLINE
     484             : 
     485     9946389 :         ZEND_VM_SET_OPCODE(opline->op1.jmp_addr);
     486     9946389 :         ZEND_VM_CONTINUE();
     487             : }
     488             : 
     489    18057580 : static int ZEND_FASTCALL  ZEND_DO_FCALL_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
     490             : {
     491    18057580 :         USE_OPLINE
     492    18057580 :         zend_execute_data *call = EX(call);
     493    18057580 :         zend_function *fbc = call->func;
     494    18057580 :         zend_object *object = Z_OBJ(call->This);
     495             : 
     496             :         SAVE_OPLINE();
     497    18057580 :         EX(call) = call->prev_execute_data;
     498    18057580 :         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    18057577 :         if (UNEXPECTED(fbc->type == ZEND_INTERNAL_FUNCTION)) {
     516    16462754 :                 int should_change_scope = 0;
     517             :                 zval *ret;
     518             : 
     519    16462754 :                 if (fbc->common.scope) {
     520      594355 :                         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      594355 :                         EG(scope) = object ? NULL : fbc->common.scope;
     525             : #else
     526             :                         EG(scope) = fbc->common.scope;
     527             : #endif
     528             :                 } else {
     529    15868399 :                         call->called_scope = EX(called_scope);
     530    15868399 :                         Z_OBJ(call->This) = Z_OBJ(EX(This));
     531             :                 }
     532             : 
     533    16462754 :                 call->prev_execute_data = execute_data;
     534    16462754 :                 EG(current_execute_data) = call;
     535             : 
     536    16462754 :                 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    16462712 :                 ret = EX_VAR(opline->result.var);
     560    16462712 :                 ZVAL_NULL(ret);
     561    16462712 :                 Z_VAR_FLAGS_P(ret) = (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0 ? IS_VAR_RET_REF : 0;
     562             : 
     563    16462712 :                 if (!zend_execute_internal) {
     564             :                         /* saves one function call if zend_execute_internal is not used */
     565    16462712 :                         fbc->internal_function.handler(call, ret TSRMLS_CC);
     566             :                 } else {
     567           0 :                         zend_execute_internal(call, ret TSRMLS_CC);
     568             :                 }
     569    16462528 :                 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    16462528 :                 if (!RETURN_VALUE_USED(opline)) {
     574             :                         zval_ptr_dtor(ret);
     575             :                 }
     576             : 
     577    16462528 :                 if (UNEXPECTED(should_change_scope)) {
     578      594190 :                         goto fcall_end_change_scope;
     579             :                 } else {
     580    15868338 :                         goto fcall_end;
     581             :                 }
     582     1594823 :         } else if (EXPECTED(fbc->type == ZEND_USER_FUNCTION)) {
     583     1594823 :                 call->scope = EG(scope) = fbc->common.scope;
     584     1594823 :                 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     1594742 :                         zval *return_value = NULL;
     594             : 
     595     1594742 :                         call->symbol_table = NULL;
     596     1594742 :                         if (RETURN_VALUE_USED(opline)) {
     597     1304088 :                                 return_value = EX_VAR(opline->result.var);
     598             : 
     599     1304088 :                                 ZVAL_NULL(return_value);
     600     1304088 :                                 Z_VAR_FLAGS_P(return_value) = 0;
     601             :                         }
     602             : 
     603     1594742 :                         call->prev_execute_data = execute_data;
     604     1594742 :                         i_init_func_execute_data(call, &fbc->op_array, return_value TSRMLS_CC);
     605             : 
     606     1594742 :                         if (EXPECTED(zend_execute_ex == execute_ex)) {
     607     1594742 :                                 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      594271 :         if (object) {
     650      591160 :                 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      594271 :         EG(scope) = EX(scope);
     661             : 
     662             : fcall_end:
     663    16462610 :         if (UNEXPECTED(EG(exception) != NULL)) {
     664         981 :                 zend_throw_exception_internal(NULL TSRMLS_CC);
     665         981 :                 if (RETURN_VALUE_USED(opline)) {
     666         280 :                         zval_ptr_dtor(EX_VAR(opline->result.var));
     667             :                 }
     668         981 :                 HANDLE_EXCEPTION();
     669             :         }
     670             : 
     671    16461629 :         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     1469867 : static int ZEND_FASTCALL  ZEND_BEGIN_SILENCE_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1027             : {
    1028     1469867 :         USE_OPLINE
    1029             : 
    1030             :         SAVE_OPLINE();
    1031     1469867 :         ZVAL_LONG(EX_VAR(opline->result.var), EG(error_reporting));
    1032     1469867 :         if (EX(silence_op_num) == -1) {
    1033     1469854 :                 EX(silence_op_num) = opline->op2.num;
    1034     1469854 :                 EX(old_error_reporting) = EG(error_reporting);
    1035             :         }
    1036             : 
    1037     1469867 :         if (EG(error_reporting)) {
    1038             :                 do {
    1039     1244737 :                         EG(error_reporting) = 0;
    1040     1244737 :                         if (!EG(error_reporting_ini_entry)) {
    1041        4778 :                                 zend_ini_entry *p = zend_hash_str_find_ptr(EG(ini_directives), "error_reporting", sizeof("error_reporting")-1);
    1042        2389 :                                 if (p) {
    1043        2389 :                                         EG(error_reporting_ini_entry) = p;
    1044             :                                 } else {
    1045           0 :                                         break;
    1046             :                                 }
    1047             :                         }
    1048     1244737 :                         if (!EG(error_reporting_ini_entry)->modified) {
    1049        2318 :                                 if (!EG(modified_ini_directives)) {
    1050        1635 :                                         ALLOC_HASHTABLE(EG(modified_ini_directives));
    1051        1635 :                                         zend_hash_init(EG(modified_ini_directives), 8, NULL, NULL, 0);
    1052             :                                 }
    1053        4636 :                                 if (EXPECTED(zend_hash_str_add_ptr(EG(modified_ini_directives), "error_reporting", sizeof("error_reporting")-1, EG(error_reporting_ini_entry)) != NULL)) {
    1054        2318 :                                         EG(error_reporting_ini_entry)->orig_value = EG(error_reporting_ini_entry)->value;
    1055        2318 :                                         EG(error_reporting_ini_entry)->orig_modifiable = EG(error_reporting_ini_entry)->modifiable;
    1056        2318 :                                         EG(error_reporting_ini_entry)->modified = 1;
    1057             :                                 }
    1058             :                         }
    1059             :                 } while (0);
    1060             :         }
    1061             :         CHECK_EXCEPTION();
    1062     1469867 :         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         415 : static int ZEND_FASTCALL  ZEND_DECLARE_CLASS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1096             : {
    1097         415 :         USE_OPLINE
    1098             : 
    1099             :         SAVE_OPLINE();
    1100         415 :         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         413 :         ZEND_VM_NEXT_OPCODE();
    1103             : }
    1104             : 
    1105        1278 : static int ZEND_FASTCALL  ZEND_DECLARE_INHERITED_CLASS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1106             : {
    1107        1278 :         USE_OPLINE
    1108             : 
    1109             :         SAVE_OPLINE();
    1110        1278 :         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        1275 :         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       19628 : static int ZEND_FASTCALL  ZEND_NOP_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1161             : {
    1162       19628 :         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        1616 : static int ZEND_FASTCALL  ZEND_HANDLE_EXCEPTION_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1206             : {
    1207        1616 :         uint32_t op_num = EG(opline_before_exception) - EX(func)->op_array.opcodes;
    1208             :         int i;
    1209        1616 :         uint32_t catch_op_num = 0, finally_op_num = 0, finally_op_end = 0;
    1210             : 
    1211        4301 :         for (i = 0; i < EX(func)->op_array.last_try_catch; i++) {
    1212        3116 :                 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        2685 :                 if (op_num < EX(func)->op_array.try_catch_array[i].catch_op) {
    1217        1144 :                         catch_op_num = EX(func)->op_array.try_catch_array[i].catch_op;
    1218             :                 }
    1219        2685 :                 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        5322 :                 if (op_num >= EX(func)->op_array.try_catch_array[i].finally_op &&
    1223        2637 :                                 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        1616 :         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        2095 :         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        1616 :         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        1616 :         EX(silence_op_num) = -1;
    1277             : 
    1278        1616 :         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        1602 :         } else if (catch_op_num) {
    1288        1113 :                 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        1113 :                 ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[catch_op_num]);
    1296        1113 :                 ZEND_VM_CONTINUE();
    1297             :         } else {
    1298         489 :                 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         489 :                 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         482 :                         return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    1306             :                 }
    1307             :         }
    1308             : }
    1309             : 
    1310         247 : static int ZEND_FASTCALL  ZEND_VERIFY_ABSTRACT_CLASS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1311             : {
    1312         247 :         USE_OPLINE
    1313             : 
    1314             :         SAVE_OPLINE();
    1315         247 :         zend_verify_abstract_class(Z_CE_P(EX_VAR(opline->op1.var)) TSRMLS_CC);
    1316             :         CHECK_EXCEPTION();
    1317         242 :         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        1280 : static int ZEND_FASTCALL  ZEND_FETCH_CLASS_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1407             : {
    1408        1280 :         USE_OPLINE
    1409             : 
    1410             :         SAVE_OPLINE();
    1411        1280 :         if (EG(exception)) {
    1412           0 :                 zend_exception_save(TSRMLS_C);
    1413             :         }
    1414        1280 :         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        1280 :                 zval *class_name = opline->op2.zv;
    1421             : 
    1422             :                 if (IS_CONST == IS_CONST) {
    1423        1280 :                         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        1280 :                                 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        1279 :                                 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        1279 :                 ZEND_VM_NEXT_OPCODE();
    1442             :         }
    1443             : }
    1444             : 
    1445      361032 : static int ZEND_FASTCALL  ZEND_INIT_FCALL_BY_NAME_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1446             : {
    1447      361032 :         USE_OPLINE
    1448             :         zend_function *fbc;
    1449             :         zval *function_name, *func;
    1450             : 
    1451      722064 :         if (IS_CONST == IS_CONST && Z_TYPE_P(opline->op2.zv) == IS_STRING) {
    1452      361031 :                 function_name = (zval*)(opline->op2.zv+1);
    1453      361031 :                 if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv))) {
    1454      358271 :                         fbc = CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv));
    1455        2760 :                 } 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        2746 :                         fbc = Z_FUNC_P(func);
    1460        2746 :                         CACHE_PTR(Z_CACHE_SLOT_P(opline->op2.zv), fbc);
    1461             :                 }
    1462             : 
    1463     1083051 :                 EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
    1464      361017 :                         fbc, opline->extended_value, NULL, NULL, EX(call) TSRMLS_CC);
    1465             : 
    1466             :                 /*CHECK_EXCEPTION();*/
    1467      361017 :                 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    16985084 : static int ZEND_FASTCALL  ZEND_INIT_FCALL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1621             : {
    1622    16985084 :         USE_OPLINE
    1623             : 
    1624    16985084 :         zval *fname = opline->op2.zv;
    1625             :         zval *func;
    1626             :         zend_function *fbc;
    1627             : 
    1628    16985084 :         if (CACHED_PTR(Z_CACHE_SLOT_P(fname))) {
    1629    16830540 :                 fbc = CACHED_PTR(Z_CACHE_SLOT_P(fname));
    1630      154544 :         } 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      154542 :                 fbc = Z_FUNC_P(func);
    1635      154542 :                 CACHE_PTR(Z_CACHE_SLOT_P(fname), fbc);
    1636             :         }
    1637             : 
    1638    50955246 :         EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
    1639    16985082 :                 fbc, opline->extended_value, NULL, NULL, EX(call) TSRMLS_CC);
    1640             : 
    1641    16985082 :         ZEND_VM_NEXT_OPCODE();
    1642             : }
    1643             : 
    1644      185850 : static int ZEND_FASTCALL  ZEND_RECV_INIT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1645             : {
    1646      185850 :         USE_OPLINE
    1647      185850 :         uint32_t arg_num = opline->op1.num;
    1648             :         zval *param;
    1649             : 
    1650             :         SAVE_OPLINE();
    1651      371700 :         param = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->result.var TSRMLS_CC);
    1652      185850 :         if (arg_num > EX(num_args)) {
    1653       98384 :                 ZVAL_COPY_VALUE(param, opline->op2.zv);
    1654       98384 :                 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       98283 :                         if (UNEXPECTED(Z_OPT_COPYABLE_P(param))) {
    1659          29 :                                 zval_copy_ctor_func(param);
    1660             :                         }
    1661             :                 }
    1662             :         }
    1663             : 
    1664      185830 :         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      185828 :         ZEND_VM_NEXT_OPCODE();
    1670             : }
    1671             : 
    1672       33671 : static int ZEND_FASTCALL  ZEND_BRK_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1673             : {
    1674       33671 :         USE_OPLINE
    1675             :         zend_brk_cont_element *el;
    1676             : 
    1677             :         SAVE_OPLINE();
    1678       33671 :         el = zend_brk_cont(Z_LVAL_P(opline->op2.zv), opline->op1.opline_num,
    1679       33671 :                            &EX(func)->op_array, execute_data TSRMLS_CC);
    1680       33670 :         ZEND_VM_JMP(EX(func)->op_array.opcodes + el->brk);
    1681             : }
    1682             : 
    1683       44892 : static int ZEND_FASTCALL  ZEND_CONT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1684             : {
    1685       44892 :         USE_OPLINE
    1686             :         zend_brk_cont_element *el;
    1687             : 
    1688             :         SAVE_OPLINE();
    1689       44892 :         el = zend_brk_cont(Z_LVAL_P(opline->op2.zv), opline->op1.opline_num,
    1690       44892 :                            &EX(func)->op_array, execute_data TSRMLS_CC);
    1691       44892 :         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         363 : static int ZEND_FASTCALL  ZEND_ADD_INTERFACE_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1715             : {
    1716         363 :         USE_OPLINE
    1717         363 :         zend_class_entry *ce = Z_CE_P(EX_VAR(opline->op1.var));
    1718             :         zend_class_entry *iface;
    1719             : 
    1720             :         SAVE_OPLINE();
    1721         363 :         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         363 :                 iface = zend_fetch_class_by_name(Z_STR_P(opline->op2.zv), opline->op2.zv + 1, ZEND_FETCH_CLASS_INTERFACE TSRMLS_CC);
    1725         361 :                 if (UNEXPECTED(iface == NULL)) {
    1726             :                         CHECK_EXCEPTION();
    1727           1 :                         ZEND_VM_NEXT_OPCODE();
    1728             :                 }
    1729         360 :                 CACHE_PTR(Z_CACHE_SLOT_P(opline->op2.zv), iface);
    1730             :         }
    1731             : 
    1732         360 :         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         356 :         zend_do_implement_interface(ce, iface TSRMLS_CC);
    1736             : 
    1737             :         CHECK_EXCEPTION();
    1738         333 :         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 TSRMLS_CC);
    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.var);
    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 TSRMLS_CC);
    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.var);
    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.var);
    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.var);
    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 TSRMLS_CC);
    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.var);
    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 TSRMLS_CC);
    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.var);
    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.var != 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.var);
    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.var);
    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        3069 : static int ZEND_FASTCALL  ZEND_FETCH_CLASS_SPEC_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2114             : {
    2115        3069 :         USE_OPLINE
    2116             : 
    2117             :         SAVE_OPLINE();
    2118        3069 :         if (EG(exception)) {
    2119           0 :                 zend_exception_save(TSRMLS_C);
    2120             :         }
    2121             :         if (IS_UNUSED == IS_UNUSED) {
    2122        3069 :                 Z_CE_P(EX_VAR(opline->result.var)) = zend_fetch_class(NULL, opline->extended_value TSRMLS_CC);
    2123             :                 CHECK_EXCEPTION();
    2124        3069 :                 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        1121 : static int ZEND_FASTCALL  ZEND_FETCH_CLASS_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2153             : {
    2154        1121 :         USE_OPLINE
    2155             : 
    2156             :         SAVE_OPLINE();
    2157        1121 :         if (EG(exception)) {
    2158           0 :                 zend_exception_save(TSRMLS_C);
    2159             :         }
    2160        1121 :         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        2242 :                 zval *class_name = _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
    2167             : 
    2168        1121 :                 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        1121 :                 } 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        1102 :                 } else if (Z_TYPE_P(class_name) == IS_STRING) {
    2178        1099 :                         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        1113 :                 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       48386 : static int ZEND_FASTCALL  ZEND_ECHO_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2363             : {
    2364       48386 :         USE_OPLINE
    2365             : 
    2366             :         zval *z;
    2367             : 
    2368             :         SAVE_OPLINE();
    2369       48386 :         z = opline->op1.zv;
    2370             : 
    2371       48386 :         zend_print_variable(z TSRMLS_CC);
    2372             : 
    2373             :         CHECK_EXCEPTION();
    2374       48385 :         ZEND_VM_NEXT_OPCODE();
    2375             : }
    2376             : 
    2377        1575 : static int ZEND_FASTCALL  ZEND_PRINT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2378             : {
    2379        1575 :         USE_OPLINE
    2380             : 
    2381        1575 :         ZVAL_LONG(EX_VAR(opline->result.var), 1);
    2382        1575 :         return ZEND_ECHO_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    2383             : }
    2384             : 
    2385     1997789 : static int ZEND_FASTCALL  ZEND_JMPZ_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2386             : {
    2387     1997789 :         USE_OPLINE
    2388             : 
    2389             :         zval *val;
    2390             : 
    2391             :         SAVE_OPLINE();
    2392     1997789 :         val = opline->op1.zv;
    2393             : 
    2394     1997789 :         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     1997789 :         if (i_zend_is_true(val TSRMLS_CC)) {
    2405     1997356 :                 opline++;
    2406             :         } else {
    2407         433 :                 opline = opline->op2.jmp_addr;
    2408             :         }
    2409             : 
    2410     1997789 :         if (UNEXPECTED(EG(exception) != NULL)) {
    2411           0 :                 HANDLE_EXCEPTION();
    2412             :         }
    2413     1997789 :         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      560327 : static int ZEND_FASTCALL  ZEND_RETURN_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2549             : {
    2550      560327 :         USE_OPLINE
    2551             :         zval *retval_ptr;
    2552             : 
    2553             : 
    2554             :         SAVE_OPLINE();
    2555      560327 :         retval_ptr = opline->op1.zv;
    2556             : 
    2557      560327 :         if (!EX(return_value)) {
    2558             : 
    2559             :         } else {
    2560             :                 if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    2561      245252 :                         ZVAL_COPY_VALUE(EX(return_value), retval_ptr);
    2562             :                         if (IS_CONST == IS_CONST) {
    2563      245252 :                                 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      560327 :         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     9522268 : static int ZEND_FASTCALL  ZEND_SEND_VAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2668             : {
    2669     9522268 :         USE_OPLINE
    2670             :         zval *value, *arg;
    2671             : 
    2672             : 
    2673             :         SAVE_OPLINE();
    2674     9522268 :         value = opline->op1.zv;
    2675     9522268 :         arg = ZEND_CALL_ARG(EX(call), opline->op2.num);
    2676     9522268 :         EX(call)->num_args = opline->op2.num;
    2677     9522268 :         ZVAL_COPY_VALUE(arg, value);
    2678             :         if (IS_CONST == IS_CONST) {
    2679     9522268 :                 if (UNEXPECTED(Z_OPT_COPYABLE_P(arg))) {
    2680       88026 :                         zval_copy_ctor_func(arg);
    2681             :                 }
    2682             :         }
    2683     9522268 :         ZEND_VM_NEXT_OPCODE();
    2684             : }
    2685             : 
    2686      245097 : static int ZEND_FASTCALL  ZEND_SEND_VAL_EX_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2687             : {
    2688      245097 :         USE_OPLINE
    2689             :         zval *value, *arg;
    2690             : 
    2691             : 
    2692             :         SAVE_OPLINE();
    2693      490194 :         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      245094 :         value = opline->op1.zv;
    2697      245094 :         arg = ZEND_CALL_ARG(EX(call), opline->op2.num);
    2698      245094 :         EX(call)->num_args = opline->op2.num;
    2699      245094 :         ZVAL_COPY_VALUE(arg, value);
    2700             :         if (IS_CONST == IS_CONST) {
    2701      245094 :                 if (UNEXPECTED(Z_OPT_COPYABLE_P(arg))) {
    2702        1165 :                         zval_copy_ctor_func(arg);
    2703             :                 }
    2704             :         }
    2705      245094 :         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      460025 : static int ZEND_FASTCALL  ZEND_NEW_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2723             : {
    2724      460025 :         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      460025 :                 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       11780 :                         ce = zend_fetch_class_by_name(Z_STR_P(opline->op1.zv), opline->op1.zv + 1, 0 TSRMLS_CC);
    2735       11767 :                         if (UNEXPECTED(ce == NULL)) {
    2736             :                                 CHECK_EXCEPTION();
    2737           1 :                                 ZEND_VM_NEXT_OPCODE();
    2738             :                         }
    2739       11766 :                         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      460011 :         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      460005 :         object_init_ex(&object_zval, ce);
    2754      460004 :         constructor = Z_OBJ_HT(object_zval)->get_constructor(Z_OBJ(object_zval) TSRMLS_CC);
    2755             : 
    2756      459996 :         if (constructor == NULL) {
    2757      174300 :                 if (RETURN_VALUE_USED(opline)) {
    2758      174290 :                         ZVAL_COPY_VALUE(EX_VAR(opline->result.var), &object_zval);
    2759             :                 } else {
    2760             :                         zval_ptr_dtor(&object_zval);
    2761             :                 }
    2762      174300 :                 ZEND_VM_JMP(opline->op2.jmp_addr);
    2763             :         } else {
    2764             :                 /* We are not handling overloaded classes right now */
    2765     1142784 :                 EX(call) = zend_vm_stack_push_call_frame(
    2766      285696 :                         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      285696 :                         opline->extended_value,
    2772             :                         ce,
    2773             :                         Z_OBJ(object_zval),
    2774             :                         EX(call) TSRMLS_CC);
    2775             : 
    2776      285696 :                 if (RETURN_VALUE_USED(opline)) {
    2777      275533 :                         ZVAL_COPY(EX_VAR(opline->result.var), &object_zval);
    2778      275533 :                         EX(call)->return_value = EX_VAR(opline->result.var);
    2779             :                 } else {
    2780       10163 :                         EX(call)->return_value = NULL;
    2781             :                 }
    2782             : 
    2783             :                 CHECK_EXCEPTION();
    2784      285696 :                 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        6469 : static int ZEND_FASTCALL  ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2947             : {
    2948        6469 :         USE_OPLINE
    2949        6469 :         zend_op_array *new_op_array=NULL;
    2950             : 
    2951             :         zval *inc_filename;
    2952             :         zval tmp_inc_filename;
    2953        6469 :         zend_bool failure_retval=0;
    2954             : 
    2955             :         SAVE_OPLINE();
    2956        6469 :         inc_filename = opline->op1.zv;
    2957             : 
    2958        6469 :         ZVAL_UNDEF(&tmp_inc_filename);
    2959        6469 :         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        6469 :         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        6469 :                 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        4287 :                                         resolved_path = zend_resolve_path(Z_STRVAL_P(inc_filename), (int)Z_STRLEN_P(inc_filename) TSRMLS_CC);
    2978        4287 :                                         if (resolved_path) {
    2979        4283 :                                                 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        4287 :                                         if (failure_retval) {
    2985             :                                                 /* do nothing, file already included */
    2986        3625 :                                         } else if (SUCCESS == zend_stream_open(resolved_path, &file_handle TSRMLS_CC)) {
    2987             : 
    2988        3623 :                                                 if (!file_handle.opened_path) {
    2989           4 :                                                         file_handle.opened_path = estrdup(resolved_path);
    2990             :                                                 }
    2991             : 
    2992        3623 :                                                 if (zend_hash_str_add_empty_element(&EG(included_files), file_handle.opened_path, (int)strlen(file_handle.opened_path))) {
    2993        3622 :                                                         new_op_array = zend_compile_file(&file_handle, (opline->extended_value==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE) TSRMLS_CC);
    2994        3622 :                                                         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        4285 :                                         if (resolved_path != Z_STRVAL_P(inc_filename)) {
    3007        4283 :                                                 efree(resolved_path);
    3008             :                                         }
    3009             :                                 }
    3010        4285 :                                 break;
    3011             :                         case ZEND_INCLUDE:
    3012             :                         case ZEND_REQUIRE:
    3013        2122 :                                 new_op_array = compile_filename(opline->extended_value, inc_filename TSRMLS_CC);
    3014        2120 :                                 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        6463 :         if (Z_TYPE(tmp_inc_filename) != IS_UNDEF) {
    3026             :                 zval_ptr_dtor(&tmp_inc_filename);
    3027             :         }
    3028             : 
    3029        6463 :         if (UNEXPECTED(EG(exception) != NULL)) {
    3030           0 :                 HANDLE_EXCEPTION();
    3031        6463 :         } else if (EXPECTED(new_op_array != NULL)) {
    3032        5786 :                 zval *return_value = NULL;
    3033             :                 zend_execute_data *call;
    3034             : 
    3035        5786 :                 if (RETURN_VALUE_USED(opline)) {
    3036           1 :                         return_value = EX_VAR(opline->result.var);
    3037             :                 }
    3038             : 
    3039       11572 :                 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        5786 :                 if (EX(symbol_table)) {
    3043        5755 :                         call->symbol_table = EX(symbol_table);
    3044             :                 } else {
    3045          31 :                         call->symbol_table = zend_rebuild_symbol_table(TSRMLS_C);
    3046             :                 }
    3047             : 
    3048        5786 :                 call->prev_execute_data = execute_data;
    3049             :             i_init_code_execute_data(call, new_op_array, return_value TSRMLS_CC);
    3050        5786 :                 if (EXPECTED(zend_execute_ex == execute_ex)) {
    3051        5786 :                         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       13351 : static int ZEND_FASTCALL  ZEND_FE_RESET_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3071             : {
    3072       13351 :         USE_OPLINE
    3073             : 
    3074             :         zval *array_ptr, *array_ref, iterator, tmp;
    3075             :         HashTable *fe_ht;
    3076       13351 :         zend_object_iterator *iter = NULL;
    3077       13351 :         zend_class_entry *ce = NULL;
    3078       13351 :         zend_bool is_empty = 0;
    3079             : 
    3080             :         SAVE_OPLINE();
    3081             : 
    3082       13351 :         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       13351 :                 array_ptr = array_ref = opline->op1.zv;
    3104       13351 :                 ZVAL_DEREF(array_ptr);
    3105       13351 :                 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       13351 :                 } 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       13351 :                 } 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       13351 :                 } 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       13351 :                                 if (IS_CONST == IS_VAR) {
    3142             :                                         Z_DELREF_P(array_ref);
    3143             :                                 }
    3144       13351 :                                 ZVAL_DUP(&tmp, array_ref);
    3145       13351 :                                 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       13351 :         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       13351 :         ZVAL_COPY_VALUE(EX_VAR(opline->result.var), array_ref);
    3188             : 
    3189       13351 :         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       13351 :         } else if ((fe_ht = HASH_OF(array_ptr)) != NULL) {
    3211       13351 :                 HashPointer *ptr = (HashPointer*)EX_VAR((opline+2)->op1.var);
    3212       13351 :                 HashPosition pos = 0;
    3213             :                 Bucket *p;
    3214             : 
    3215             :                 while (1) {
    3216       13352 :                         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       13352 :                         p = fe_ht->arData + pos;
    3224       40055 :                         if (Z_TYPE(p->val) == IS_UNDEF ||
    3225       13351 :                             (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       13351 :                         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       13351 :                 fe_ht->nInternalPointer = pos;
    3238       13351 :                 ptr->pos = pos;
    3239       13351 :                 ptr->ht = fe_ht;
    3240       13351 :                 ptr->h = fe_ht->arData[pos].h;
    3241       13351 :                 ptr->key = fe_ht->arData[pos].key;
    3242       13351 :                 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       13351 :         if (is_empty) {
    3252           0 :                 ZEND_VM_JMP(opline->op2.jmp_addr);
    3253             :         } else {
    3254             :                 CHECK_EXCEPTION();
    3255       13351 :                 ZEND_VM_NEXT_OPCODE();
    3256             :         }
    3257             : }
    3258             : 
    3259         783 : static int ZEND_FASTCALL  ZEND_EXIT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3260             : {
    3261             : #if 0 || (IS_CONST != IS_UNUSED)
    3262         783 :         USE_OPLINE
    3263             : 
    3264             :         SAVE_OPLINE();
    3265             :         if (IS_CONST != IS_UNUSED) {
    3266             : 
    3267         783 :                 zval *ptr = opline->op1.zv;
    3268             : 
    3269         783 :                 if (Z_TYPE_P(ptr) == IS_LONG) {
    3270          31 :                         EG(exit_status) = Z_LVAL_P(ptr);
    3271             :                 } else {
    3272         752 :                         zend_print_variable(ptr TSRMLS_CC);
    3273             :                 }
    3274             : 
    3275             :         }
    3276             : #endif
    3277         783 :         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      530295 : static int ZEND_FASTCALL  ZEND_QM_ASSIGN_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3349             : {
    3350      530295 :         USE_OPLINE
    3351             : 
    3352             :         zval *value;
    3353             : 
    3354             :         SAVE_OPLINE();
    3355      530295 :         value = opline->op1.zv;
    3356             : 
    3357      530295 :         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      530295 :                 ZVAL_COPY_VALUE(EX_VAR(opline->result.var), value);
    3362             :                 if (IS_CONST == IS_CONST) {
    3363      530295 :                         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      530295 :         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.var)) {
    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             :         zval *retval;
    4029             :         zend_property_info *prop_info;
    4030             : 
    4031             :         SAVE_OPLINE();
    4032           1 :         container = opline->op1.zv;
    4033           1 :         offset  = opline->op2.zv;
    4034             : 
    4035           2 :         if ((IS_CONST != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT)) ||
    4036           0 :             UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
    4037           1 :                 ZVAL_NULL(EX_VAR(opline->result.var));
    4038             :         } else {
    4039             :                 zval *retval;
    4040             : 
    4041             :                 /* here we are sure we are dealing with an object */
    4042             :                 do {
    4043           0 :                         if (IS_CONST == IS_CONST &&
    4044           0 :                             EXPECTED(Z_OBJCE_P(container) == CACHED_PTR(Z_CACHE_SLOT_P(offset)))) {
    4045           0 :                                 zend_property_info *prop_info = CACHED_PTR(Z_CACHE_SLOT_P(offset) + 1);
    4046           0 :                                 zend_object *zobj = Z_OBJ_P(container);
    4047             : 
    4048           0 :                                 if (EXPECTED(prop_info)) {
    4049           0 :                                         retval = OBJ_PROP(zobj, prop_info->offset);
    4050           0 :                                         if (EXPECTED(Z_TYPE_P(retval) != IS_UNDEF)) {
    4051           0 :                                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    4052           0 :                                                 break;
    4053             :                                         }
    4054           0 :                                 } else if (EXPECTED(zobj->properties != NULL)) {
    4055           0 :                                         retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
    4056           0 :                                         if (EXPECTED(retval)) {
    4057           0 :                                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    4058           0 :                                                 break;
    4059             :                                         }
    4060             :                                 }
    4061             :                         }
    4062             : 
    4063           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);
    4064             : 
    4065           0 :                         if (retval != EX_VAR(opline->result.var)) {
    4066           0 :                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    4067             :                         }
    4068             :                 } while (0);
    4069             :         }
    4070             : 
    4071             : 
    4072             :         CHECK_EXCEPTION();
    4073           1 :         ZEND_VM_NEXT_OPCODE();
    4074             : }
    4075             : 
    4076           1 : static int ZEND_FASTCALL  ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4077             : {
    4078           1 :         USE_OPLINE
    4079             :         zval *container;
    4080             : 
    4081           2 :         if (zend_is_by_ref_func_arg_fetch(opline, EX(call) TSRMLS_CC)) {
    4082             :                 /* Behave like FETCH_OBJ_W */
    4083             :                 zend_free_op free_op1;
    4084             :                 zval *property;
    4085             : 
    4086             :                 SAVE_OPLINE();
    4087           1 :                 property = opline->op2.zv;
    4088           1 :                 container = NULL;
    4089             : 
    4090             :         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    4091           1 :             zend_error_noreturn(E_ERROR, "Cannot use temporary expression in write context");
    4092             :         }
    4093             :                 if (IS_CONST == IS_VAR && UNEXPECTED(container == NULL)) {
    4094             :                         zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
    4095             :                 }
    4096             :                 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);
    4097             : 
    4098             :                 if (IS_CONST == IS_VAR && READY_TO_DESTROY(free_op1.var)) {
    4099             :                         EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
    4100             :                 }
    4101             : 
    4102             :                 CHECK_EXCEPTION();
    4103             :                 ZEND_VM_NEXT_OPCODE();
    4104             :         } else {
    4105           0 :                 return ZEND_FETCH_OBJ_R_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    4106             :         }
    4107             : }
    4108             : 
    4109          27 : static int ZEND_FASTCALL  ZEND_FETCH_LIST_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4110             : {
    4111          27 :         USE_OPLINE
    4112             : 
    4113             :         zval *container;
    4114             : 
    4115             :         SAVE_OPLINE();
    4116          27 :         container = opline->op1.zv;
    4117             : 
    4118          27 :         if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
    4119             : 
    4120          42 :                 zval *value = zend_fetch_dimension_address_inner(Z_ARRVAL_P(container), opline->op2.zv, IS_CONST, BP_VAR_R TSRMLS_CC);
    4121             : 
    4122          21 :                 ZVAL_COPY(EX_VAR(opline->result.var), value);
    4123           6 :         } else if (UNEXPECTED(Z_TYPE_P(container) == IS_OBJECT) &&
    4124           0 :                    EXPECTED(Z_OBJ_HT_P(container)->read_dimension)) {
    4125           0 :                 zval *result = EX_VAR(opline->result.var);
    4126           0 :                 zval *retval = Z_OBJ_HT_P(container)->read_dimension(container, opline->op2.zv, BP_VAR_R, result TSRMLS_CC);
    4127             : 
    4128           0 :                 if (retval) {
    4129           0 :                         if (result != retval) {
    4130           0 :                                 ZVAL_COPY(result, retval);
    4131             :                         }
    4132             :                 } else {
    4133           0 :                         ZVAL_NULL(result);
    4134             :                 }
    4135             :         } else {
    4136           6 :                 ZVAL_NULL(EX_VAR(opline->result.var));
    4137             :         }
    4138             :         CHECK_EXCEPTION();
    4139          27 :         ZEND_VM_NEXT_OPCODE();
    4140             : }
    4141             : 
    4142        5330 : static int ZEND_FASTCALL  ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4143             : {
    4144        5330 :         USE_OPLINE
    4145             :         zval *function_name;
    4146             :         zend_class_entry *ce;
    4147             :         zend_object *object;
    4148             :         zend_function *fbc;
    4149             : 
    4150             :         SAVE_OPLINE();
    4151             : 
    4152             :         if (IS_CONST == IS_CONST) {
    4153             :                 /* no function found. try a static method in class */
    4154        5330 :                 if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op1.zv))) {
    4155        2690 :                         ce = CACHED_PTR(Z_CACHE_SLOT_P(opline->op1.zv));
    4156             :                 } else {
    4157        2640 :                         ce = zend_fetch_class_by_name(Z_STR_P(opline->op1.zv), opline->op1.zv + 1, ZEND_FETCH_CLASS_DEFAULT TSRMLS_CC);
    4158        2640 :                         if (UNEXPECTED(EG(exception) != NULL)) {
    4159           2 :                                 HANDLE_EXCEPTION();
    4160             :                         }
    4161        2638 :                         if (UNEXPECTED(ce == NULL)) {
    4162           0 :                                 zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op1.zv));
    4163             :                         }
    4164        2638 :                         CACHE_PTR(Z_CACHE_SLOT_P(opline->op1.zv), ce);
    4165             :                 }
    4166             :         } else {
    4167             :                 ce = Z_CE_P(EX_VAR(opline->op1.var));
    4168             :         }
    4169             : 
    4170        5328 :         if (IS_CONST == IS_CONST &&
    4171             :             IS_CONST == IS_CONST &&
    4172        5328 :             CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv))) {
    4173        2679 :                 fbc = CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv));
    4174        2649 :         } else if (IS_CONST != IS_CONST &&
    4175             :                    IS_CONST == IS_CONST &&
    4176             :                    (fbc = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(opline->op2.zv), ce))) {
    4177             :                 /* do nothing */
    4178             :         } else if (IS_CONST != IS_UNUSED) {
    4179             : 
    4180             : 
    4181        2649 :                 function_name = opline->op2.zv;
    4182        2649 :                 if (IS_CONST != IS_CONST) {
    4183             :                         if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
    4184             :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    4185             :                                         HANDLE_EXCEPTION();
    4186             :                                 }
    4187             :                                 zend_error_noreturn(E_ERROR, "Function name must be a string");
    4188             :                         }
    4189             :                 }
    4190             : 
    4191        2649 :                 if (ce->get_static_method) {
    4192           0 :                         fbc = ce->get_static_method(ce, Z_STR_P(function_name) TSRMLS_CC);
    4193             :                 } else {
    4194        2649 :                         fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_CONST == IS_CONST) ? (opline->op2.zv + 1) : NULL) TSRMLS_CC);
    4195             :                 }
    4196        2642 :                 if (UNEXPECTED(fbc == NULL)) {
    4197           3 :                         zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", ce->name->val, Z_STRVAL_P(function_name));
    4198             :                 }
    4199        5278 :                 if (IS_CONST == IS_CONST &&
    4200        2639 :                     EXPECTED(fbc->type <= ZEND_USER_FUNCTION) &&
    4201        2639 :                     EXPECTED((fbc->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0)) {
    4202             :                         if (IS_CONST == IS_CONST) {
    4203        2614 :                                 CACHE_PTR(Z_CACHE_SLOT_P(function_name), fbc);
    4204             :                         } else {
    4205             :                                 CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), ce, fbc);
    4206             :                         }
    4207             :                 }
    4208             :                 if (IS_CONST != IS_CONST) {
    4209             : 
    4210             :                 }
    4211             :         } else {
    4212             :                 if (UNEXPECTED(ce->constructor == NULL)) {
    4213             :                         zend_error_noreturn(E_ERROR, "Cannot call constructor");
    4214             :                 }
    4215             :                 if (Z_OBJ(EX(This)) && Z_OBJ(EX(This))->ce != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
    4216             :                         zend_error_noreturn(E_ERROR, "Cannot call private %s::__construct()", ce->name->val);
    4217             :                 }
    4218             :                 fbc = ce->constructor;
    4219             :         }
    4220             : 
    4221        5318 :         object = NULL;
    4222        5318 :         if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
    4223          83 :                 if (Z_OBJ(EX(This))) {
    4224          60 :                         object = Z_OBJ(EX(This));
    4225          60 :                         GC_REFCOUNT(object)++;
    4226             :                 }
    4227         143 :                 if (!object ||
    4228          60 :                     !instanceof_function(object->ce, ce TSRMLS_CC)) {
    4229             :                     /* We are calling method of the other (incompatible) class,
    4230             :                        but passing $this. This is done for compatibility with php-4. */
    4231          25 :                         if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
    4232          51 :                                 zend_error(
    4233             :                                         object ? E_DEPRECATED : E_STRICT,
    4234             :                                         "Non-static method %s::%s() should not be called statically%s",
    4235          34 :                                         fbc->common.scope->name->val, fbc->common.function_name->val,
    4236             :                                         object ? ", assuming $this from incompatible context" : "");
    4237             :                         } else {
    4238             :                                 /* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
    4239          24 :                                 zend_error_noreturn(
    4240             :                                         E_ERROR,
    4241             :                                         "Non-static method %s::%s() cannot be called statically%s",
    4242          16 :                                         fbc->common.scope->name->val, fbc->common.function_name->val,
    4243             :                                         object ? ", assuming $this from incompatible context" : "");
    4244             :                         }
    4245             :                 }
    4246             :         }
    4247             : 
    4248        5310 :         if (IS_CONST != IS_CONST) {
    4249             :                 /* previous opcode is ZEND_FETCH_CLASS */
    4250             :                 if ((opline-1)->extended_value == ZEND_FETCH_CLASS_PARENT || (opline-1)->extended_value == ZEND_FETCH_CLASS_SELF) {
    4251             :                         ce = EX(called_scope);
    4252             :                 }
    4253             :         }
    4254             : 
    4255       15930 :         EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
    4256        5310 :                 fbc, opline->extended_value, ce, object, EX(call) TSRMLS_CC);
    4257             : 
    4258        5310 :         if (IS_CONST == IS_UNUSED) {
    4259             :                 EX(call)->return_value = NULL;
    4260             :         }
    4261             : 
    4262             :         CHECK_EXCEPTION();
    4263        5310 :         ZEND_VM_NEXT_OPCODE();
    4264             : }
    4265             : 
    4266          75 : static int ZEND_FASTCALL  ZEND_INIT_USER_CALL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4267             : {
    4268          75 :         USE_OPLINE
    4269             : 
    4270          75 :         zval *function_name = opline->op2.zv;
    4271             :         zend_fcall_info_cache fcc;
    4272          75 :         char *error = NULL;
    4273             :         zend_function *func;
    4274             :         zend_class_entry *called_scope;
    4275             :         zend_object *object;
    4276             : 
    4277          75 :         if (zend_is_callable_ex(function_name, NULL, 0, NULL, &fcc, &error TSRMLS_CC)) {
    4278          66 :                 if (error) {
    4279           3 :                         efree(error);
    4280             :                 }
    4281          66 :                 func = fcc.function_handler;
    4282          66 :                 if (func->common.fn_flags & ZEND_ACC_CLOSURE) {
    4283             :                         /* Delay closure destruction until its invocation */
    4284           0 :                         func->common.prototype = (zend_function*)Z_OBJ_P(function_name);
    4285             :                         Z_ADDREF_P(function_name);
    4286             :                 }
    4287          66 :                 called_scope = fcc.called_scope;
    4288          66 :                 object = fcc.object;
    4289          66 :                 if (object) {
    4290          20 :                         GC_REFCOUNT(object)++; /* For $this pointer */
    4291          90 :                 } else if (func->common.scope &&
    4292          44 :                            !(func->common.fn_flags & ZEND_ACC_STATIC)) {
    4293           3 :                         if (func->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
    4294           6 :                                 zend_error(E_STRICT,
    4295             :                                 "Non-static method %s::%s() should not be called statically",
    4296           6 :                                 func->common.scope->name->val, func->common.function_name->val);
    4297             :                         } else {
    4298           0 :                                 zend_error_noreturn(
    4299             :                                         E_ERROR,
    4300             :                                         "Non-static method %s::%s() cannot be called statically",
    4301           0 :                                         func->common.scope->name->val, func->common.function_name->val);
    4302             :                         }
    4303             :                 }
    4304             :         } else {
    4305           9 :                 zend_error(E_WARNING, "%s() expects parameter 1 to be a valid callback, %s", Z_STRVAL_P(opline->op1.zv), error);
    4306           9 :                 efree(error);
    4307           9 :                 func = (zend_function*)&zend_pass_function;
    4308           9 :                 called_scope = NULL;
    4309           9 :                 object = NULL;
    4310             :         }
    4311             : 
    4312         225 :         EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
    4313          75 :                 func, opline->extended_value, called_scope, object, EX(call) TSRMLS_CC);
    4314             : 
    4315             :         CHECK_EXCEPTION();
    4316          75 :         ZEND_VM_NEXT_OPCODE();
    4317             : }
    4318             : 
    4319          10 : static int ZEND_FASTCALL  ZEND_CASE_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4320             : {
    4321          10 :         USE_OPLINE
    4322             : 
    4323          10 :         zval *result = EX_VAR(opline->result.var);
    4324             : 
    4325             :         SAVE_OPLINE();
    4326          10 :         fast_equal_function(result,
    4327             :                  opline->op1.zv,
    4328             :                  opline->op2.zv TSRMLS_CC);
    4329             : 
    4330             :         CHECK_EXCEPTION();
    4331          10 :         ZEND_VM_NEXT_OPCODE();
    4332             : }
    4333             : 
    4334        9034 : static int ZEND_FASTCALL  ZEND_FETCH_CONSTANT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4335             : {
    4336        9034 :         USE_OPLINE
    4337             : 
    4338             :         SAVE_OPLINE();
    4339        9034 :         if (IS_CONST == IS_UNUSED) {
    4340             :                 zend_constant *c;
    4341             :                 zval *retval;
    4342             : 
    4343             :                 if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv))) {
    4344             :                         c = CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv));
    4345             :                 } else if ((c = zend_quick_get_constant(opline->op2.zv + 1, opline->extended_value TSRMLS_CC)) == NULL) {
    4346             :                         if ((opline->extended_value & IS_CONSTANT_UNQUALIFIED) != 0) {
    4347             :                                 char *actual = (char *)zend_memrchr(Z_STRVAL_P(opline->op2.zv), '\\', Z_STRLEN_P(opline->op2.zv));
    4348             :                                 if (!actual) {
    4349             :                                         ZVAL_STR(EX_VAR(opline->result.var), zend_string_copy(Z_STR_P(opline->op2.zv)));
    4350             :                                 } else {
    4351             :                                         actual++;
    4352             :                                         ZVAL_STRINGL(EX_VAR(opline->result.var),
    4353             :                                                         actual, Z_STRLEN_P(opline->op2.zv) - (actual - Z_STRVAL_P(opline->op2.zv)));
    4354             :                                 }
    4355             :                                 /* non-qualified constant - allow text substitution */
    4356             :                                 zend_error(E_NOTICE, "Use of undefined constant %s - assumed '%s'",
    4357             :                                                 Z_STRVAL_P(EX_VAR(opline->result.var)), Z_STRVAL_P(EX_VAR(opline->result.var)));
    4358             :                                 CHECK_EXCEPTION();
    4359             :                                 ZEND_VM_NEXT_OPCODE();
    4360             :                         } else {
    4361             :                                 zend_error_noreturn(E_ERROR, "Undefined constant '%s'", Z_STRVAL_P(opline->op2.zv));
    4362             :                         }
    4363             :                 } else {
    4364             :                         CACHE_PTR(Z_CACHE_SLOT_P(opline->op2.zv), c);
    4365             :                 }
    4366             :                 retval = EX_VAR(opline->result.var);
    4367             :                 ZVAL_COPY_VALUE(retval, &c->value);
    4368             :                 if (Z_OPT_COPYABLE_P(retval) || Z_OPT_REFCOUNTED_P(retval)) {
    4369             :                         if (Z_OPT_COPYABLE_P(retval)) {
    4370             :                                 zval_copy_ctor_func(retval);
    4371             :                         } else {
    4372             :                                 Z_ADDREF_P(retval);
    4373             :                         }
    4374             :                 }
    4375             :         } else {
    4376             :                 /* class constant */
    4377             :                 zend_class_entry *ce;
    4378             :                 zval *value;
    4379             : 
    4380             :                 if (IS_CONST == IS_CONST) {
    4381        9034 :                         if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv))) {
    4382        1906 :                                 value = CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv));
    4383        1906 :                                 ZVAL_DEREF(value);
    4384        1906 :                                 ZVAL_DUP(EX_VAR(opline->result.var), value);
    4385        1906 :                                 goto constant_fetch_end;
    4386        7128 :                         } else if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op1.zv))) {
    4387           0 :                                 ce = CACHED_PTR(Z_CACHE_SLOT_P(opline->op1.zv));
    4388             :                         } else {
    4389        7128 :                                 ce = zend_fetch_class_by_name(Z_STR_P(opline->op1.zv), opline->op1.zv + 1, 0 TSRMLS_CC);
    4390        7127 :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    4391           1 :                                         HANDLE_EXCEPTION();
    4392             :                                 }
    4393        7126 :                                 if (UNEXPECTED(ce == NULL)) {
    4394           0 :                                         zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op1.zv));
    4395             :                                 }
    4396        7126 :                                 CACHE_PTR(Z_CACHE_SLOT_P(opline->op1.zv), ce);
    4397             :                         }
    4398             :                 } else {
    4399             :                         ce = Z_CE_P(EX_VAR(opline->op1.var));
    4400             :                         if ((value = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(opline->op2.zv), ce)) != NULL) {
    4401             :                                 ZVAL_DEREF(value);
    4402             :                                 ZVAL_DUP(EX_VAR(opline->result.var), value);
    4403             :                                 goto constant_fetch_end;
    4404             :                         }
    4405             :                 }
    4406             : 
    4407        7126 :                 if (EXPECTED((value = zend_hash_find(&ce->constants_table, Z_STR_P(opline->op2.zv))) != NULL)) {
    4408        7124 :                         ZVAL_DEREF(value);
    4409        7124 :                         if (Z_CONSTANT_P(value)) {
    4410          26 :                                 EG(scope) = ce;
    4411          26 :                                 zval_update_constant(value, 1 TSRMLS_CC);
    4412          23 :                                 EG(scope) = EX(scope);
    4413             :                         }
    4414             :                         if (IS_CONST == IS_CONST) {
    4415        7121 :                                 CACHE_PTR(Z_CACHE_SLOT_P(opline->op2.zv), value);
    4416             :                         } else {
    4417             :                                 CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(opline->op2.zv), ce, value);
    4418             :                         }
    4419        7121 :                         ZVAL_DUP(EX_VAR(opline->result.var), value);
    4420           2 :                 } else if (Z_STRLEN_P(opline->op2.zv) == sizeof("class")-1 && memcmp(Z_STRVAL_P(opline->op2.zv), "class", sizeof("class") - 1) == 0) {
    4421             :                         /* "class" is assigned as a case-sensitive keyword from zend_do_resolve_class_name */
    4422           0 :                         ZVAL_STR_COPY(EX_VAR(opline->result.var), ce->name);
    4423             :                 } else {
    4424           2 :                         zend_error_noreturn(E_ERROR, "Undefined class constant '%s'", Z_STRVAL_P(opline->op2.zv));
    4425             :                 }
    4426             :         }
    4427             : constant_fetch_end:
    4428             :         CHECK_EXCEPTION();
    4429        9027 :         ZEND_VM_NEXT_OPCODE();
    4430             : }
    4431             : 
    4432        5841 : static int ZEND_FASTCALL  ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4433             : {
    4434        5841 :         USE_OPLINE
    4435             : 
    4436             :         zval *expr_ptr, new_expr;
    4437             : 
    4438             :         SAVE_OPLINE();
    4439        5841 :         if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) &&
    4440             :             (opline->extended_value & ZEND_ARRAY_ELEMENT_REF)) {
    4441             :                 expr_ptr = NULL;
    4442             :                 if (IS_CONST == IS_VAR && UNEXPECTED(expr_ptr == NULL)) {
    4443             :                         zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets");
    4444             :                 }
    4445             :                 ZVAL_MAKE_REF(expr_ptr);
    4446             :                 Z_ADDREF_P(expr_ptr);
    4447             : 
    4448             :         } else {
    4449        5841 :                 expr_ptr = opline->op1.zv;
    4450        5841 :                 if (IS_CONST == IS_TMP_VAR) {
    4451             :                         ZVAL_COPY_VALUE(&new_expr, expr_ptr);
    4452             :                         expr_ptr = &new_expr;
    4453             :                 } else if (IS_CONST == IS_CONST) {
    4454        5841 :                         if (!Z_IMMUTABLE_P(expr_ptr)) {
    4455        5841 :                                 ZVAL_DUP(&new_expr, expr_ptr);
    4456        5841 :                                 expr_ptr = &new_expr;
    4457             :                         }
    4458             :                 } else if ((IS_CONST == IS_CV || IS_CONST == IS_VAR) && Z_ISREF_P(expr_ptr)) {
    4459             :                         expr_ptr = Z_REFVAL_P(expr_ptr);
    4460             :                         if (Z_REFCOUNTED_P(expr_ptr)) Z_ADDREF_P(expr_ptr);
    4461             : 
    4462             :                 } else if (IS_CONST == IS_CV && Z_REFCOUNTED_P(expr_ptr)) {
    4463             :                         Z_ADDREF_P(expr_ptr);
    4464             :                 }
    4465             :         }
    4466             : 
    4467             :         if (IS_CONST != IS_UNUSED) {
    4468             : 
    4469        5841 :                 zval *offset = opline->op2.zv;
    4470             :                 zend_string *str;
    4471             :                 zend_ulong hval;
    4472             : 
    4473             : add_again:
    4474        5841 :                 switch (Z_TYPE_P(offset)) {
    4475             :                         case IS_DOUBLE:
    4476          26 :                                 hval = zend_dval_to_lval(Z_DVAL_P(offset));
    4477          13 :                                 goto num_index;
    4478             :                         case IS_LONG:
    4479         213 :                                 hval = Z_LVAL_P(offset);
    4480             : num_index:
    4481         238 :                                 zend_hash_index_update(Z_ARRVAL_P(EX_VAR(opline->result.var)), hval, expr_ptr);
    4482         238 :                                 break;
    4483             :                         case IS_STRING:
    4484        5594 :                                 str = Z_STR_P(offset);
    4485        5594 :                                 if (IS_CONST != IS_CONST) {
    4486             :                                         if (ZEND_HANDLE_NUMERIC(str, hval)) {
    4487             :                                                 goto num_index;
    4488             :                                         }
    4489             :                                 }
    4490             : str_index:
    4491        5603 :                                 zend_hash_update(Z_ARRVAL_P(EX_VAR(opline->result.var)), str, expr_ptr);
    4492        5603 :                                 break;
    4493             :                         case IS_NULL:
    4494           9 :                                 str = STR_EMPTY_ALLOC();
    4495           9 :                                 goto str_index;
    4496             :                         case IS_FALSE:
    4497           7 :                                 hval = 0;
    4498           7 :                                 goto num_index;
    4499             :                         case IS_TRUE:
    4500           5 :                                 hval = 1;
    4501           5 :                                 goto num_index;
    4502             :                         case IS_REFERENCE:
    4503           0 :                                 offset = Z_REFVAL_P(offset);
    4504           0 :                                 goto add_again;
    4505             :                                 break;
    4506             :                         default:
    4507           0 :                                 zend_error(E_WARNING, "Illegal offset type");
    4508             :                                 zval_ptr_dtor(expr_ptr);
    4509             :                                 /* do nothing */
    4510             :                                 break;
    4511             :                 }
    4512             : 
    4513             :         } else {
    4514             :                 zend_hash_next_index_insert(Z_ARRVAL_P(EX_VAR(opline->result.var)), expr_ptr);
    4515             :         }
    4516             :         CHECK_EXCEPTION();
    4517        5841 :         ZEND_VM_NEXT_OPCODE();
    4518             : }
    4519             : 
    4520         595 : static int ZEND_FASTCALL  ZEND_INIT_ARRAY_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4521             : {
    4522             :         zval *array;
    4523             :         uint32_t size;
    4524         595 :         USE_OPLINE
    4525             : 
    4526         595 :         array = EX_VAR(opline->result.var);
    4527             :         if (IS_CONST != IS_UNUSED) {
    4528         595 :                 size = opline->extended_value >> ZEND_ARRAY_SIZE_SHIFT;
    4529             :         } else {
    4530             :                 size = 0;
    4531             :         }
    4532         595 :         ZVAL_NEW_ARR(array);
    4533         595 :         zend_hash_init(Z_ARRVAL_P(array), size, NULL, ZVAL_PTR_DTOR, 0);
    4534             : 
    4535             :         if (IS_CONST != IS_UNUSED) {
    4536             :                 /* Explicitly initialize array as not-packed if flag is set */
    4537         595 :                 if (opline->extended_value & ZEND_ARRAY_NOT_PACKED) {
    4538         576 :                         zend_hash_real_init(Z_ARRVAL_P(array), 0);
    4539             :                 }
    4540             :         }
    4541             : 
    4542         595 :         if (IS_CONST == IS_UNUSED) {
    4543             :                 ZEND_VM_NEXT_OPCODE();
    4544             : #if 0 || IS_CONST != IS_UNUSED
    4545             :         } else {
    4546         595 :                 return ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    4547             : #endif
    4548             :         }
    4549             : }
    4550             : 
    4551           1 : static int ZEND_FASTCALL  ZEND_UNSET_VAR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4552             : {
    4553           1 :         USE_OPLINE
    4554             :         zval tmp, *varname;
    4555             :         HashTable *target_symbol_table;
    4556             : 
    4557             : 
    4558             :         SAVE_OPLINE();
    4559           1 :         if (IS_CONST == IS_CV &&
    4560             :             IS_CONST == IS_UNUSED &&
    4561             :             (opline->extended_value & ZEND_QUICK_SET)) {
    4562             :                 zval *var = EX_VAR(opline->op1.var);
    4563             : 
    4564             :                 if (Z_REFCOUNTED_P(var)) {
    4565             :                         zend_refcounted *garbage = Z_COUNTED_P(var);
    4566             : 
    4567             :                         if (!--GC_REFCOUNT(garbage)) {
    4568             :                                 ZVAL_UNDEF(var);
    4569             :                                 _zval_dtor_func_for_ptr(garbage ZEND_FILE_LINE_CC);
    4570             :                         } else {
    4571             :                                 GC_ZVAL_CHECK_POSSIBLE_ROOT(var);
    4572             :                                 ZVAL_UNDEF(var);
    4573             :                         }
    4574             :                 } else {
    4575             :                         ZVAL_UNDEF(var);
    4576             :                 }
    4577             :                 CHECK_EXCEPTION();
    4578             :                 ZEND_VM_NEXT_OPCODE();
    4579             :         }
    4580             : 
    4581           1 :         varname = opline->op1.zv;
    4582             : 
    4583           1 :         ZVAL_UNDEF(&tmp);
    4584           1 :         if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
    4585             :                 ZVAL_STR(&tmp, zval_get_string(varname));
    4586             :                 varname = &tmp;
    4587             :         }
    4588             : 
    4589             :         if (IS_CONST != IS_UNUSED) {
    4590             :                 zend_class_entry *ce;
    4591             : 
    4592             :                 if (IS_CONST == IS_CONST) {
    4593           1 :                         if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv))) {
    4594           0 :                                 ce = CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv));
    4595             :                         } else {
    4596           1 :                                 ce = zend_fetch_class_by_name(Z_STR_P(opline->op2.zv), opline->op2.zv + 1, 0 TSRMLS_CC);
    4597           1 :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    4598           1 :                                         if (IS_CONST != IS_CONST) {
    4599             :                                                 zval_dtor(&tmp);
    4600             :                                         }
    4601             : 
    4602           1 :                                         HANDLE_EXCEPTION();
    4603             :                                 }
    4604           0 :                                 if (UNEXPECTED(ce == NULL)) {
    4605           0 :                                         zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op2.zv));
    4606             :                                 }
    4607           0 :                                 CACHE_PTR(Z_CACHE_SLOT_P(opline->op2.zv), ce);
    4608             :                         }
    4609             :                 } else {
    4610             :                         ce = Z_CE_P(EX_VAR(opline->op2.var));
    4611             :                 }
    4612           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);
    4613             :         } else {
    4614             :                 target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
    4615             :                 zend_hash_del_ind(target_symbol_table, Z_STR_P(varname));
    4616             :         }
    4617             : 
    4618           0 :         if (IS_CONST != IS_CONST) {
    4619             :                 zval_dtor(&tmp);
    4620             :         }
    4621             : 
    4622             :         CHECK_EXCEPTION();
    4623           0 :         ZEND_VM_NEXT_OPCODE();
    4624             : }
    4625             : 
    4626          44 : static int ZEND_FASTCALL  ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4627             : {
    4628          44 :         USE_OPLINE
    4629             :         zval *value;
    4630             : 
    4631             :         SAVE_OPLINE();
    4632          44 :         if (IS_CONST == IS_CV &&
    4633             :             IS_CONST == IS_UNUSED &&
    4634             :             (opline->extended_value & ZEND_QUICK_SET)) {
    4635             :                 value = EX_VAR(opline->op1.var);
    4636             :                 if (opline->extended_value & ZEND_ISSET) {
    4637             :                         ZVAL_BOOL(EX_VAR(opline->result.var),
    4638             :                                 Z_TYPE_P(value) > IS_NULL &&
    4639             :                             (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL));
    4640             :                 } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
    4641             :                         ZVAL_BOOL(EX_VAR(opline->result.var),
    4642             :                                 !i_zend_is_true(value TSRMLS_CC));
    4643             :                         CHECK_EXCEPTION();
    4644             :                 }
    4645             :                 ZEND_VM_NEXT_OPCODE();
    4646             :         } else {
    4647             : 
    4648          44 :                 zval tmp, *varname = opline->op1.zv;
    4649             : 
    4650          44 :                 if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
    4651             :                         ZVAL_STR(&tmp, zval_get_string(varname));
    4652             :                         varname = &tmp;
    4653             :                 }
    4654             : 
    4655             :                 if (IS_CONST != IS_UNUSED) {
    4656             :                         zend_class_entry *ce;
    4657             : 
    4658             :                         if (IS_CONST == IS_CONST) {
    4659          44 :                                 if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv))) {
    4660           0 :                                         ce = CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv));
    4661             :                                 } else {
    4662          44 :                                         ce = zend_fetch_class_by_name(Z_STR_P(opline->op2.zv), opline->op2.zv + 1, 0 TSRMLS_CC);
    4663          44 :                                         if (UNEXPECTED(ce == NULL)) {
    4664             :                                                 CHECK_EXCEPTION();
    4665           1 :                                                 ZEND_VM_NEXT_OPCODE();
    4666             :                                         }
    4667          43 :                                         CACHE_PTR(Z_CACHE_SLOT_P(opline->op2.zv), ce);
    4668             :                                 }
    4669             :                         } else {
    4670             :                                 ce = Z_CE_P(EX_VAR(opline->op2.var));
    4671             :                         }
    4672          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);
    4673             :                 } else {
    4674             :                         HashTable *target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
    4675             :                         value = zend_hash_find_ind(target_symbol_table, Z_STR_P(varname));
    4676             :                 }
    4677             : 
    4678          43 :                 if (IS_CONST != IS_CONST && varname == &tmp) {
    4679             :                         zval_dtor(&tmp);
    4680             :                 }
    4681             : 
    4682          43 :                 if (opline->extended_value & ZEND_ISSET) {
    4683          97 :                         ZVAL_BOOL(EX_VAR(opline->result.var),
    4684             :                                 value && Z_TYPE_P(value) > IS_NULL &&
    4685             :                             (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL));
    4686             :                 } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
    4687           0 :                         ZVAL_BOOL(EX_VAR(opline->result.var),
    4688             :                                 !value || !i_zend_is_true(value TSRMLS_CC));
    4689             :                 }
    4690             : 
    4691             :                 CHECK_EXCEPTION();
    4692          43 :                 ZEND_VM_NEXT_OPCODE();
    4693             :         }
    4694             : }
    4695             : 
    4696           2 : static int ZEND_FASTCALL  ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4697             : {
    4698           2 :         USE_OPLINE
    4699             : 
    4700             :         zval *container;
    4701             :         int result;
    4702             :         zend_ulong hval;
    4703             :         zval *offset;
    4704             : 
    4705             :         SAVE_OPLINE();
    4706           2 :         container = opline->op1.zv;
    4707           2 :         offset = opline->op2.zv;
    4708             : 
    4709           2 :         if (IS_CONST != IS_UNUSED && EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
    4710           2 :                 HashTable *ht = Z_ARRVAL_P(container);
    4711             :                 zval *value;
    4712             :                 zend_string *str;
    4713             : 
    4714             : isset_again:
    4715           2 :                 if (EXPECTED(Z_TYPE_P(offset) == IS_STRING)) {
    4716           0 :                         str = Z_STR_P(offset);
    4717           0 :                         if (IS_CONST != IS_CONST) {
    4718             :                                 if (ZEND_HANDLE_NUMERIC(str, hval)) {
    4719             :                                         goto num_index_prop;
    4720             :                                 }
    4721             :                         }
    4722             : str_index_prop:
    4723           0 :                         value = zend_hash_find_ind(ht, str);
    4724           2 :                 } else if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
    4725           2 :                         hval = Z_LVAL_P(offset);
    4726             : num_index_prop:
    4727           2 :                         value = zend_hash_index_find(ht, hval);
    4728             :                 } else {
    4729           0 :                         switch (Z_TYPE_P(offset)) {
    4730             :                                 case IS_DOUBLE:
    4731           0 :                                         hval = zend_dval_to_lval(Z_DVAL_P(offset));
    4732           0 :                                         goto num_index_prop;
    4733             :                                 case IS_NULL:
    4734           0 :                                         str = STR_EMPTY_ALLOC();
    4735           0 :                                         goto str_index_prop;
    4736             :                                 case IS_FALSE:
    4737           0 :                                         hval = 0;
    4738           0 :                                         goto num_index_prop;
    4739             :                                 case IS_TRUE:
    4740           0 :                                         hval = 1;
    4741           0 :                                         goto num_index_prop;
    4742             :                                 case IS_RESOURCE:
    4743           0 :                                         hval = Z_RES_HANDLE_P(offset);
    4744           0 :                                         goto num_index_prop;
    4745             :                                 case IS_REFERENCE:
    4746           0 :                                         offset = Z_REFVAL_P(offset);
    4747           0 :                                         goto isset_again;
    4748             :                                 default:
    4749           0 :                                         zend_error(E_WARNING, "Illegal offset type in isset or empty");
    4750           0 :                                         value = NULL;
    4751             :                                         break;
    4752             :                         }
    4753             :                 }
    4754             : 
    4755           2 :                 if (opline->extended_value & ZEND_ISSET) {
    4756             :                         /* > IS_NULL means not IS_UNDEF and not IS_NULL */
    4757           6 :                         result = value != NULL && Z_TYPE_P(value) > IS_NULL &&
    4758           0 :                             (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
    4759             :                 } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
    4760           0 :                         result = (value == NULL || !i_zend_is_true(value TSRMLS_CC));
    4761             :                 }
    4762           0 :         } else if (IS_CONST == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
    4763           0 :                 if (EXPECTED(Z_OBJ_HT_P(container)->has_dimension)) {
    4764           0 :                         result = Z_OBJ_HT_P(container)->has_dimension(container, offset, (opline->extended_value & ZEND_ISSET) == 0 TSRMLS_CC);
    4765             :                 } else {
    4766           0 :                         zend_error(E_NOTICE, "Trying to check element of non-array");
    4767           0 :                         result = 0;
    4768             :                 }
    4769           0 :                 if ((opline->extended_value & ZEND_ISSET) == 0) {
    4770           0 :                         result = !result;
    4771             :                 }
    4772           0 :         } else if (EXPECTED(Z_TYPE_P(container) == IS_STRING)) { /* string offsets */
    4773             :                 zval tmp;
    4774             : 
    4775           0 :                 result = 0;
    4776           0 :                 if (UNEXPECTED(Z_TYPE_P(offset) != IS_LONG)) {
    4777           0 :                         if (IS_CONST == IS_CV || IS_CONST == IS_VAR) {
    4778             :                                 ZVAL_DEREF(offset);
    4779             :                         }
    4780           0 :                         if (Z_TYPE_P(offset) < IS_STRING /* simple scalar types */
    4781             :                                         || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */
    4782           0 :                                                 && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) {
    4783           0 :                                 ZVAL_DUP(&tmp, offset);
    4784           0 :                                 convert_to_long(&tmp);
    4785           0 :                                 offset = &tmp;
    4786             :                         }
    4787             :                 }
    4788           0 :                 if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
    4789           0 :                         if (offset->value.lval >= 0 && (size_t)offset->value.lval < Z_STRLEN_P(container)) {
    4790           0 :                                 if ((opline->extended_value & ZEND_ISSET) ||
    4791           0 :                                     Z_STRVAL_P(container)[offset->value.lval] != '0') {
    4792           0 :                                         result = 1;
    4793             :                                 }
    4794             :                         }
    4795             :                 }
    4796           0 :                 if ((opline->extended_value & ZEND_ISSET) == 0) {
    4797           0 :                         result = !result;
    4798             :                 }
    4799             :         } else {
    4800           0 :                 result = ((opline->extended_value & ZEND_ISSET) == 0);
    4801             :         }
    4802             : 
    4803           2 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    4804             : 
    4805             :         CHECK_EXCEPTION();
    4806           2 :         ZEND_VM_NEXT_OPCODE();
    4807             : }
    4808             : 
    4809           3 : static int ZEND_FASTCALL  ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4810             : {
    4811           3 :         USE_OPLINE
    4812             : 
    4813             :         zval *container;
    4814             :         int result;
    4815             :         zval *offset;
    4816             : 
    4817             :         SAVE_OPLINE();
    4818           3 :         container = opline->op1.zv;
    4819           3 :         offset = opline->op2.zv;
    4820             : 
    4821           3 :         if (IS_CONST == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
    4822           0 :                 if (EXPECTED(Z_OBJ_HT_P(container)->has_property)) {
    4823           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);
    4824             :                 } else {
    4825           0 :                         zend_error(E_NOTICE, "Trying to check property of non-object");
    4826           0 :                         result = 0;
    4827             :                 }
    4828           0 :                 if ((opline->extended_value & ZEND_ISSET) == 0) {
    4829           0 :                         result = !result;
    4830             :                 }
    4831             :         } else {
    4832           3 :                 result = ((opline->extended_value & ZEND_ISSET) == 0);
    4833             :         }
    4834             : 
    4835           3 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    4836             : 
    4837             :         CHECK_EXCEPTION();
    4838           3 :         ZEND_VM_NEXT_OPCODE();
    4839             : }
    4840             : 
    4841         155 : static int ZEND_FASTCALL  ZEND_DECLARE_CONST_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4842             : {
    4843         155 :         USE_OPLINE
    4844             : 
    4845             :         zval *name;
    4846             :         zval *val;
    4847             :         zend_constant c;
    4848             : 
    4849             :         SAVE_OPLINE();
    4850         155 :         name  = opline->op1.zv;
    4851         155 :         val   = opline->op2.zv;
    4852             : 
    4853         155 :         ZVAL_COPY_VALUE(&c.value, val);
    4854         155 :         if (Z_OPT_CONSTANT(c.value)) {
    4855          34 :                 zval_update_constant(&c.value, 0 TSRMLS_CC);
    4856             :         } else {
    4857             :                 /* IS_CONST can't be IS_OBJECT, IS_RESOURCE or IS_REFERENCE */
    4858         121 :                 if (UNEXPECTED(Z_OPT_COPYABLE(c.value))) {
    4859           3 :                         zval_copy_ctor_func(&c.value);
    4860             :                 }
    4861             :         }
    4862         154 :         c.flags = CONST_CS; /* non persistent, case sensetive */
    4863         308 :         c.name = zend_string_dup(Z_STR_P(name), 0);
    4864         154 :         c.module_number = PHP_USER_CONSTANT;
    4865             : 
    4866         154 :         if (zend_register_constant(&c TSRMLS_CC) == FAILURE) {
    4867             :         }
    4868             : 
    4869             : 
    4870             :         CHECK_EXCEPTION();
    4871         154 :         ZEND_VM_NEXT_OPCODE();
    4872             : }
    4873             : 
    4874          12 : static int ZEND_FASTCALL  ZEND_YIELD_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4875             : {
    4876          12 :         USE_OPLINE
    4877             : 
    4878             :         /* The generator object is stored in EX(return_value) */
    4879          12 :         zend_generator *generator = (zend_generator *) EX(return_value);
    4880             : 
    4881          12 :         if (generator->flags & ZEND_GENERATOR_FORCED_CLOSE) {
    4882           0 :                 zend_error_noreturn(E_ERROR, "Cannot yield from finally in a force-closed generator");
    4883             :         }
    4884             : 
    4885             :         /* Destroy the previously yielded value */
    4886          12 :         zval_ptr_dtor(&generator->value);
    4887             : 
    4888             :         /* Destroy the previously yielded key */
    4889          12 :         zval_ptr_dtor(&generator->key);
    4890             : 
    4891             :         /* Set the new yielded value */
    4892             :         if (IS_CONST != IS_UNUSED) {
    4893             : 
    4894             : 
    4895          12 :                 if (EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE) {
    4896             :                         /* Constants and temporary variables aren't yieldable by reference,
    4897             :                          * but we still allow them with a notice. */
    4898             :                         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    4899             :                                 zval *value;
    4900             : 
    4901           0 :                                 zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    4902             : 
    4903           0 :                                 value = opline->op1.zv;
    4904           0 :                                 ZVAL_COPY_VALUE(&generator->value, value);
    4905           0 :                                 if (Z_OPT_REFCOUNTED(generator->value)) Z_SET_REFCOUNT(generator->value, 1);
    4906             : 
    4907             :                                 /* Temporary variables don't need ctor copying */
    4908             :                                 if (IS_CONST != IS_TMP_VAR) {
    4909           0 :                                         zval_opt_copy_ctor(&generator->value);
    4910             :                                 }
    4911             :                         } else {
    4912             :                                 zval *value_ptr = NULL;
    4913             : 
    4914             :                                 if (IS_CONST == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
    4915             :                                         zend_error_noreturn(E_ERROR, "Cannot yield string offsets by reference");
    4916             :                                 }
    4917             : 
    4918             :                                 /* If a function call result is yielded and the function did
    4919             :                                  * not return by reference we throw a notice. */
    4920             :                                 if (IS_CONST == IS_VAR &&
    4921             :                                     (value_ptr == &EG(uninitialized_zval) ||
    4922             :                                      (opline->extended_value == ZEND_RETURNS_FUNCTION &&
    4923             :                                       !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
    4924             :                                         zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    4925             :                                 } else {
    4926             :                                         ZVAL_MAKE_REF(value_ptr);
    4927             :                                 }
    4928             :                                 ZVAL_COPY(&generator->value, value_ptr);
    4929             : 
    4930             :                         }
    4931             :                 } else {
    4932          12 :                         zval *value = opline->op1.zv;
    4933             : 
    4934             :                         /* Consts, temporary variables and references need copying */
    4935             :                         if (IS_CONST == IS_CONST) {
    4936          12 :                                 ZVAL_DUP(&generator->value, value);
    4937             :                         } else if (IS_CONST == IS_TMP_VAR) {
    4938             :                                 ZVAL_COPY_VALUE(&generator->value, value);
    4939             :             } else if ((IS_CONST == IS_CV || IS_CONST == IS_VAR) && Z_ISREF_P(value)) {
    4940             :                                 ZVAL_DUP(&generator->value, Z_REFVAL_P(value));
    4941             : 
    4942             :                         } else {
    4943             :                                 ZVAL_COPY_VALUE(&generator->value, value);
    4944             :                                 if (IS_CONST == IS_CV) {
    4945             :                                         if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
    4946             :                                 }
    4947             :                         }
    4948             :                 }
    4949             :         } else {
    4950             :                 /* If no value was specified yield null */
    4951             :                 ZVAL_NULL(&generator->value);
    4952             :         }
    4953             : 
    4954             :         /* Set the new yielded key */
    4955             :         if (IS_CONST != IS_UNUSED) {
    4956             : 
    4957          12 :                 zval *key = opline->op2.zv;
    4958             : 
    4959             :                 /* Consts, temporary variables and references need copying */
    4960             :                 if (IS_CONST == IS_CONST) {
    4961          12 :                         ZVAL_DUP(&generator->key, key);
    4962             :                 } else if (IS_CONST == IS_TMP_VAR) {
    4963             :                         ZVAL_COPY_VALUE(&generator->key, key);
    4964             :                 } else if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) && Z_ISREF_P(key)) {
    4965             :                         ZVAL_DUP(&generator->key, Z_REFVAL_P(key));
    4966             : 
    4967             :                 } else {
    4968             :                         ZVAL_COPY_VALUE(&generator->key, key);
    4969             :                         if (IS_CONST == IS_CV) {
    4970             :                                 if (Z_OPT_REFCOUNTED_P(key)) Z_ADDREF_P(key);
    4971             :                         }
    4972             :                 }
    4973             : 
    4974          26 :                 if (Z_TYPE(generator->key) == IS_LONG
    4975           2 :                     && Z_LVAL(generator->key) > generator->largest_used_integer_key
    4976             :                 ) {
    4977           2 :                         generator->largest_used_integer_key = Z_LVAL(generator->key);
    4978             :                 }
    4979             :         } else {
    4980             :                 /* If no key was specified we use auto-increment keys */
    4981             :                 generator->largest_used_integer_key++;
    4982             :                 ZVAL_LONG(&generator->key, generator->largest_used_integer_key);
    4983             :         }
    4984             : 
    4985          12 :         if (RETURN_VALUE_USED(opline)) {
    4986             :                 /* If the return value of yield is used set the send
    4987             :                  * target and initialize it to NULL */
    4988           0 :                 generator->send_target = EX_VAR(opline->result.var);
    4989           0 :                 ZVAL_NULL(generator->send_target);
    4990             :         } else {
    4991          12 :                 generator->send_target = NULL;
    4992             :         }
    4993             : 
    4994             :         /* We increment to the next op, so we are at the correct position when the
    4995             :          * generator is resumed. */
    4996          12 :         ZEND_VM_INC_OPCODE();
    4997             : 
    4998             :         /* The GOTO VM uses a local opline variable. We need to set the opline
    4999             :          * variable in execute_data so we don't resume at an old position. */
    5000             :         SAVE_OPLINE();
    5001             : 
    5002          12 :         ZEND_VM_RETURN();
    5003             : }
    5004             : 
    5005           0 : static int ZEND_FASTCALL  ZEND_POW_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5006             : {
    5007           0 :         USE_OPLINE
    5008             : 
    5009             : 
    5010             :         SAVE_OPLINE();
    5011           0 :         pow_function(EX_VAR(opline->result.var),
    5012             :                 opline->op1.zv,
    5013             :                 opline->op2.zv TSRMLS_CC);
    5014             : 
    5015             : 
    5016             :         CHECK_EXCEPTION();
    5017           0 :         ZEND_VM_NEXT_OPCODE();
    5018             : }
    5019             : 
    5020       76101 : static int ZEND_FASTCALL  ZEND_ADD_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5021             : {
    5022       76101 :         USE_OPLINE
    5023             :         zend_free_op free_op2;
    5024             : 
    5025             :         SAVE_OPLINE();
    5026      152202 :         fast_add_function(EX_VAR(opline->result.var),
    5027             :                 opline->op1.zv,
    5028             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    5029             : 
    5030       76101 :         zval_ptr_dtor_nogc(free_op2.var);
    5031             :         CHECK_EXCEPTION();
    5032       76101 :         ZEND_VM_NEXT_OPCODE();
    5033             : }
    5034             : 
    5035        2135 : static int ZEND_FASTCALL  ZEND_SUB_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5036             : {
    5037        2135 :         USE_OPLINE
    5038             :         zend_free_op free_op2;
    5039             : 
    5040             :         SAVE_OPLINE();
    5041        4270 :         fast_sub_function(EX_VAR(opline->result.var),
    5042             :                 opline->op1.zv,
    5043             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    5044             : 
    5045        2135 :         zval_ptr_dtor_nogc(free_op2.var);
    5046             :         CHECK_EXCEPTION();
    5047        2135 :         ZEND_VM_NEXT_OPCODE();
    5048             : }
    5049             : 
    5050           2 : static int ZEND_FASTCALL  ZEND_MUL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5051             : {
    5052           2 :         USE_OPLINE
    5053             :         zend_free_op free_op2;
    5054             : 
    5055             :         SAVE_OPLINE();
    5056           4 :         fast_mul_function(EX_VAR(opline->result.var),
    5057             :                 opline->op1.zv,
    5058             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    5059             : 
    5060           2 :         zval_ptr_dtor_nogc(free_op2.var);
    5061             :         CHECK_EXCEPTION();
    5062           2 :         ZEND_VM_NEXT_OPCODE();
    5063             : }
    5064             : 
    5065           0 : static int ZEND_FASTCALL  ZEND_DIV_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5066             : {
    5067           0 :         USE_OPLINE
    5068             :         zend_free_op free_op2;
    5069             : 
    5070             :         SAVE_OPLINE();
    5071           0 :         fast_div_function(EX_VAR(opline->result.var),
    5072             :                 opline->op1.zv,
    5073             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    5074             : 
    5075           0 :         zval_ptr_dtor_nogc(free_op2.var);
    5076             :         CHECK_EXCEPTION();
    5077           0 :         ZEND_VM_NEXT_OPCODE();
    5078             : }
    5079             : 
    5080           0 : static int ZEND_FASTCALL  ZEND_MOD_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5081             : {
    5082           0 :         USE_OPLINE
    5083             :         zend_free_op free_op2;
    5084             : 
    5085             :         SAVE_OPLINE();
    5086           0 :         fast_mod_function(EX_VAR(opline->result.var),
    5087             :                 opline->op1.zv,
    5088             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    5089             : 
    5090           0 :         zval_ptr_dtor_nogc(free_op2.var);
    5091             :         CHECK_EXCEPTION();
    5092           0 :         ZEND_VM_NEXT_OPCODE();
    5093             : }
    5094             : 
    5095           0 : static int ZEND_FASTCALL  ZEND_SL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5096             : {
    5097           0 :         USE_OPLINE
    5098             :         zend_free_op free_op2;
    5099             : 
    5100             :         SAVE_OPLINE();
    5101           0 :         shift_left_function(EX_VAR(opline->result.var),
    5102             :                 opline->op1.zv,
    5103             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    5104             : 
    5105           0 :         zval_ptr_dtor_nogc(free_op2.var);
    5106             :         CHECK_EXCEPTION();
    5107           0 :         ZEND_VM_NEXT_OPCODE();
    5108             : }
    5109             : 
    5110           0 : static int ZEND_FASTCALL  ZEND_SR_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5111             : {
    5112           0 :         USE_OPLINE
    5113             :         zend_free_op free_op2;
    5114             : 
    5115             :         SAVE_OPLINE();
    5116           0 :         shift_right_function(EX_VAR(opline->result.var),
    5117             :                 opline->op1.zv,
    5118             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    5119             : 
    5120           0 :         zval_ptr_dtor_nogc(free_op2.var);
    5121             :         CHECK_EXCEPTION();
    5122           0 :         ZEND_VM_NEXT_OPCODE();
    5123             : }
    5124             : 
    5125        1775 : static int ZEND_FASTCALL  ZEND_CONCAT_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5126             : {
    5127        1775 :         USE_OPLINE
    5128             :         zend_free_op free_op2;
    5129             : 
    5130             :         SAVE_OPLINE();
    5131        3550 :         concat_function(EX_VAR(opline->result.var),
    5132             :                 opline->op1.zv,
    5133             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    5134             : 
    5135        1775 :         zval_ptr_dtor_nogc(free_op2.var);
    5136             :         CHECK_EXCEPTION();
    5137        1775 :         ZEND_VM_NEXT_OPCODE();
    5138             : }
    5139             : 
    5140           0 : static int ZEND_FASTCALL  ZEND_IS_IDENTICAL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5141             : {
    5142           0 :         USE_OPLINE
    5143             :         zend_free_op free_op2;
    5144             : 
    5145             :         SAVE_OPLINE();
    5146           0 :         fast_is_identical_function(EX_VAR(opline->result.var),
    5147             :                 opline->op1.zv,
    5148             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    5149             : 
    5150           0 :         zval_ptr_dtor_nogc(free_op2.var);
    5151             :         CHECK_EXCEPTION();
    5152           0 :         ZEND_VM_NEXT_OPCODE();
    5153             : }
    5154             : 
    5155           0 : static int ZEND_FASTCALL  ZEND_IS_NOT_IDENTICAL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5156             : {
    5157           0 :         USE_OPLINE
    5158             :         zend_free_op free_op2;
    5159           0 :         zval *result = EX_VAR(opline->result.var);
    5160             : 
    5161             :         SAVE_OPLINE();
    5162           0 :         fast_is_not_identical_function(result,
    5163             :                 opline->op1.zv,
    5164             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    5165             : 
    5166           0 :         zval_ptr_dtor_nogc(free_op2.var);
    5167             :         CHECK_EXCEPTION();
    5168           0 :         ZEND_VM_NEXT_OPCODE();
    5169             : }
    5170             : 
    5171          11 : static int ZEND_FASTCALL  ZEND_IS_EQUAL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5172             : {
    5173          11 :         USE_OPLINE
    5174             :         zend_free_op free_op2;
    5175          11 :         zval *result = EX_VAR(opline->result.var);
    5176             : 
    5177             :         SAVE_OPLINE();
    5178          22 :         fast_equal_function(result,
    5179             :                 opline->op1.zv,
    5180             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    5181             : 
    5182          11 :         zval_ptr_dtor_nogc(free_op2.var);
    5183             :         CHECK_EXCEPTION();
    5184          11 :         ZEND_VM_NEXT_OPCODE();
    5185             : }
    5186             : 
    5187           0 : static int ZEND_FASTCALL  ZEND_IS_NOT_EQUAL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5188             : {
    5189           0 :         USE_OPLINE
    5190             :         zend_free_op free_op2;
    5191           0 :         zval *result = EX_VAR(opline->result.var);
    5192             : 
    5193             :         SAVE_OPLINE();
    5194           0 :         fast_not_equal_function(result,
    5195             :                 opline->op1.zv,
    5196             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    5197             : 
    5198           0 :         zval_ptr_dtor_nogc(free_op2.var);
    5199             :         CHECK_EXCEPTION();
    5200           0 :         ZEND_VM_NEXT_OPCODE();
    5201             : }
    5202             : 
    5203      502517 : static int ZEND_FASTCALL  ZEND_IS_SMALLER_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5204             : {
    5205      502517 :         USE_OPLINE
    5206             :         zend_free_op free_op2;
    5207      502517 :         zval *result = EX_VAR(opline->result.var);
    5208             : 
    5209             :         SAVE_OPLINE();
    5210     1005034 :         fast_is_smaller_function(result,
    5211             :                 opline->op1.zv,
    5212             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    5213             : 
    5214      502517 :         zval_ptr_dtor_nogc(free_op2.var);
    5215             :         CHECK_EXCEPTION();
    5216      502517 :         ZEND_VM_NEXT_OPCODE();
    5217             : }
    5218             : 
    5219       18293 : static int ZEND_FASTCALL  ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5220             : {
    5221       18293 :         USE_OPLINE
    5222             :         zend_free_op free_op2;
    5223       18293 :         zval *result = EX_VAR(opline->result.var);
    5224             : 
    5225             :         SAVE_OPLINE();
    5226       36586 :         fast_is_smaller_or_equal_function(result,
    5227             :                 opline->op1.zv,
    5228             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    5229             : 
    5230       18293 :         zval_ptr_dtor_nogc(free_op2.var);
    5231             :         CHECK_EXCEPTION();
    5232       18293 :         ZEND_VM_NEXT_OPCODE();
    5233             : }
    5234             : 
    5235      451806 : static int ZEND_FASTCALL  ZEND_BW_OR_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5236             : {
    5237      451806 :         USE_OPLINE
    5238             :         zend_free_op free_op2;
    5239             : 
    5240             :         SAVE_OPLINE();
    5241      903612 :         bitwise_or_function(EX_VAR(opline->result.var),
    5242             :                 opline->op1.zv,
    5243             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    5244             : 
    5245      451806 :         zval_ptr_dtor_nogc(free_op2.var);
    5246             :         CHECK_EXCEPTION();
    5247      451806 :         ZEND_VM_NEXT_OPCODE();
    5248             : }
    5249             : 
    5250         100 : static int ZEND_FASTCALL  ZEND_BW_AND_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5251             : {
    5252         100 :         USE_OPLINE
    5253             :         zend_free_op free_op2;
    5254             : 
    5255             :         SAVE_OPLINE();
    5256         200 :         bitwise_and_function(EX_VAR(opline->result.var),
    5257             :                 opline->op1.zv,
    5258             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    5259             : 
    5260         100 :         zval_ptr_dtor_nogc(free_op2.var);
    5261             :         CHECK_EXCEPTION();
    5262         100 :         ZEND_VM_NEXT_OPCODE();
    5263             : }
    5264             : 
    5265           0 : static int ZEND_FASTCALL  ZEND_BW_XOR_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5266             : {
    5267           0 :         USE_OPLINE
    5268             :         zend_free_op free_op2;
    5269             : 
    5270             :         SAVE_OPLINE();
    5271           0 :         bitwise_xor_function(EX_VAR(opline->result.var),
    5272             :                 opline->op1.zv,
    5273             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    5274             : 
    5275           0 :         zval_ptr_dtor_nogc(free_op2.var);
    5276             :         CHECK_EXCEPTION();
    5277           0 :         ZEND_VM_NEXT_OPCODE();
    5278             : }
    5279             : 
    5280           0 : static int ZEND_FASTCALL  ZEND_BOOL_XOR_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5281             : {
    5282           0 :         USE_OPLINE
    5283             :         zend_free_op free_op2;
    5284             : 
    5285             :         SAVE_OPLINE();
    5286           0 :         boolean_xor_function(EX_VAR(opline->result.var),
    5287             :                 opline->op1.zv,
    5288             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    5289             : 
    5290           0 :         zval_ptr_dtor_nogc(free_op2.var);
    5291             :         CHECK_EXCEPTION();
    5292           0 :         ZEND_VM_NEXT_OPCODE();
    5293             : }
    5294             : 
    5295           0 : static int ZEND_FASTCALL  ZEND_FETCH_DIM_R_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5296             : {
    5297           0 :         USE_OPLINE
    5298             :         zend_free_op free_op2;
    5299             :         zval *container;
    5300             : 
    5301             :         SAVE_OPLINE();
    5302           0 :         container = opline->op1.zv;
    5303           0 :         zend_fetch_dimension_address_read_R(EX_VAR(opline->result.var), container, _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC), IS_TMP_VAR TSRMLS_CC);
    5304           0 :         zval_ptr_dtor_nogc(free_op2.var);
    5305             : 
    5306             :         CHECK_EXCEPTION();
    5307           0 :         ZEND_VM_NEXT_OPCODE();
    5308             : }
    5309             : 
    5310           0 : static int ZEND_FASTCALL  ZEND_FETCH_DIM_IS_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5311             : {
    5312           0 :         USE_OPLINE
    5313             :         zend_free_op free_op2;
    5314             :         zval *container;
    5315             : 
    5316             :         SAVE_OPLINE();
    5317           0 :         container = opline->op1.zv;
    5318           0 :         zend_fetch_dimension_address_read_IS(EX_VAR(opline->result.var), container, _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC), IS_TMP_VAR TSRMLS_CC);
    5319           0 :         zval_ptr_dtor_nogc(free_op2.var);
    5320             : 
    5321             :         CHECK_EXCEPTION();
    5322           0 :         ZEND_VM_NEXT_OPCODE();
    5323             : }
    5324             : 
    5325           0 : static int ZEND_FASTCALL  ZEND_FETCH_DIM_FUNC_ARG_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5326             : {
    5327           0 :         USE_OPLINE
    5328             :         zval *container;
    5329             :         zend_free_op free_op1, free_op2;
    5330             : 
    5331             :         SAVE_OPLINE();
    5332             : 
    5333           0 :         if (zend_is_by_ref_func_arg_fetch(opline, EX(call) TSRMLS_CC)) {
    5334             :         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    5335           0 :             zend_error_noreturn(E_ERROR, "Cannot use temporary expression in write context");
    5336             :         }
    5337             :                 container = NULL;
    5338             :                 if (IS_CONST == IS_VAR && UNEXPECTED(container == NULL)) {
    5339             :                         zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
    5340             :                 }
    5341             :                 ZVAL_DEREF(container);
    5342             :                 zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC), IS_TMP_VAR TSRMLS_CC);
    5343             :                 if (IS_CONST == IS_VAR && READY_TO_DESTROY(free_op1.var)) {
    5344             :                         EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
    5345             :                 }
    5346             :                 zval_ptr_dtor_nogc(free_op2.var);
    5347             : 
    5348             :         } else {
    5349           0 :                 if (IS_TMP_VAR == IS_UNUSED) {
    5350             :                         zend_error_noreturn(E_ERROR, "Cannot use [] for reading");
    5351             :                 }
    5352           0 :                 container = opline->op1.zv;
    5353           0 :                 zend_fetch_dimension_address_read_R(EX_VAR(opline->result.var), container, _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC), IS_TMP_VAR TSRMLS_CC);
    5354           0 :                 zval_ptr_dtor_nogc(free_op2.var);
    5355             : 
    5356             :         }
    5357             :         CHECK_EXCEPTION();
    5358           0 :         ZEND_VM_NEXT_OPCODE();
    5359             : }
    5360             : 
    5361           0 : static int ZEND_FASTCALL  ZEND_FETCH_OBJ_R_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5362             : {
    5363           0 :         USE_OPLINE
    5364             : 
    5365             :         zval *container;
    5366             :         zend_free_op free_op2;
    5367             :         zval *offset;
    5368             : 
    5369             :         SAVE_OPLINE();
    5370           0 :         container = opline->op1.zv;
    5371           0 :         offset  = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
    5372             : 
    5373           0 :         if ((IS_CONST != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT)) ||
    5374           0 :             UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
    5375           0 :                 zend_error(E_NOTICE, "Trying to get property of non-object");
    5376           0 :                 ZVAL_NULL(EX_VAR(opline->result.var));
    5377             :         } else {
    5378             :                 zval *retval;
    5379             : 
    5380             :                 /* here we are sure we are dealing with an object */
    5381             :                 do {
    5382           0 :                         if (IS_TMP_VAR == IS_CONST &&
    5383             :                             EXPECTED(Z_OBJCE_P(container) == CACHED_PTR(Z_CACHE_SLOT_P(offset)))) {
    5384             :                                 zend_property_info *prop_info = CACHED_PTR(Z_CACHE_SLOT_P(offset) + 1);
    5385             :                                 zend_object *zobj = Z_OBJ_P(container);
    5386             : 
    5387             :                                 if (EXPECTED(prop_info)) {
    5388             :                                         retval = OBJ_PROP(zobj, prop_info->offset);
    5389             :                                         if (EXPECTED(Z_TYPE_P(retval) != IS_UNDEF)) {
    5390             :                                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    5391             :                                                 break;
    5392             :                                         }
    5393             :                                 } else if (EXPECTED(zobj->properties != NULL)) {
    5394             :                                         retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
    5395             :                                         if (EXPECTED(retval)) {
    5396             :                                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    5397             :                                                 break;
    5398             :                                         }
    5399             :                                 }
    5400             :                         }
    5401             : 
    5402           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);
    5403             : 
    5404           0 :                         if (retval != EX_VAR(opline->result.var)) {
    5405           0 :                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    5406             :                         }
    5407             :                 } while (0);
    5408             :         }
    5409             : 
    5410           0 :         zval_ptr_dtor_nogc(free_op2.var);
    5411             : 
    5412             :         CHECK_EXCEPTION();
    5413           0 :         ZEND_VM_NEXT_OPCODE();
    5414             : }
    5415             : 
    5416           0 : static int ZEND_FASTCALL  ZEND_FETCH_OBJ_IS_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5417             : {
    5418           0 :         USE_OPLINE
    5419             : 
    5420             :         zval *container;
    5421             :         zend_free_op free_op2;
    5422             :         zval *offset;
    5423             :         zval *retval;
    5424             :         zend_property_info *prop_info;
    5425             : 
    5426             :         SAVE_OPLINE();
    5427           0 :         container = opline->op1.zv;
    5428           0 :         offset  = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
    5429             : 
    5430           0 :         if ((IS_CONST != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT)) ||
    5431           0 :             UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
    5432           0 :                 ZVAL_NULL(EX_VAR(opline->result.var));
    5433             :         } else {
    5434             :                 zval *retval;
    5435             : 
    5436             :                 /* here we are sure we are dealing with an object */
    5437             :                 do {
    5438           0 :                         if (IS_TMP_VAR == IS_CONST &&
    5439             :                             EXPECTED(Z_OBJCE_P(container) == CACHED_PTR(Z_CACHE_SLOT_P(offset)))) {
    5440             :                                 zend_property_info *prop_info = CACHED_PTR(Z_CACHE_SLOT_P(offset) + 1);
    5441             :                                 zend_object *zobj = Z_OBJ_P(container);
    5442             : 
    5443             :                                 if (EXPECTED(prop_info)) {
    5444             :                                         retval = OBJ_PROP(zobj, prop_info->offset);
    5445             :                                         if (EXPECTED(Z_TYPE_P(retval) != IS_UNDEF)) {
    5446             :                                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    5447             :                                                 break;
    5448             :                                         }
    5449             :                                 } else if (EXPECTED(zobj->properties != NULL)) {
    5450             :                                         retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
    5451             :                                         if (EXPECTED(retval)) {
    5452             :                                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    5453             :                                                 break;
    5454             :                                         }
    5455             :                                 }
    5456             :                         }
    5457             : 
    5458           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);
    5459             : 
    5460           0 :                         if (retval != EX_VAR(opline->result.var)) {
    5461           0 :                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    5462             :                         }
    5463             :                 } while (0);
    5464             :         }
    5465             : 
    5466           0 :         zval_ptr_dtor_nogc(free_op2.var);
    5467             : 
    5468             :         CHECK_EXCEPTION();
    5469           0 :         ZEND_VM_NEXT_OPCODE();
    5470             : }
    5471             : 
    5472           0 : static int ZEND_FASTCALL  ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5473             : {
    5474           0 :         USE_OPLINE
    5475             :         zval *container;
    5476             : 
    5477           0 :         if (zend_is_by_ref_func_arg_fetch(opline, EX(call) TSRMLS_CC)) {
    5478             :                 /* Behave like FETCH_OBJ_W */
    5479             :                 zend_free_op free_op1, free_op2;
    5480             :                 zval *property;
    5481             : 
    5482             :                 SAVE_OPLINE();
    5483           0 :                 property = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
    5484           0 :                 container = NULL;
    5485             : 
    5486             :         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    5487           0 :             zend_error_noreturn(E_ERROR, "Cannot use temporary expression in write context");
    5488             :         }
    5489             :                 if (IS_CONST == IS_VAR && UNEXPECTED(container == NULL)) {
    5490             :                         zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
    5491             :                 }
    5492             :                 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);
    5493             :                 zval_ptr_dtor_nogc(free_op2.var);
    5494             :                 if (IS_CONST == IS_VAR && READY_TO_DESTROY(free_op1.var)) {
    5495             :                         EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
    5496             :                 }
    5497             : 
    5498             :                 CHECK_EXCEPTION();
    5499             :                 ZEND_VM_NEXT_OPCODE();
    5500             :         } else {
    5501           0 :                 return ZEND_FETCH_OBJ_R_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    5502             :         }
    5503             : }
    5504             : 
    5505           0 : static int ZEND_FASTCALL  ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5506             : {
    5507           0 :         USE_OPLINE
    5508             :         zval *function_name;
    5509             :         zend_class_entry *ce;
    5510             :         zend_object *object;
    5511             :         zend_function *fbc;
    5512             : 
    5513             :         SAVE_OPLINE();
    5514             : 
    5515             :         if (IS_CONST == IS_CONST) {
    5516             :                 /* no function found. try a static method in class */
    5517           0 :                 if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op1.zv))) {
    5518           0 :                         ce = CACHED_PTR(Z_CACHE_SLOT_P(opline->op1.zv));
    5519             :                 } else {
    5520           0 :                         ce = zend_fetch_class_by_name(Z_STR_P(opline->op1.zv), opline->op1.zv + 1, ZEND_FETCH_CLASS_DEFAULT TSRMLS_CC);
    5521           0 :                         if (UNEXPECTED(EG(exception) != NULL)) {
    5522           0 :                                 HANDLE_EXCEPTION();
    5523             :                         }
    5524           0 :                         if (UNEXPECTED(ce == NULL)) {
    5525           0 :                                 zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op1.zv));
    5526             :                         }
    5527           0 :                         CACHE_PTR(Z_CACHE_SLOT_P(opline->op1.zv), ce);
    5528             :                 }
    5529             :         } else {
    5530             :                 ce = Z_CE_P(EX_VAR(opline->op1.var));
    5531             :         }
    5532             : 
    5533           0 :         if (IS_CONST == IS_CONST &&
    5534             :             IS_TMP_VAR == IS_CONST &&
    5535             :             CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv))) {
    5536             :                 fbc = CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv));
    5537           0 :         } else if (IS_CONST != IS_CONST &&
    5538             :                    IS_TMP_VAR == IS_CONST &&
    5539             :                    (fbc = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(opline->op2.zv), ce))) {
    5540             :                 /* do nothing */
    5541             :         } else if (IS_TMP_VAR != IS_UNUSED) {
    5542             :                 zend_free_op free_op2;
    5543             : 
    5544           0 :                 function_name = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
    5545             :                 if (IS_TMP_VAR != IS_CONST) {
    5546           0 :                         if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
    5547           0 :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    5548           0 :                                         HANDLE_EXCEPTION();
    5549             :                                 }
    5550           0 :                                 zend_error_noreturn(E_ERROR, "Function name must be a string");
    5551             :                         }
    5552             :                 }
    5553             : 
    5554           0 :                 if (ce->get_static_method) {
    5555           0 :                         fbc = ce->get_static_method(ce, Z_STR_P(function_name) TSRMLS_CC);
    5556             :                 } else {
    5557           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);
    5558             :                 }
    5559           0 :                 if (UNEXPECTED(fbc == NULL)) {
    5560           0 :                         zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", ce->name->val, Z_STRVAL_P(function_name));
    5561             :                 }
    5562           0 :                 if (IS_TMP_VAR == IS_CONST &&
    5563             :                     EXPECTED(fbc->type <= ZEND_USER_FUNCTION) &&
    5564             :                     EXPECTED((fbc->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0)) {
    5565             :                         if (IS_CONST == IS_CONST) {
    5566             :                                 CACHE_PTR(Z_CACHE_SLOT_P(function_name), fbc);
    5567             :                         } else {
    5568             :                                 CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), ce, fbc);
    5569             :                         }
    5570             :                 }
    5571             :                 if (IS_TMP_VAR != IS_CONST) {
    5572           0 :                         zval_ptr_dtor_nogc(free_op2.var);
    5573             :                 }
    5574             :         } else {
    5575             :                 if (UNEXPECTED(ce->constructor == NULL)) {
    5576             :                         zend_error_noreturn(E_ERROR, "Cannot call constructor");
    5577             :                 }
    5578             :                 if (Z_OBJ(EX(This)) && Z_OBJ(EX(This))->ce != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
    5579             :                         zend_error_noreturn(E_ERROR, "Cannot call private %s::__construct()", ce->name->val);
    5580             :                 }
    5581             :                 fbc = ce->constructor;
    5582             :         }
    5583             : 
    5584           0 :         object = NULL;
    5585           0 :         if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
    5586           0 :                 if (Z_OBJ(EX(This))) {
    5587           0 :                         object = Z_OBJ(EX(This));
    5588           0 :                         GC_REFCOUNT(object)++;
    5589             :                 }
    5590           0 :                 if (!object ||
    5591           0 :                     !instanceof_function(object->ce, ce TSRMLS_CC)) {
    5592             :                     /* We are calling method of the other (incompatible) class,
    5593             :                        but passing $this. This is done for compatibility with php-4. */
    5594           0 :                         if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
    5595           0 :                                 zend_error(
    5596             :                                         object ? E_DEPRECATED : E_STRICT,
    5597             :                                         "Non-static method %s::%s() should not be called statically%s",
    5598           0 :                                         fbc->common.scope->name->val, fbc->common.function_name->val,
    5599             :                                         object ? ", assuming $this from incompatible context" : "");
    5600             :                         } else {
    5601             :                                 /* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
    5602           0 :                                 zend_error_noreturn(
    5603             :                                         E_ERROR,
    5604             :                                         "Non-static method %s::%s() cannot be called statically%s",
    5605           0 :                                         fbc->common.scope->name->val, fbc->common.function_name->val,
    5606             :                                         object ? ", assuming $this from incompatible context" : "");
    5607             :                         }
    5608             :                 }
    5609             :         }
    5610             : 
    5611           0 :         if (IS_CONST != IS_CONST) {
    5612             :                 /* previous opcode is ZEND_FETCH_CLASS */
    5613             :                 if ((opline-1)->extended_value == ZEND_FETCH_CLASS_PARENT || (opline-1)->extended_value == ZEND_FETCH_CLASS_SELF) {
    5614             :                         ce = EX(called_scope);
    5615             :                 }
    5616             :         }
    5617             : 
    5618           0 :         EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
    5619           0 :                 fbc, opline->extended_value, ce, object, EX(call) TSRMLS_CC);
    5620             : 
    5621           0 :         if (IS_TMP_VAR == IS_UNUSED) {
    5622             :                 EX(call)->return_value = NULL;
    5623             :         }
    5624             : 
    5625             :         CHECK_EXCEPTION();
    5626           0 :         ZEND_VM_NEXT_OPCODE();
    5627             : }
    5628             : 
    5629          71 : static int ZEND_FASTCALL  ZEND_INIT_USER_CALL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5630             : {
    5631          71 :         USE_OPLINE
    5632             :         zend_free_op free_op2;
    5633         142 :         zval *function_name = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
    5634             :         zend_fcall_info_cache fcc;
    5635          71 :         char *error = NULL;
    5636             :         zend_function *func;
    5637             :         zend_class_entry *called_scope;
    5638             :         zend_object *object;
    5639             : 
    5640          71 :         if (zend_is_callable_ex(function_name, NULL, 0, NULL, &fcc, &error TSRMLS_CC)) {
    5641          64 :                 if (error) {
    5642           0 :                         efree(error);
    5643             :                 }
    5644          64 :                 func = fcc.function_handler;
    5645          64 :                 if (func->common.fn_flags & ZEND_ACC_CLOSURE) {
    5646             :                         /* Delay closure destruction until its invocation */
    5647           2 :                         func->common.prototype = (zend_function*)Z_OBJ_P(function_name);
    5648             :                         Z_ADDREF_P(function_name);
    5649             :                 }
    5650          64 :                 called_scope = fcc.called_scope;
    5651          64 :                 object = fcc.object;
    5652          64 :                 if (object) {
    5653          52 :                         GC_REFCOUNT(object)++; /* For $this pointer */
    5654          22 :                 } else if (func->common.scope &&
    5655          10 :                            !(func->common.fn_flags & ZEND_ACC_STATIC)) {
    5656           0 :                         if (func->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
    5657           0 :                                 zend_error(E_STRICT,
    5658             :                                 "Non-static method %s::%s() should not be called statically",
    5659           0 :                                 func->common.scope->name->val, func->common.function_name->val);
    5660             :                         } else {
    5661           0 :                                 zend_error_noreturn(
    5662             :                                         E_ERROR,
    5663             :                                         "Non-static method %s::%s() cannot be called statically",
    5664           0 :                                         func->common.scope->name->val, func->common.function_name->val);
    5665             :                         }
    5666             :                 }
    5667             :         } else {
    5668           7 :                 zend_error(E_WARNING, "%s() expects parameter 1 to be a valid callback, %s", Z_STRVAL_P(opline->op1.zv), error);
    5669           7 :                 efree(error);
    5670           7 :                 func = (zend_function*)&zend_pass_function;
    5671           7 :                 called_scope = NULL;
    5672           7 :                 object = NULL;
    5673             :         }
    5674             : 
    5675         213 :         EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
    5676          71 :                 func, opline->extended_value, called_scope, object, EX(call) TSRMLS_CC);
    5677             : 
    5678          71 :         zval_ptr_dtor_nogc(free_op2.var);
    5679             :         CHECK_EXCEPTION();
    5680          71 :         ZEND_VM_NEXT_OPCODE();
    5681             : }
    5682             : 
    5683          66 : static int ZEND_FASTCALL  ZEND_CASE_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5684             : {
    5685          66 :         USE_OPLINE
    5686             :         zend_free_op free_op2;
    5687          66 :         zval *result = EX_VAR(opline->result.var);
    5688             : 
    5689             :         SAVE_OPLINE();
    5690         132 :         fast_equal_function(result,
    5691             :                  opline->op1.zv,
    5692             :                  _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    5693             : 
    5694          66 :         zval_ptr_dtor_nogc(free_op2.var);
    5695             :         CHECK_EXCEPTION();
    5696          66 :         ZEND_VM_NEXT_OPCODE();
    5697             : }
    5698             : 
    5699         246 : static int ZEND_FASTCALL  ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5700             : {
    5701         246 :         USE_OPLINE
    5702             : 
    5703             :         zval *expr_ptr, new_expr;
    5704             : 
    5705             :         SAVE_OPLINE();
    5706         246 :         if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) &&
    5707             :             (opline->extended_value & ZEND_ARRAY_ELEMENT_REF)) {
    5708             :                 expr_ptr = NULL;
    5709             :                 if (IS_CONST == IS_VAR && UNEXPECTED(expr_ptr == NULL)) {
    5710             :                         zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets");
    5711             :                 }
    5712             :                 ZVAL_MAKE_REF(expr_ptr);
    5713             :                 Z_ADDREF_P(expr_ptr);
    5714             : 
    5715             :         } else {
    5716         246 :                 expr_ptr = opline->op1.zv;
    5717         246 :                 if (IS_CONST == IS_TMP_VAR) {
    5718             :                         ZVAL_COPY_VALUE(&new_expr, expr_ptr);
    5719             :                         expr_ptr = &new_expr;
    5720             :                 } else if (IS_CONST == IS_CONST) {
    5721         246 :                         if (!Z_IMMUTABLE_P(expr_ptr)) {
    5722         246 :                                 ZVAL_DUP(&new_expr, expr_ptr);
    5723         246 :                                 expr_ptr = &new_expr;
    5724             :                         }
    5725             :                 } else if ((IS_CONST == IS_CV || IS_CONST == IS_VAR) && Z_ISREF_P(expr_ptr)) {
    5726             :                         expr_ptr = Z_REFVAL_P(expr_ptr);
    5727             :                         if (Z_REFCOUNTED_P(expr_ptr)) Z_ADDREF_P(expr_ptr);
    5728             : 
    5729             :                 } else if (IS_CONST == IS_CV && Z_REFCOUNTED_P(expr_ptr)) {
    5730             :                         Z_ADDREF_P(expr_ptr);
    5731             :                 }
    5732             :         }
    5733             : 
    5734             :         if (IS_TMP_VAR != IS_UNUSED) {
    5735             :                 zend_free_op free_op2;
    5736         492 :                 zval *offset = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
    5737             :                 zend_string *str;
    5738             :                 zend_ulong hval;
    5739             : 
    5740             : add_again:
    5741         246 :                 switch (Z_TYPE_P(offset)) {
    5742             :                         case IS_DOUBLE:
    5743           0 :                                 hval = zend_dval_to_lval(Z_DVAL_P(offset));
    5744           0 :                                 goto num_index;
    5745             :                         case IS_LONG:
    5746         167 :                                 hval = Z_LVAL_P(offset);
    5747             : num_index:
    5748         167 :                                 zend_hash_index_update(Z_ARRVAL_P(EX_VAR(opline->result.var)), hval, expr_ptr);
    5749         167 :                                 break;
    5750             :                         case IS_STRING:
    5751          78 :                                 str = Z_STR_P(offset);
    5752             :                                 if (IS_TMP_VAR != IS_CONST) {
    5753         156 :                                         if (ZEND_HANDLE_NUMERIC(str, hval)) {
    5754           0 :                                                 goto num_index;
    5755             :                                         }
    5756             :                                 }
    5757             : str_index:
    5758          78 :                                 zend_hash_update(Z_ARRVAL_P(EX_VAR(opline->result.var)), str, expr_ptr);
    5759          78 :                                 break;
    5760             :                         case IS_NULL:
    5761           0 :                                 str = STR_EMPTY_ALLOC();
    5762           0 :                                 goto str_index;
    5763             :                         case IS_FALSE:
    5764           0 :                                 hval = 0;
    5765           0 :                                 goto num_index;
    5766             :                         case IS_TRUE:
    5767           0 :                                 hval = 1;
    5768           0 :                                 goto num_index;
    5769             :                         case IS_REFERENCE:
    5770           0 :                                 offset = Z_REFVAL_P(offset);
    5771           0 :                                 goto add_again;
    5772             :                                 break;
    5773             :                         default:
    5774           1 :                                 zend_error(E_WARNING, "Illegal offset type");
    5775             :                                 zval_ptr_dtor(expr_ptr);
    5776             :                                 /* do nothing */
    5777             :                                 break;
    5778             :                 }
    5779         246 :                 zval_ptr_dtor_nogc(free_op2.var);
    5780             :         } else {
    5781             :                 zend_hash_next_index_insert(Z_ARRVAL_P(EX_VAR(opline->result.var)), expr_ptr);
    5782             :         }
    5783             :         CHECK_EXCEPTION();
    5784         246 :         ZEND_VM_NEXT_OPCODE();
    5785             : }
    5786             : 
    5787         134 : static int ZEND_FASTCALL  ZEND_INIT_ARRAY_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5788             : {
    5789             :         zval *array;
    5790             :         uint32_t size;
    5791         134 :         USE_OPLINE
    5792             : 
    5793         134 :         array = EX_VAR(opline->result.var);
    5794             :         if (IS_CONST != IS_UNUSED) {
    5795         134 :                 size = opline->extended_value >> ZEND_ARRAY_SIZE_SHIFT;
    5796             :         } else {
    5797             :                 size = 0;
    5798             :         }
    5799         134 :         ZVAL_NEW_ARR(array);
    5800         134 :         zend_hash_init(Z_ARRVAL_P(array), size, NULL, ZVAL_PTR_DTOR, 0);
    5801             : 
    5802             :         if (IS_CONST != IS_UNUSED) {
    5803             :                 /* Explicitly initialize array as not-packed if flag is set */
    5804         134 :                 if (opline->extended_value & ZEND_ARRAY_NOT_PACKED) {
    5805           8 :                         zend_hash_real_init(Z_ARRVAL_P(array), 0);
    5806             :                 }
    5807             :         }
    5808             : 
    5809         134 :         if (IS_CONST == IS_UNUSED) {
    5810             :                 ZEND_VM_NEXT_OPCODE();
    5811             : #if 0 || IS_CONST != IS_UNUSED
    5812             :         } else {
    5813         134 :                 return ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    5814             : #endif
    5815             :         }
    5816             : }
    5817             : 
    5818           0 : static int ZEND_FASTCALL  ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5819             : {
    5820           0 :         USE_OPLINE
    5821             :         zend_free_op free_op2;
    5822             :         zval *container;
    5823             :         int result;
    5824             :         zend_ulong hval;
    5825             :         zval *offset;
    5826             : 
    5827             :         SAVE_OPLINE();
    5828           0 :         container = opline->op1.zv;
    5829           0 :         offset = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
    5830             : 
    5831           0 :         if (IS_CONST != IS_UNUSED && EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
    5832           0 :                 HashTable *ht = Z_ARRVAL_P(container);
    5833             :                 zval *value;
    5834             :                 zend_string *str;
    5835             : 
    5836             : isset_again:
    5837           0 :                 if (EXPECTED(Z_TYPE_P(offset) == IS_STRING)) {
    5838           0 :                         str = Z_STR_P(offset);
    5839             :                         if (IS_TMP_VAR != IS_CONST) {
    5840           0 :                                 if (ZEND_HANDLE_NUMERIC(str, hval)) {
    5841           0 :                                         goto num_index_prop;
    5842             :                                 }
    5843             :                         }
    5844             : str_index_prop:
    5845           0 :                         value = zend_hash_find_ind(ht, str);
    5846           0 :                 } else if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
    5847           0 :                         hval = Z_LVAL_P(offset);
    5848             : num_index_prop:
    5849           0 :                         value = zend_hash_index_find(ht, hval);
    5850             :                 } else {
    5851           0 :                         switch (Z_TYPE_P(offset)) {
    5852             :                                 case IS_DOUBLE:
    5853           0 :                                         hval = zend_dval_to_lval(Z_DVAL_P(offset));
    5854           0 :                                         goto num_index_prop;
    5855             :                                 case IS_NULL:
    5856           0 :                                         str = STR_EMPTY_ALLOC();
    5857           0 :                                         goto str_index_prop;
    5858             :                                 case IS_FALSE:
    5859           0 :                                         hval = 0;
    5860           0 :                                         goto num_index_prop;
    5861             :                                 case IS_TRUE:
    5862           0 :                                         hval = 1;
    5863           0 :                                         goto num_index_prop;
    5864             :                                 case IS_RESOURCE:
    5865           0 :                                         hval = Z_RES_HANDLE_P(offset);
    5866           0 :                                         goto num_index_prop;
    5867             :                                 case IS_REFERENCE:
    5868           0 :                                         offset = Z_REFVAL_P(offset);
    5869           0 :                                         goto isset_again;
    5870             :                                 default:
    5871           0 :                                         zend_error(E_WARNING, "Illegal offset type in isset or empty");
    5872           0 :                                         value = NULL;
    5873             :                                         break;
    5874             :                         }
    5875             :                 }
    5876             : 
    5877           0 :                 if (opline->extended_value & ZEND_ISSET) {
    5878             :                         /* > IS_NULL means not IS_UNDEF and not IS_NULL */
    5879           0 :                         result = value != NULL && Z_TYPE_P(value) > IS_NULL &&
    5880           0 :                             (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
    5881             :                 } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
    5882           0 :                         result = (value == NULL || !i_zend_is_true(value TSRMLS_CC));
    5883             :                 }
    5884           0 :         } else if (IS_CONST == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
    5885           0 :                 if (EXPECTED(Z_OBJ_HT_P(container)->has_dimension)) {
    5886           0 :                         result = Z_OBJ_HT_P(container)->has_dimension(container, offset, (opline->extended_value & ZEND_ISSET) == 0 TSRMLS_CC);
    5887             :                 } else {
    5888           0 :                         zend_error(E_NOTICE, "Trying to check element of non-array");
    5889           0 :                         result = 0;
    5890             :                 }
    5891           0 :                 if ((opline->extended_value & ZEND_ISSET) == 0) {
    5892           0 :                         result = !result;
    5893             :                 }
    5894           0 :         } else if (EXPECTED(Z_TYPE_P(container) == IS_STRING)) { /* string offsets */
    5895             :                 zval tmp;
    5896             : 
    5897           0 :                 result = 0;
    5898           0 :                 if (UNEXPECTED(Z_TYPE_P(offset) != IS_LONG)) {
    5899           0 :                         if (IS_CONST == IS_CV || IS_CONST == IS_VAR) {
    5900             :                                 ZVAL_DEREF(offset);
    5901             :                         }
    5902           0 :                         if (Z_TYPE_P(offset) < IS_STRING /* simple scalar types */
    5903             :                                         || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */
    5904           0 :                                                 && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) {
    5905           0 :                                 ZVAL_DUP(&tmp, offset);
    5906           0 :                                 convert_to_long(&tmp);
    5907           0 :                                 offset = &tmp;
    5908             :                         }
    5909             :                 }
    5910           0 :                 if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
    5911           0 :                         if (offset->value.lval >= 0 && (size_t)offset->value.lval < Z_STRLEN_P(container)) {
    5912           0 :                                 if ((opline->extended_value & ZEND_ISSET) ||
    5913           0 :                                     Z_STRVAL_P(container)[offset->value.lval] != '0') {
    5914           0 :                                         result = 1;
    5915             :                                 }
    5916             :                         }
    5917             :                 }
    5918           0 :                 if ((opline->extended_value & ZEND_ISSET) == 0) {
    5919           0 :                         result = !result;
    5920             :                 }
    5921             :         } else {
    5922           0 :                 result = ((opline->extended_value & ZEND_ISSET) == 0);
    5923             :         }
    5924             : 
    5925           0 :         zval_ptr_dtor_nogc(free_op2.var);
    5926           0 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    5927             : 
    5928             :         CHECK_EXCEPTION();
    5929           0 :         ZEND_VM_NEXT_OPCODE();
    5930             : }
    5931             : 
    5932           0 : static int ZEND_FASTCALL  ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5933             : {
    5934           0 :         USE_OPLINE
    5935             :         zend_free_op free_op2;
    5936             :         zval *container;
    5937             :         int result;
    5938             :         zval *offset;
    5939             : 
    5940             :         SAVE_OPLINE();
    5941           0 :         container = opline->op1.zv;
    5942           0 :         offset = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
    5943             : 
    5944           0 :         if (IS_CONST == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
    5945           0 :                 if (EXPECTED(Z_OBJ_HT_P(container)->has_property)) {
    5946           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);
    5947             :                 } else {
    5948           0 :                         zend_error(E_NOTICE, "Trying to check property of non-object");
    5949           0 :                         result = 0;
    5950             :                 }
    5951           0 :                 if ((opline->extended_value & ZEND_ISSET) == 0) {
    5952           0 :                         result = !result;
    5953             :                 }
    5954             :         } else {
    5955           0 :                 result = ((opline->extended_value & ZEND_ISSET) == 0);
    5956             :         }
    5957             : 
    5958           0 :         zval_ptr_dtor_nogc(free_op2.var);
    5959           0 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    5960             : 
    5961             :         CHECK_EXCEPTION();
    5962           0 :         ZEND_VM_NEXT_OPCODE();
    5963             : }
    5964             : 
    5965           0 : static int ZEND_FASTCALL  ZEND_YIELD_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5966             : {
    5967           0 :         USE_OPLINE
    5968             : 
    5969             :         /* The generator object is stored in EX(return_value) */
    5970           0 :         zend_generator *generator = (zend_generator *) EX(return_value);
    5971             : 
    5972           0 :         if (generator->flags & ZEND_GENERATOR_FORCED_CLOSE) {
    5973           0 :                 zend_error_noreturn(E_ERROR, "Cannot yield from finally in a force-closed generator");
    5974             :         }
    5975             : 
    5976             :         /* Destroy the previously yielded value */
    5977           0 :         zval_ptr_dtor(&generator->value);
    5978             : 
    5979             :         /* Destroy the previously yielded key */
    5980           0 :         zval_ptr_dtor(&generator->key);
    5981             : 
    5982             :         /* Set the new yielded value */
    5983             :         if (IS_CONST != IS_UNUSED) {
    5984             : 
    5985             : 
    5986           0 :                 if (EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE) {
    5987             :                         /* Constants and temporary variables aren't yieldable by reference,
    5988             :                          * but we still allow them with a notice. */
    5989             :                         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    5990             :                                 zval *value;
    5991             : 
    5992           0 :                                 zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    5993             : 
    5994           0 :                                 value = opline->op1.zv;
    5995           0 :                                 ZVAL_COPY_VALUE(&generator->value, value);
    5996           0 :                                 if (Z_OPT_REFCOUNTED(generator->value)) Z_SET_REFCOUNT(generator->value, 1);
    5997             : 
    5998             :                                 /* Temporary variables don't need ctor copying */
    5999             :                                 if (IS_CONST != IS_TMP_VAR) {
    6000           0 :                                         zval_opt_copy_ctor(&generator->value);
    6001             :                                 }
    6002             :                         } else {
    6003             :                                 zval *value_ptr = NULL;
    6004             : 
    6005             :                                 if (IS_CONST == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
    6006             :                                         zend_error_noreturn(E_ERROR, "Cannot yield string offsets by reference");
    6007             :                                 }
    6008             : 
    6009             :                                 /* If a function call result is yielded and the function did
    6010             :                                  * not return by reference we throw a notice. */
    6011             :                                 if (IS_CONST == IS_VAR &&
    6012             :                                     (value_ptr == &EG(uninitialized_zval) ||
    6013             :                                      (opline->extended_value == ZEND_RETURNS_FUNCTION &&
    6014             :                                       !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
    6015             :                                         zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    6016             :                                 } else {
    6017             :                                         ZVAL_MAKE_REF(value_ptr);
    6018             :                                 }
    6019             :                                 ZVAL_COPY(&generator->value, value_ptr);
    6020             : 
    6021             :                         }
    6022             :                 } else {
    6023           0 :                         zval *value = opline->op1.zv;
    6024             : 
    6025             :                         /* Consts, temporary variables and references need copying */
    6026             :                         if (IS_CONST == IS_CONST) {
    6027           0 :                                 ZVAL_DUP(&generator->value, value);
    6028             :                         } else if (IS_CONST == IS_TMP_VAR) {
    6029             :                                 ZVAL_COPY_VALUE(&generator->value, value);
    6030             :             } else if ((IS_CONST == IS_CV || IS_CONST == IS_VAR) && Z_ISREF_P(value)) {
    6031             :                                 ZVAL_DUP(&generator->value, Z_REFVAL_P(value));
    6032             : 
    6033             :                         } else {
    6034             :                                 ZVAL_COPY_VALUE(&generator->value, value);
    6035             :                                 if (IS_CONST == IS_CV) {
    6036             :                                         if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
    6037             :                                 }
    6038             :                         }
    6039             :                 }
    6040             :         } else {
    6041             :                 /* If no value was specified yield null */
    6042             :                 ZVAL_NULL(&generator->value);
    6043             :         }
    6044             : 
    6045             :         /* Set the new yielded key */
    6046             :         if (IS_TMP_VAR != IS_UNUSED) {
    6047             :                 zend_free_op free_op2;
    6048           0 :                 zval *key = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
    6049             : 
    6050             :                 /* Consts, temporary variables and references need copying */
    6051           0 :                 if (IS_TMP_VAR == IS_CONST) {
    6052             :                         ZVAL_DUP(&generator->key, key);
    6053             :                 } else if (IS_TMP_VAR == IS_TMP_VAR) {
    6054           0 :                         ZVAL_COPY_VALUE(&generator->key, key);
    6055             :                 } else if ((IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) && Z_ISREF_P(key)) {
    6056             :                         ZVAL_DUP(&generator->key, Z_REFVAL_P(key));
    6057             : 
    6058             :                 } else {
    6059             :                         ZVAL_COPY_VALUE(&generator->key, key);
    6060             :                         if (IS_TMP_VAR == IS_CV) {
    6061             :                                 if (Z_OPT_REFCOUNTED_P(key)) Z_ADDREF_P(key);
    6062             :                         }
    6063             :                 }
    6064             : 
    6065           0 :                 if (Z_TYPE(generator->key) == IS_LONG
    6066           0 :                     && Z_LVAL(generator->key) > generator->largest_used_integer_key
    6067             :                 ) {
    6068           0 :                         generator->largest_used_integer_key = Z_LVAL(generator->key);
    6069             :                 }
    6070             :         } else {
    6071             :                 /* If no key was specified we use auto-increment keys */
    6072             :                 generator->largest_used_integer_key++;
    6073             :                 ZVAL_LONG(&generator->key, generator->largest_used_integer_key);
    6074             :         }
    6075             : 
    6076           0 :         if (RETURN_VALUE_USED(opline)) {
    6077             :                 /* If the return value of yield is used set the send
    6078             :                  * target and initialize it to NULL */
    6079           0 :                 generator->send_target = EX_VAR(opline->result.var);
    6080           0 :                 ZVAL_NULL(generator->send_target);
    6081             :         } else {
    6082           0 :                 generator->send_target = NULL;
    6083             :         }
    6084             : 
    6085             :         /* We increment to the next op, so we are at the correct position when the
    6086             :          * generator is resumed. */
    6087           0 :         ZEND_VM_INC_OPCODE();
    6088             : 
    6089             :         /* The GOTO VM uses a local opline variable. We need to set the opline
    6090             :          * variable in execute_data so we don't resume at an old position. */
    6091             :         SAVE_OPLINE();
    6092             : 
    6093           0 :         ZEND_VM_RETURN();
    6094             : }
    6095             : 
    6096           0 : static int ZEND_FASTCALL  ZEND_POW_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6097             : {
    6098           0 :         USE_OPLINE
    6099             :         zend_free_op free_op2;
    6100             : 
    6101             :         SAVE_OPLINE();
    6102           0 :         pow_function(EX_VAR(opline->result.var),
    6103             :                 opline->op1.zv,
    6104             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    6105             : 
    6106           0 :         zval_ptr_dtor_nogc(free_op2.var);
    6107             :         CHECK_EXCEPTION();
    6108           0 :         ZEND_VM_NEXT_OPCODE();
    6109             : }
    6110             : 
    6111           2 : static int ZEND_FASTCALL  ZEND_ADD_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6112             : {
    6113           2 :         USE_OPLINE
    6114             :         zend_free_op free_op2;
    6115             : 
    6116             :         SAVE_OPLINE();
    6117           4 :         fast_add_function(EX_VAR(opline->result.var),
    6118             :                 opline->op1.zv,
    6119             :                 _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    6120             : 
    6121           2 :         zval_ptr_dtor_nogc(free_op2.var);
    6122             :         CHECK_EXCEPTION();
    6123           2 :         ZEND_VM_NEXT_OPCODE();
    6124             : }
    6125             : 
    6126          87 : static int ZEND_FASTCALL  ZEND_SUB_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6127             : {
    6128          87 :         USE_OPLINE
    6129             :         zend_free_op free_op2;
    6130             : 
    6131             :         SAVE_OPLINE();
    6132         174 :         fast_sub_function(EX_VAR(opline->result.var),
    6133             :                 opline->op1.zv,
    6134             :                 _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    6135             : 
    6136          87 :         zval_ptr_dtor_nogc(free_op2.var);
    6137             :         CHECK_EXCEPTION();
    6138          87 :         ZEND_VM_NEXT_OPCODE();
    6139             : }
    6140             : 
    6141         621 : static int ZEND_FASTCALL  ZEND_MUL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6142             : {
    6143         621 :         USE_OPLINE
    6144             :         zend_free_op free_op2;
    6145             : 
    6146             :         SAVE_OPLINE();
    6147        1242 :         fast_mul_function(EX_VAR(opline->result.var),
    6148             :                 opline->op1.zv,
    6149             :                 _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    6150             : 
    6151         621 :         zval_ptr_dtor_nogc(free_op2.var);
    6152             :         CHECK_EXCEPTION();
    6153         621 :         ZEND_VM_NEXT_OPCODE();
    6154             : }
    6155             : 
    6156           0 : static int ZEND_FASTCALL  ZEND_DIV_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6157             : {
    6158           0 :         USE_OPLINE
    6159             :         zend_free_op free_op2;
    6160             : 
    6161             :         SAVE_OPLINE();
    6162           0 :         fast_div_function(EX_VAR(opline->result.var),
    6163             :                 opline->op1.zv,
    6164             :                 _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    6165             : 
    6166           0 :         zval_ptr_dtor_nogc(free_op2.var);
    6167             :         CHECK_EXCEPTION();
    6168           0 :         ZEND_VM_NEXT_OPCODE();
    6169             : }
    6170             : 
    6171           0 : static int ZEND_FASTCALL  ZEND_MOD_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6172             : {
    6173           0 :         USE_OPLINE
    6174             :         zend_free_op free_op2;
    6175             : 
    6176             :         SAVE_OPLINE();
    6177           0 :         fast_mod_function(EX_VAR(opline->result.var),
    6178             :                 opline->op1.zv,
    6179             :                 _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    6180             : 
    6181           0 :         zval_ptr_dtor_nogc(free_op2.var);
    6182             :         CHECK_EXCEPTION();
    6183           0 :         ZEND_VM_NEXT_OPCODE();
    6184             : }
    6185             : 
    6186           0 : static int ZEND_FASTCALL  ZEND_SL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6187             : {
    6188           0 :         USE_OPLINE
    6189             :         zend_free_op free_op2;
    6190             : 
    6191             :         SAVE_OPLINE();
    6192           0 :         shift_left_function(EX_VAR(opline->result.var),
    6193             :                 opline->op1.zv,
    6194             :                 _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    6195             : 
    6196           0 :         zval_ptr_dtor_nogc(free_op2.var);
    6197             :         CHECK_EXCEPTION();
    6198           0 :         ZEND_VM_NEXT_OPCODE();
    6199             : }
    6200             : 
    6201           0 : static int ZEND_FASTCALL  ZEND_SR_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6202             : {
    6203           0 :         USE_OPLINE
    6204             :         zend_free_op free_op2;
    6205             : 
    6206             :         SAVE_OPLINE();
    6207           0 :         shift_right_function(EX_VAR(opline->result.var),
    6208             :                 opline->op1.zv,
    6209             :                 _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    6210             : 
    6211           0 :         zval_ptr_dtor_nogc(free_op2.var);
    6212             :         CHECK_EXCEPTION();
    6213           0 :         ZEND_VM_NEXT_OPCODE();
    6214             : }
    6215             : 
    6216       47635 : static int ZEND_FASTCALL  ZEND_CONCAT_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6217             : {
    6218       47635 :         USE_OPLINE
    6219             :         zend_free_op free_op2;
    6220             : 
    6221             :         SAVE_OPLINE();
    6222       95270 :         concat_function(EX_VAR(opline->result.var),
    6223             :                 opline->op1.zv,
    6224             :                 _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    6225             : 
    6226       47635 :         zval_ptr_dtor_nogc(free_op2.var);
    6227             :         CHECK_EXCEPTION();
    6228       47635 :         ZEND_VM_NEXT_OPCODE();
    6229             : }
    6230             : 
    6231        1149 : static int ZEND_FASTCALL  ZEND_IS_IDENTICAL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6232             : {
    6233        1149 :         USE_OPLINE
    6234             :         zend_free_op free_op2;
    6235             : 
    6236             :         SAVE_OPLINE();
    6237        2298 :         fast_is_identical_function(EX_VAR(opline->result.var),
    6238             :                 opline->op1.zv,
    6239             :                 _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    6240             : 
    6241        1149 :         zval_ptr_dtor_nogc(free_op2.var);
    6242             :         CHECK_EXCEPTION();
    6243        1149 :         ZEND_VM_NEXT_OPCODE();
    6244             : }
    6245             : 
    6246        7153 : static int ZEND_FASTCALL  ZEND_IS_NOT_IDENTICAL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6247             : {
    6248        7153 :         USE_OPLINE
    6249             :         zend_free_op free_op2;
    6250        7153 :         zval *result = EX_VAR(opline->result.var);
    6251             : 
    6252             :         SAVE_OPLINE();
    6253       14306 :         fast_is_not_identical_function(result,
    6254             :                 opline->op1.zv,
    6255             :                 _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    6256             : 
    6257        7153 :         zval_ptr_dtor_nogc(free_op2.var);
    6258             :         CHECK_EXCEPTION();
    6259        7153 :         ZEND_VM_NEXT_OPCODE();
    6260             : }
    6261             : 
    6262        2028 : static int ZEND_FASTCALL  ZEND_IS_EQUAL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6263             : {
    6264        2028 :         USE_OPLINE
    6265             :         zend_free_op free_op2;
    6266        2028 :         zval *result = EX_VAR(opline->result.var);
    6267             : 
    6268             :         SAVE_OPLINE();
    6269        4056 :         fast_equal_function(result,
    6270             :                 opline->op1.zv,
    6271             :                 _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    6272             : 
    6273        2028 :         zval_ptr_dtor_nogc(free_op2.var);
    6274             :         CHECK_EXCEPTION();
    6275        2028 :         ZEND_VM_NEXT_OPCODE();
    6276             : }
    6277             : 
    6278         106 : static int ZEND_FASTCALL  ZEND_IS_NOT_EQUAL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6279             : {
    6280         106 :         USE_OPLINE
    6281             :         zend_free_op free_op2;
    6282         106 :         zval *result = EX_VAR(opline->result.var);
    6283             : 
    6284             :         SAVE_OPLINE();
    6285         212 :         fast_not_equal_function(result,
    6286             :                 opline->op1.zv,
    6287             :                 _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    6288             : 
    6289         106 :         zval_ptr_dtor_nogc(free_op2.var);
    6290             :         CHECK_EXCEPTION();
    6291         106 :         ZEND_VM_NEXT_OPCODE();
    6292             : }
    6293             : 
    6294      242859 : static int ZEND_FASTCALL  ZEND_IS_SMALLER_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6295             : {
    6296      242859 :         USE_OPLINE
    6297             :         zend_free_op free_op2;
    6298      242859 :         zval *result = EX_VAR(opline->result.var);
    6299             : 
    6300             :         SAVE_OPLINE();
    6301      485718 :         fast_is_smaller_function(result,
    6302             :                 opline->op1.zv,
    6303             :                 _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    6304             : 
    6305      242859 :         zval_ptr_dtor_nogc(free_op2.var);
    6306             :         CHECK_EXCEPTION();
    6307      242859 :         ZEND_VM_NEXT_OPCODE();
    6308             : }
    6309             : 
    6310          80 : static int ZEND_FASTCALL  ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6311             : {
    6312          80 :         USE_OPLINE
    6313             :         zend_free_op free_op2;
    6314          80 :         zval *result = EX_VAR(opline->result.var);
    6315             : 
    6316             :         SAVE_OPLINE();
    6317         160 :         fast_is_smaller_or_equal_function(result,
    6318             :                 opline->op1.zv,
    6319             :                 _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    6320             : 
    6321          80 :         zval_ptr_dtor_nogc(free_op2.var);
    6322             :         CHECK_EXCEPTION();
    6323          80 :         ZEND_VM_NEXT_OPCODE();
    6324             : }
    6325             : 
    6326           0 : static int ZEND_FASTCALL  ZEND_BW_OR_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6327             : {
    6328           0 :         USE_OPLINE
    6329             :         zend_free_op free_op2;
    6330             : 
    6331             :         SAVE_OPLINE();
    6332           0 :         bitwise_or_function(EX_VAR(opline->result.var),
    6333             :                 opline->op1.zv,
    6334             :                 _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    6335             : 
    6336           0 :         zval_ptr_dtor_nogc(free_op2.var);
    6337             :         CHECK_EXCEPTION();
    6338           0 :         ZEND_VM_NEXT_OPCODE();
    6339             : }
    6340             : 
    6341           1 : static int ZEND_FASTCALL  ZEND_BW_AND_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6342             : {
    6343           1 :         USE_OPLINE
    6344             :         zend_free_op free_op2;
    6345             : 
    6346             :         SAVE_OPLINE();
    6347           2 :         bitwise_and_function(EX_VAR(opline->result.var),
    6348             :                 opline->op1.zv,
    6349             :                 _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    6350             : 
    6351           1 :         zval_ptr_dtor_nogc(free_op2.var);
    6352             :         CHECK_EXCEPTION();
    6353           1 :         ZEND_VM_NEXT_OPCODE();
    6354             : }
    6355             : 
    6356           0 : static int ZEND_FASTCALL  ZEND_BW_XOR_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6357             : {
    6358           0 :         USE_OPLINE
    6359             :         zend_free_op free_op2;
    6360             : 
    6361             :         SAVE_OPLINE();
    6362           0 :         bitwise_xor_function(EX_VAR(opline->result.var),
    6363             :                 opline->op1.zv,
    6364             :                 _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    6365             : 
    6366           0 :         zval_ptr_dtor_nogc(free_op2.var);
    6367             :         CHECK_EXCEPTION();
    6368           0 :         ZEND_VM_NEXT_OPCODE();
    6369             : }
    6370             : 
    6371           0 : static int ZEND_FASTCALL  ZEND_BOOL_XOR_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6372             : {
    6373           0 :         USE_OPLINE
    6374             :         zend_free_op free_op2;
    6375             : 
    6376             :         SAVE_OPLINE();
    6377           0 :         boolean_xor_function(EX_VAR(opline->result.var),
    6378             :                 opline->op1.zv,
    6379             :                 _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    6380             : 
    6381           0 :         zval_ptr_dtor_nogc(free_op2.var);
    6382             :         CHECK_EXCEPTION();
    6383           0 :         ZEND_VM_NEXT_OPCODE();
    6384             : }
    6385             : 
    6386         741 : static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CONST_VAR(int type, ZEND_OPCODE_HANDLER_ARGS)
    6387             : {
    6388         741 :         USE_OPLINE
    6389             : 
    6390             :         zval *varname;
    6391             :         zval *retval;
    6392             :         zend_string *name;
    6393             :         HashTable *target_symbol_table;
    6394             : 
    6395             :         SAVE_OPLINE();
    6396         741 :         varname = opline->op1.zv;
    6397             : 
    6398             :         if (IS_CONST == IS_CONST) {
    6399         741 :                 name = Z_STR_P(varname);
    6400             :         } else if (EXPECTED(Z_TYPE_P(varname) == IS_STRING)) {
    6401             :                 name = Z_STR_P(varname);
    6402             :                 zend_string_addref(name);
    6403             :         } else {
    6404             :                 name = zval_get_string(varname);
    6405             :         }
    6406             : 
    6407             :         if (IS_VAR != IS_UNUSED) {
    6408             :                 zend_class_entry *ce;
    6409             : 
    6410         741 :                 if (IS_VAR == IS_CONST) {
    6411             :                         if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv))) {
    6412             :                                 ce = CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv));
    6413             :                         } else {
    6414             :                                 ce = zend_fetch_class_by_name(Z_STR_P(opline->op2.zv), opline->op2.zv + 1, 0 TSRMLS_CC);
    6415             :                                 if (UNEXPECTED(ce == NULL)) {
    6416             :                                         if (IS_CONST != IS_CONST) {
    6417             :                                                 zend_string_release(name);
    6418             :                                         }
    6419             : 
    6420             :                                         CHECK_EXCEPTION();
    6421             :                                         ZEND_VM_NEXT_OPCODE();
    6422             :                                 }
    6423             :                                 CACHE_PTR(Z_CACHE_SLOT_P(opline->op2.zv), ce);
    6424             :                         }
    6425             :                 } else {
    6426         741 :                         ce = Z_CE_P(EX_VAR(opline->op2.var));
    6427             :                 }
    6428         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);
    6429             : 
    6430             :         } else {
    6431             :                 target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
    6432             :                 retval = zend_hash_find(target_symbol_table, name);
    6433             :                 if (retval == NULL) {
    6434             :                         switch (type) {
    6435             :                                 case BP_VAR_R:
    6436             :                                 case BP_VAR_UNSET:
    6437             :                                         zend_error(E_NOTICE,"Undefined variable: %s", name->val);
    6438             :                                         /* break missing intentionally */
    6439             :                                 case BP_VAR_IS:
    6440             :                                         retval = &EG(uninitialized_zval);
    6441             :                                         break;
    6442             :                                 case BP_VAR_RW:
    6443             :                                         zend_error(E_NOTICE,"Undefined variable: %s", name->val);
    6444             :                                         /* break missing intentionally */
    6445             :                                 case BP_VAR_W:
    6446             :                                         retval = zend_hash_add_new(target_symbol_table, name, &EG(uninitialized_zval));
    6447             :                                         break;
    6448             :                                 EMPTY_SWITCH_DEFAULT_CASE()
    6449             :                         }
    6450             :                 /* GLOBAL or $$name variable may be an INDIRECT pointer to CV */
    6451             :                 } else if (Z_TYPE_P(retval) == IS_INDIRECT) {
    6452             :                         retval = Z_INDIRECT_P(retval);
    6453             :                         if (Z_TYPE_P(retval) == IS_UNDEF) {
    6454             :                                 switch (type) {
    6455             :                                         case BP_VAR_R:
    6456             :                                         case BP_VAR_UNSET:
    6457             :                                                 zend_error(E_NOTICE,"Undefined variable: %s", name->val);
    6458             :                                                 /* break missing intentionally */
    6459             :                                         case BP_VAR_IS:
    6460             :                                                 retval = &EG(uninitialized_zval);
    6461             :                                                 break;
    6462             :                                         case BP_VAR_RW:
    6463             :                                                 zend_error(E_NOTICE,"Undefined variable: %s", name->val);
    6464             :                                                 /* break missing intentionally */
    6465             :                                         case BP_VAR_W:
    6466             :                                                 ZVAL_NULL(retval);
    6467             :                                                 break;
    6468             :                                         EMPTY_SWITCH_DEFAULT_CASE()
    6469             :                                 }
    6470             :                         }
    6471             :                 }
    6472             :                 if ((opline->extended_value & ZEND_FETCH_TYPE_MASK) == ZEND_FETCH_STATIC) {
    6473             :                         if (Z_CONSTANT_P(retval)) {
    6474             :                                 zval_update_constant(retval, 1 TSRMLS_CC);
    6475             :                         }
    6476             :                 } else if ((opline->extended_value & ZEND_FETCH_TYPE_MASK) != ZEND_FETCH_GLOBAL_LOCK) {
    6477             : 
    6478             :                 }
    6479             :         }
    6480             : 
    6481         736 :         if (IS_CONST != IS_CONST) {
    6482             :                 zend_string_release(name);
    6483             :         }
    6484             : 
    6485             :         ZEND_ASSERT(retval != NULL);
    6486        1282 :         if (type == BP_VAR_R || type == BP_VAR_IS) {
    6487         595 :                 if (/*type == BP_VAR_R &&*/ Z_ISREF_P(retval) && Z_REFCOUNT_P(retval) == 1) {
    6488           2 :                         ZVAL_UNREF(retval);
    6489             :                 }
    6490         546 :                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    6491             :         } else {
    6492         190 :                 ZVAL_INDIRECT(EX_VAR(opline->result.var), retval);
    6493             :         }
    6494             :         CHECK_EXCEPTION();
    6495         736 :         ZEND_VM_NEXT_OPCODE();
    6496             : }
    6497             : 
    6498         528 : static int ZEND_FASTCALL  ZEND_FETCH_R_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6499             : {
    6500         528 :         return zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    6501             : }
    6502             : 
    6503         136 : static int ZEND_FASTCALL  ZEND_FETCH_W_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6504             : {
    6505         136 :         return zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_W, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    6506             : }
    6507             : 
    6508          51 : static int ZEND_FASTCALL  ZEND_FETCH_RW_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6509             : {
    6510          51 :         return zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_RW, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    6511             : }
    6512             : 
    6513           7 : static int ZEND_FASTCALL  ZEND_FETCH_FUNC_ARG_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6514             : {
    6515           7 :         USE_OPLINE
    6516             : 
    6517          14 :         if (zend_is_by_ref_func_arg_fetch(opline, EX(call) TSRMLS_CC)) {
    6518           0 :                 return zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_W, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    6519             :         } else {
    6520           7 :                 return zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    6521             :         }
    6522             : }
    6523             : 
    6524           6 : static int ZEND_FASTCALL  ZEND_FETCH_UNSET_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6525             : {
    6526           6 :         return zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_UNSET, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    6527             : }
    6528             : 
    6529          13 : static int ZEND_FASTCALL  ZEND_FETCH_IS_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6530             : {
    6531          13 :         return zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    6532             : }
    6533             : 
    6534           0 : static int ZEND_FASTCALL  ZEND_FETCH_DIM_R_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6535             : {
    6536           0 :         USE_OPLINE
    6537             :         zend_free_op free_op2;
    6538             :         zval *container;
    6539             : 
    6540             :         SAVE_OPLINE();
    6541           0 :         container = opline->op1.zv;
    6542           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 TSRMLS_CC), IS_VAR TSRMLS_CC);
    6543           0 :         zval_ptr_dtor_nogc(free_op2.var);
    6544             : 
    6545             :         CHECK_EXCEPTION();
    6546           0 :         ZEND_VM_NEXT_OPCODE();
    6547             : }
    6548             : 
    6549           0 : static int ZEND_FASTCALL  ZEND_FETCH_DIM_IS_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6550             : {
    6551           0 :         USE_OPLINE
    6552             :         zend_free_op free_op2;
    6553             :         zval *container;
    6554             : 
    6555             :         SAVE_OPLINE();
    6556           0 :         container = opline->op1.zv;
    6557           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 TSRMLS_CC), IS_VAR TSRMLS_CC);
    6558           0 :         zval_ptr_dtor_nogc(free_op2.var);
    6559             : 
    6560             :         CHECK_EXCEPTION();
    6561           0 :         ZEND_VM_NEXT_OPCODE();
    6562             : }
    6563             : 
    6564           0 : static int ZEND_FASTCALL  ZEND_FETCH_DIM_FUNC_ARG_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6565             : {
    6566           0 :         USE_OPLINE
    6567             :         zval *container;
    6568             :         zend_free_op free_op1, free_op2;
    6569             : 
    6570             :         SAVE_OPLINE();
    6571             : 
    6572           0 :         if (zend_is_by_ref_func_arg_fetch(opline, EX(call) TSRMLS_CC)) {
    6573             :         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    6574           0 :             zend_error_noreturn(E_ERROR, "Cannot use temporary expression in write context");
    6575             :         }
    6576             :                 container = NULL;
    6577             :                 if (IS_CONST == IS_VAR && UNEXPECTED(container == NULL)) {
    6578             :                         zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
    6579             :                 }
    6580             :                 ZVAL_DEREF(container);
    6581             :                 zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2 TSRMLS_CC), IS_VAR TSRMLS_CC);
    6582             :                 if (IS_CONST == IS_VAR && READY_TO_DESTROY(free_op1.var)) {
    6583             :                         EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
    6584             :                 }
    6585             :                 zval_ptr_dtor_nogc(free_op2.var);
    6586             : 
    6587             :         } else {
    6588           0 :                 if (IS_VAR == IS_UNUSED) {
    6589             :                         zend_error_noreturn(E_ERROR, "Cannot use [] for reading");
    6590             :                 }
    6591           0 :                 container = opline->op1.zv;
    6592           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 TSRMLS_CC), IS_VAR TSRMLS_CC);
    6593           0 :                 zval_ptr_dtor_nogc(free_op2.var);
    6594             : 
    6595             :         }
    6596             :         CHECK_EXCEPTION();
    6597           0 :         ZEND_VM_NEXT_OPCODE();
    6598             : }
    6599             : 
    6600           0 : static int ZEND_FASTCALL  ZEND_FETCH_OBJ_R_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6601             : {
    6602           0 :         USE_OPLINE
    6603             : 
    6604             :         zval *container;
    6605             :         zend_free_op free_op2;
    6606             :         zval *offset;
    6607             : 
    6608             :         SAVE_OPLINE();
    6609           0 :         container = opline->op1.zv;
    6610           0 :         offset  = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
    6611             : 
    6612           0 :         if ((IS_CONST != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT)) ||
    6613           0 :             UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
    6614           0 :                 zend_error(E_NOTICE, "Trying to get property of non-object");
    6615           0 :                 ZVAL_NULL(EX_VAR(opline->result.var));
    6616             :         } else {
    6617             :                 zval *retval;
    6618             : 
    6619             :                 /* here we are sure we are dealing with an object */
    6620             :                 do {
    6621           0 :                         if (IS_VAR == IS_CONST &&
    6622             :                             EXPECTED(Z_OBJCE_P(container) == CACHED_PTR(Z_CACHE_SLOT_P(offset)))) {
    6623             :                                 zend_property_info *prop_info = CACHED_PTR(Z_CACHE_SLOT_P(offset) + 1);
    6624             :                                 zend_object *zobj = Z_OBJ_P(container);
    6625             : 
    6626             :                                 if (EXPECTED(prop_info)) {
    6627             :                                         retval = OBJ_PROP(zobj, prop_info->offset);
    6628             :                                         if (EXPECTED(Z_TYPE_P(retval) != IS_UNDEF)) {
    6629             :                                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    6630             :                                                 break;
    6631             :                                         }
    6632             :                                 } else if (EXPECTED(zobj->properties != NULL)) {
    6633             :                                         retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
    6634             :                                         if (EXPECTED(retval)) {
    6635             :                                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    6636             :                                                 break;
    6637             :                                         }
    6638             :                                 }
    6639             :                         }
    6640             : 
    6641           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);
    6642             : 
    6643           0 :                         if (retval != EX_VAR(opline->result.var)) {
    6644           0 :                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    6645             :                         }
    6646             :                 } while (0);
    6647             :         }
    6648             : 
    6649           0 :         zval_ptr_dtor_nogc(free_op2.var);
    6650             : 
    6651             :         CHECK_EXCEPTION();
    6652           0 :         ZEND_VM_NEXT_OPCODE();
    6653             : }
    6654             : 
    6655           0 : static int ZEND_FASTCALL  ZEND_FETCH_OBJ_IS_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6656             : {
    6657           0 :         USE_OPLINE
    6658             : 
    6659             :         zval *container;
    6660             :         zend_free_op free_op2;
    6661             :         zval *offset;
    6662             :         zval *retval;
    6663             :         zend_property_info *prop_info;
    6664             : 
    6665             :         SAVE_OPLINE();
    6666           0 :         container = opline->op1.zv;
    6667           0 :         offset  = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
    6668             : 
    6669           0 :         if ((IS_CONST != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT)) ||
    6670           0 :             UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
    6671           0 :                 ZVAL_NULL(EX_VAR(opline->result.var));
    6672             :         } else {
    6673             :                 zval *retval;
    6674             : 
    6675             :                 /* here we are sure we are dealing with an object */
    6676             :                 do {
    6677           0 :                         if (IS_VAR == IS_CONST &&
    6678             :                             EXPECTED(Z_OBJCE_P(container) == CACHED_PTR(Z_CACHE_SLOT_P(offset)))) {
    6679             :                                 zend_property_info *prop_info = CACHED_PTR(Z_CACHE_SLOT_P(offset) + 1);
    6680             :                                 zend_object *zobj = Z_OBJ_P(container);
    6681             : 
    6682             :                                 if (EXPECTED(prop_info)) {
    6683             :                                         retval = OBJ_PROP(zobj, prop_info->offset);
    6684             :                                         if (EXPECTED(Z_TYPE_P(retval) != IS_UNDEF)) {
    6685             :                                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    6686             :                                                 break;
    6687             :                                         }
    6688             :                                 } else if (EXPECTED(zobj->properties != NULL)) {
    6689             :                                         retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
    6690             :                                         if (EXPECTED(retval)) {
    6691             :                                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    6692             :                                                 break;
    6693             :                                         }
    6694             :                                 }
    6695             :                         }
    6696             : 
    6697           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);
    6698             : 
    6699           0 :                         if (retval != EX_VAR(opline->result.var)) {
    6700           0 :                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    6701             :                         }
    6702             :                 } while (0);
    6703             :         }
    6704             : 
    6705           0 :         zval_ptr_dtor_nogc(free_op2.var);
    6706             : 
    6707             :         CHECK_EXCEPTION();
    6708           0 :         ZEND_VM_NEXT_OPCODE();
    6709             : }
    6710             : 
    6711           0 : static int ZEND_FASTCALL  ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6712             : {
    6713           0 :         USE_OPLINE
    6714             :         zval *container;
    6715             : 
    6716           0 :         if (zend_is_by_ref_func_arg_fetch(opline, EX(call) TSRMLS_CC)) {
    6717             :                 /* Behave like FETCH_OBJ_W */
    6718             :                 zend_free_op free_op1, free_op2;
    6719             :                 zval *property;
    6720             : 
    6721             :                 SAVE_OPLINE();
    6722           0 :                 property = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
    6723           0 :                 container = NULL;
    6724             : 
    6725             :         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    6726           0 :             zend_error_noreturn(E_ERROR, "Cannot use temporary expression in write context");
    6727             :         }
    6728             :                 if (IS_CONST == IS_VAR && UNEXPECTED(container == NULL)) {
    6729             :                         zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
    6730             :                 }
    6731             :                 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);
    6732             :                 zval_ptr_dtor_nogc(free_op2.var);
    6733             :                 if (IS_CONST == IS_VAR && READY_TO_DESTROY(free_op1.var)) {
    6734             :                         EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
    6735             :                 }
    6736             : 
    6737             :                 CHECK_EXCEPTION();
    6738             :                 ZEND_VM_NEXT_OPCODE();
    6739             :         } else {
    6740           0 :                 return ZEND_FETCH_OBJ_R_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    6741             :         }
    6742             : }
    6743             : 
    6744           2 : static int ZEND_FASTCALL  ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6745             : {
    6746           2 :         USE_OPLINE
    6747             :         zval *function_name;
    6748             :         zend_class_entry *ce;
    6749             :         zend_object *object;
    6750             :         zend_function *fbc;
    6751             : 
    6752             :         SAVE_OPLINE();
    6753             : 
    6754             :         if (IS_CONST == IS_CONST) {
    6755             :                 /* no function found. try a static method in class */
    6756           2 :                 if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op1.zv))) {
    6757           0 :                         ce = CACHED_PTR(Z_CACHE_SLOT_P(opline->op1.zv));
    6758             :                 } else {
    6759           2 :                         ce = zend_fetch_class_by_name(Z_STR_P(opline->op1.zv), opline->op1.zv + 1, ZEND_FETCH_CLASS_DEFAULT TSRMLS_CC);
    6760           2 :                         if (UNEXPECTED(EG(exception) != NULL)) {
    6761           0 :                                 HANDLE_EXCEPTION();
    6762             :                         }
    6763           2 :                         if (UNEXPECTED(ce == NULL)) {
    6764           0 :                                 zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op1.zv));
    6765             :                         }
    6766           2 :                         CACHE_PTR(Z_CACHE_SLOT_P(opline->op1.zv), ce);
    6767             :                 }
    6768             :         } else {
    6769             :                 ce = Z_CE_P(EX_VAR(opline->op1.var));
    6770             :         }
    6771             : 
    6772           2 :         if (IS_CONST == IS_CONST &&
    6773             :             IS_VAR == IS_CONST &&
    6774             :             CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv))) {
    6775             :                 fbc = CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv));
    6776           2 :         } else if (IS_CONST != IS_CONST &&
    6777             :                    IS_VAR == IS_CONST &&
    6778             :                    (fbc = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(opline->op2.zv), ce))) {
    6779             :                 /* do nothing */
    6780             :         } else if (IS_VAR != IS_UNUSED) {
    6781             :                 zend_free_op free_op2;
    6782             : 
    6783           4 :                 function_name = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
    6784             :                 if (IS_VAR != IS_CONST) {
    6785           2 :                         if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
    6786           0 :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    6787           0 :                                         HANDLE_EXCEPTION();
    6788             :                                 }
    6789           0 :                                 zend_error_noreturn(E_ERROR, "Function name must be a string");
    6790             :                         }
    6791             :                 }
    6792             : 
    6793           2 :                 if (ce->get_static_method) {
    6794           0 :                         fbc = ce->get_static_method(ce, Z_STR_P(function_name) TSRMLS_CC);
    6795             :                 } else {
    6796           2 :                         fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_VAR == IS_CONST) ? (opline->op2.zv + 1) : NULL) TSRMLS_CC);
    6797             :                 }
    6798           2 :                 if (UNEXPECTED(fbc == NULL)) {
    6799           0 :                         zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", ce->name->val, Z_STRVAL_P(function_name));
    6800             :                 }
    6801           2 :                 if (IS_VAR == IS_CONST &&
    6802             :                     EXPECTED(fbc->type <= ZEND_USER_FUNCTION) &&
    6803             :                     EXPECTED((fbc->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0)) {
    6804             :                         if (IS_CONST == IS_CONST) {
    6805             :                                 CACHE_PTR(Z_CACHE_SLOT_P(function_name), fbc);
    6806             :                         } else {
    6807             :                                 CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), ce, fbc);
    6808             :                         }
    6809             :                 }
    6810             :                 if (IS_VAR != IS_CONST) {
    6811           2 :                         zval_ptr_dtor_nogc(free_op2.var);
    6812             :                 }
    6813             :         } else {
    6814             :                 if (UNEXPECTED(ce->constructor == NULL)) {
    6815             :                         zend_error_noreturn(E_ERROR, "Cannot call constructor");
    6816             :                 }
    6817             :                 if (Z_OBJ(EX(This)) && Z_OBJ(EX(This))->ce != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
    6818             :                         zend_error_noreturn(E_ERROR, "Cannot call private %s::__construct()", ce->name->val);
    6819             :                 }
    6820             :                 fbc = ce->constructor;
    6821             :         }
    6822             : 
    6823           2 :         object = NULL;
    6824           2 :         if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
    6825           1 :                 if (Z_OBJ(EX(This))) {
    6826           0 :                         object = Z_OBJ(EX(This));
    6827           0 :                         GC_REFCOUNT(object)++;
    6828             :                 }
    6829           1 :                 if (!object ||
    6830           0 :                     !instanceof_function(object->ce, ce TSRMLS_CC)) {
    6831             :                     /* We are calling method of the other (incompatible) class,
    6832             :                        but passing $this. This is done for compatibility with php-4. */
    6833           1 :                         if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
    6834           3 :                                 zend_error(
    6835             :                                         object ? E_DEPRECATED : E_STRICT,
    6836             :                                         "Non-static method %s::%s() should not be called statically%s",
    6837           2 :                                         fbc->common.scope->name->val, fbc->common.function_name->val,
    6838             :                                         object ? ", assuming $this from incompatible context" : "");
    6839             :                         } else {
    6840             :                                 /* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
    6841           0 :                                 zend_error_noreturn(
    6842             :                                         E_ERROR,
    6843             :                                         "Non-static method %s::%s() cannot be called statically%s",
    6844           0 :                                         fbc->common.scope->name->val, fbc->common.function_name->val,
    6845             :                                         object ? ", assuming $this from incompatible context" : "");
    6846             :                         }
    6847             :                 }
    6848             :         }
    6849             : 
    6850           2 :         if (IS_CONST != IS_CONST) {
    6851             :                 /* previous opcode is ZEND_FETCH_CLASS */
    6852             :                 if ((opline-1)->extended_value == ZEND_FETCH_CLASS_PARENT || (opline-1)->extended_value == ZEND_FETCH_CLASS_SELF) {
    6853             :                         ce = EX(called_scope);
    6854             :                 }
    6855             :         }
    6856             : 
    6857           6 :         EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
    6858           2 :                 fbc, opline->extended_value, ce, object, EX(call) TSRMLS_CC);
    6859             : 
    6860           2 :         if (IS_VAR == IS_UNUSED) {
    6861             :                 EX(call)->return_value = NULL;
    6862             :         }
    6863             : 
    6864             :         CHECK_EXCEPTION();
    6865           2 :         ZEND_VM_NEXT_OPCODE();
    6866             : }
    6867             : 
    6868           0 : static int ZEND_FASTCALL  ZEND_INIT_USER_CALL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6869             : {
    6870           0 :         USE_OPLINE
    6871             :         zend_free_op free_op2;
    6872           0 :         zval *function_name = _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
    6873             :         zend_fcall_info_cache fcc;
    6874           0 :         char *error = NULL;
    6875             :         zend_function *func;
    6876             :         zend_class_entry *called_scope;
    6877             :         zend_object *object;
    6878             : 
    6879           0 :         if (zend_is_callable_ex(function_name, NULL, 0, NULL, &fcc, &error TSRMLS_CC)) {
    6880           0 :                 if (error) {
    6881           0 :                         efree(error);
    6882             :                 }
    6883           0 :                 func = fcc.function_handler;
    6884           0 :                 if (func->common.fn_flags & ZEND_ACC_CLOSURE) {
    6885             :                         /* Delay closure destruction until its invocation */
    6886           0 :                         func->common.prototype = (zend_function*)Z_OBJ_P(function_name);
    6887             :                         Z_ADDREF_P(function_name);
    6888             :                 }
    6889           0 :                 called_scope = fcc.called_scope;
    6890           0 :                 object = fcc.object;
    6891           0 :                 if (object) {
    6892           0 :                         GC_REFCOUNT(object)++; /* For $this pointer */
    6893           0 :                 } else if (func->common.scope &&
    6894           0 :                            !(func->common.fn_flags & ZEND_ACC_STATIC)) {
    6895           0 :                         if (func->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
    6896           0 :                                 zend_error(E_STRICT,
    6897             :                                 "Non-static method %s::%s() should not be called statically",
    6898           0 :                                 func->common.scope->name->val, func->common.function_name->val);
    6899             :                         } else {
    6900           0 :                                 zend_error_noreturn(
    6901             :                                         E_ERROR,
    6902             :                                         "Non-static method %s::%s() cannot be called statically",
    6903           0 :                                         func->common.scope->name->val, func->common.function_name->val);
    6904             :                         }
    6905             :                 }
    6906             :         } else {
    6907           0 :                 zend_error(E_WARNING, "%s() expects parameter 1 to be a valid callback, %s", Z_STRVAL_P(opline->op1.zv), error);
    6908           0 :                 efree(error);
    6909           0 :                 func = (zend_function*)&zend_pass_function;
    6910           0 :                 called_scope = NULL;
    6911           0 :                 object = NULL;
    6912             :         }
    6913             : 
    6914           0 :         EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
    6915           0 :                 func, opline->extended_value, called_scope, object, EX(call) TSRMLS_CC);
    6916             : 
    6917           0 :         zval_ptr_dtor_nogc(free_op2.var);
    6918             :         CHECK_EXCEPTION();
    6919           0 :         ZEND_VM_NEXT_OPCODE();
    6920             : }
    6921             : 
    6922           0 : static int ZEND_FASTCALL  ZEND_CASE_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6923             : {
    6924           0 :         USE_OPLINE
    6925             :         zend_free_op free_op2;
    6926           0 :         zval *result = EX_VAR(opline->result.var);
    6927             : 
    6928             :         SAVE_OPLINE();
    6929           0 :         fast_equal_function(result,
    6930             :                  opline->op1.zv,
    6931             :                  _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    6932             : 
    6933           0 :         zval_ptr_dtor_nogc(free_op2.var);
    6934             :         CHECK_EXCEPTION();
    6935           0 :         ZEND_VM_NEXT_OPCODE();
    6936             : }
    6937             : 
    6938          59 : static int ZEND_FASTCALL  ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6939             : {
    6940          59 :         USE_OPLINE
    6941             : 
    6942             :         zval *expr_ptr, new_expr;
    6943             : 
    6944             :         SAVE_OPLINE();
    6945          59 :         if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) &&
    6946             :             (opline->extended_value & ZEND_ARRAY_ELEMENT_REF)) {
    6947             :                 expr_ptr = NULL;
    6948             :                 if (IS_CONST == IS_VAR && UNEXPECTED(expr_ptr == NULL)) {
    6949             :                         zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets");
    6950             :                 }
    6951             :                 ZVAL_MAKE_REF(expr_ptr);
    6952             :                 Z_ADDREF_P(expr_ptr);
    6953             : 
    6954             :         } else {
    6955          59 :                 expr_ptr = opline->op1.zv;
    6956          59 :                 if (IS_CONST == IS_TMP_VAR) {
    6957             :                         ZVAL_COPY_VALUE(&new_expr, expr_ptr);
    6958             :                         expr_ptr = &new_expr;
    6959             :                 } else if (IS_CONST == IS_CONST) {
    6960          59 :                         if (!Z_IMMUTABLE_P(expr_ptr)) {
    6961          59 :                                 ZVAL_DUP(&new_expr, expr_ptr);
    6962          59 :                                 expr_ptr = &new_expr;
    6963             :                         }
    6964             :                 } else if ((IS_CONST == IS_CV || IS_CONST == IS_VAR) && Z_ISREF_P(expr_ptr)) {
    6965             :                         expr_ptr = Z_REFVAL_P(expr_ptr);
    6966             :                         if (Z_REFCOUNTED_P(expr_ptr)) Z_ADDREF_P(expr_ptr);
    6967             : 
    6968             :                 } else if (IS_CONST == IS_CV && Z_REFCOUNTED_P(expr_ptr)) {
    6969             :                         Z_ADDREF_P(expr_ptr);
    6970             :                 }
    6971             :         }
    6972             : 
    6973             :         if (IS_VAR != IS_UNUSED) {
    6974             :                 zend_free_op free_op2;
    6975         118 :                 zval *offset = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
    6976             :                 zend_string *str;
    6977             :                 zend_ulong hval;
    6978             : 
    6979             : add_again:
    6980          59 :                 switch (Z_TYPE_P(offset)) {
    6981             :                         case IS_DOUBLE:
    6982           0 :                                 hval = zend_dval_to_lval(Z_DVAL_P(offset));
    6983           0 :                                 goto num_index;
    6984             :                         case IS_LONG:
    6985           0 :                                 hval = Z_LVAL_P(offset);
    6986             : num_index:
    6987           0 :                                 zend_hash_index_update(Z_ARRVAL_P(EX_VAR(opline->result.var)), hval, expr_ptr);
    6988           0 :                                 break;
    6989             :                         case IS_STRING:
    6990           0 :                                 str = Z_STR_P(offset);
    6991             :                                 if (IS_VAR != IS_CONST) {
    6992           0 :                                         if (ZEND_HANDLE_NUMERIC(str, hval)) {
    6993           0 :                                                 goto num_index;
    6994             :                                         }
    6995             :                                 }
    6996             : str_index:
    6997          47 :                                 zend_hash_update(Z_ARRVAL_P(EX_VAR(opline->result.var)), str, expr_ptr);
    6998          47 :                                 break;
    6999             :                         case IS_NULL:
    7000          47 :                                 str = STR_EMPTY_ALLOC();
    7001          47 :                                 goto str_index;
    7002             :                         case IS_FALSE:
    7003           0 :                                 hval = 0;
    7004           0 :                                 goto num_index;
    7005             :                         case IS_TRUE:
    7006           0 :                                 hval = 1;
    7007           0 :                                 goto num_index;
    7008             :                         case IS_REFERENCE:
    7009           0 :                                 offset = Z_REFVAL_P(offset);
    7010           0 :                                 goto add_again;
    7011             :                                 break;
    7012             :                         default:
    7013          12 :                                 zend_error(E_WARNING, "Illegal offset type");
    7014             :                                 zval_ptr_dtor(expr_ptr);
    7015             :                                 /* do nothing */
    7016             :                                 break;
    7017             :                 }
    7018          59 :                 zval_ptr_dtor_nogc(free_op2.var);
    7019             :         } else {
    7020             :                 zend_hash_next_index_insert(Z_ARRVAL_P(EX_VAR(opline->result.var)), expr_ptr);
    7021             :         }
    7022             :         CHECK_EXCEPTION();
    7023          59 :         ZEND_VM_NEXT_OPCODE();
    7024             : }
    7025             : 
    7026          39 : static int ZEND_FASTCALL  ZEND_INIT_ARRAY_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7027             : {
    7028             :         zval *array;
    7029             :         uint32_t size;
    7030          39 :         USE_OPLINE
    7031             : 
    7032          39 :         array = EX_VAR(opline->result.var);
    7033             :         if (IS_CONST != IS_UNUSED) {
    7034          39 :                 size = opline->extended_value >> ZEND_ARRAY_SIZE_SHIFT;
    7035             :         } else {
    7036             :                 size = 0;
    7037             :         }
    7038          39 :         ZVAL_NEW_ARR(array);
    7039          39 :         zend_hash_init(Z_ARRVAL_P(array), size, NULL, ZVAL_PTR_DTOR, 0);
    7040             : 
    7041             :         if (IS_CONST != IS_UNUSED) {
    7042             :                 /* Explicitly initialize array as not-packed if flag is set */
    7043          39 :                 if (opline->extended_value & ZEND_ARRAY_NOT_PACKED) {
    7044           0 :                         zend_hash_real_init(Z_ARRVAL_P(array), 0);
    7045             :                 }
    7046             :         }
    7047             : 
    7048          39 :         if (IS_CONST == IS_UNUSED) {
    7049             :                 ZEND_VM_NEXT_OPCODE();
    7050             : #if 0 || IS_CONST != IS_UNUSED
    7051             :         } else {
    7052          39 :                 return ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    7053             : #endif
    7054             :         }
    7055             : }
    7056             : 
    7057           0 : static int ZEND_FASTCALL  ZEND_UNSET_VAR_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7058             : {
    7059           0 :         USE_OPLINE
    7060             :         zval tmp, *varname;
    7061             :         HashTable *target_symbol_table;
    7062             : 
    7063             : 
    7064             :         SAVE_OPLINE();
    7065           0 :         if (IS_CONST == IS_CV &&
    7066             :             IS_VAR == IS_UNUSED &&
    7067             :             (opline->extended_value & ZEND_QUICK_SET)) {
    7068             :                 zval *var = EX_VAR(opline->op1.var);
    7069             : 
    7070             :                 if (Z_REFCOUNTED_P(var)) {
    7071             :                         zend_refcounted *garbage = Z_COUNTED_P(var);
    7072             : 
    7073             :                         if (!--GC_REFCOUNT(garbage)) {
    7074             :                                 ZVAL_UNDEF(var);
    7075             :                                 _zval_dtor_func_for_ptr(garbage ZEND_FILE_LINE_CC);
    7076             :                         } else {
    7077             :                                 GC_ZVAL_CHECK_POSSIBLE_ROOT(var);
    7078             :                                 ZVAL_UNDEF(var);
    7079             :                         }
    7080             :                 } else {
    7081             :                         ZVAL_UNDEF(var);
    7082             :                 }
    7083             :                 CHECK_EXCEPTION();
    7084             :                 ZEND_VM_NEXT_OPCODE();
    7085             :         }
    7086             : 
    7087           0 :         varname = opline->op1.zv;
    7088             : 
    7089           0 :         ZVAL_UNDEF(&tmp);
    7090           0 :         if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
    7091             :                 ZVAL_STR(&tmp, zval_get_string(varname));
    7092             :                 varname = &tmp;
    7093             :         }
    7094             : 
    7095             :         if (IS_VAR != IS_UNUSED) {
    7096             :                 zend_class_entry *ce;
    7097             : 
    7098           0 :                 if (IS_VAR == IS_CONST) {
    7099             :                         if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv))) {
    7100             :                                 ce = CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv));
    7101             :                         } else {
    7102             :                                 ce = zend_fetch_class_by_name(Z_STR_P(opline->op2.zv), opline->op2.zv + 1, 0 TSRMLS_CC);
    7103             :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    7104             :                                         if (IS_CONST != IS_CONST) {
    7105             :                                                 zval_dtor(&tmp);
    7106             :                                         }
    7107             : 
    7108             :                                         HANDLE_EXCEPTION();
    7109             :                                 }
    7110             :                                 if (UNEXPECTED(ce == NULL)) {
    7111             :                                         zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op2.zv));
    7112             :                                 }
    7113             :                                 CACHE_PTR(Z_CACHE_SLOT_P(opline->op2.zv), ce);
    7114             :                         }
    7115             :                 } else {
    7116           0 :                         ce = Z_CE_P(EX_VAR(opline->op2.var));
    7117             :                 }
    7118           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);
    7119             :         } else {
    7120             :                 target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
    7121             :                 zend_hash_del_ind(target_symbol_table, Z_STR_P(varname));
    7122             :         }
    7123             : 
    7124           0 :         if (IS_CONST != IS_CONST) {
    7125             :                 zval_dtor(&tmp);
    7126             :         }
    7127             : 
    7128             :         CHECK_EXCEPTION();
    7129           0 :         ZEND_VM_NEXT_OPCODE();
    7130             : }
    7131             : 
    7132         146 : static int ZEND_FASTCALL  ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7133             : {
    7134         146 :         USE_OPLINE
    7135             :         zval *value;
    7136             : 
    7137             :         SAVE_OPLINE();
    7138         146 :         if (IS_CONST == IS_CV &&
    7139             :             IS_VAR == IS_UNUSED &&
    7140             :             (opline->extended_value & ZEND_QUICK_SET)) {
    7141             :                 value = EX_VAR(opline->op1.var);
    7142             :                 if (opline->extended_value & ZEND_ISSET) {
    7143             :                         ZVAL_BOOL(EX_VAR(opline->result.var),
    7144             :                                 Z_TYPE_P(value) > IS_NULL &&
    7145             :                             (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL));
    7146             :                 } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
    7147             :                         ZVAL_BOOL(EX_VAR(opline->result.var),
    7148             :                                 !i_zend_is_true(value TSRMLS_CC));
    7149             :                         CHECK_EXCEPTION();
    7150             :                 }
    7151             :                 ZEND_VM_NEXT_OPCODE();
    7152             :         } else {
    7153             : 
    7154         146 :                 zval tmp, *varname = opline->op1.zv;
    7155             : 
    7156         146 :                 if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
    7157             :                         ZVAL_STR(&tmp, zval_get_string(varname));
    7158             :                         varname = &tmp;
    7159             :                 }
    7160             : 
    7161             :                 if (IS_VAR != IS_UNUSED) {
    7162             :                         zend_class_entry *ce;
    7163             : 
    7164         146 :                         if (IS_VAR == IS_CONST) {
    7165             :                                 if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv))) {
    7166             :                                         ce = CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv));
    7167             :                                 } else {
    7168             :                                         ce = zend_fetch_class_by_name(Z_STR_P(opline->op2.zv), opline->op2.zv + 1, 0 TSRMLS_CC);
    7169             :                                         if (UNEXPECTED(ce == NULL)) {
    7170             :                                                 CHECK_EXCEPTION();
    7171             :                                                 ZEND_VM_NEXT_OPCODE();
    7172             :                                         }
    7173             :                                         CACHE_PTR(Z_CACHE_SLOT_P(opline->op2.zv), ce);
    7174             :                                 }
    7175             :                         } else {
    7176         146 :                                 ce = Z_CE_P(EX_VAR(opline->op2.var));
    7177             :                         }
    7178         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);
    7179             :                 } else {
    7180             :                         HashTable *target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
    7181             :                         value = zend_hash_find_ind(target_symbol_table, Z_STR_P(varname));
    7182             :                 }
    7183             : 
    7184         146 :                 if (IS_CONST != IS_CONST && varname == &tmp) {
    7185             :                         zval_dtor(&tmp);
    7186             :                 }
    7187             : 
    7188         146 :                 if (opline->extended_value & ZEND_ISSET) {
    7189         341 :                         ZVAL_BOOL(EX_VAR(opline->result.var),
    7190             :                                 value && Z_TYPE_P(value) > IS_NULL &&
    7191             :                             (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL));
    7192             :                 } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
    7193           0 :                         ZVAL_BOOL(EX_VAR(opline->result.var),
    7194             :                                 !value || !i_zend_is_true(value TSRMLS_CC));
    7195             :                 }
    7196             : 
    7197             :                 CHECK_EXCEPTION();
    7198         146 :                 ZEND_VM_NEXT_OPCODE();
    7199             :         }
    7200             : }
    7201             : 
    7202           0 : static int ZEND_FASTCALL  ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7203             : {
    7204           0 :         USE_OPLINE
    7205             :         zend_free_op free_op2;
    7206             :         zval *container;
    7207             :         int result;
    7208             :         zend_ulong hval;
    7209             :         zval *offset;
    7210             : 
    7211             :         SAVE_OPLINE();
    7212           0 :         container = opline->op1.zv;
    7213           0 :         offset = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
    7214             : 
    7215           0 :         if (IS_CONST != IS_UNUSED && EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
    7216           0 :                 HashTable *ht = Z_ARRVAL_P(container);
    7217             :                 zval *value;
    7218             :                 zend_string *str;
    7219             : 
    7220             : isset_again:
    7221           0 :                 if (EXPECTED(Z_TYPE_P(offset) == IS_STRING)) {
    7222           0 :                         str = Z_STR_P(offset);
    7223             :                         if (IS_VAR != IS_CONST) {
    7224           0 :                                 if (ZEND_HANDLE_NUMERIC(str, hval)) {
    7225           0 :                                         goto num_index_prop;
    7226             :                                 }
    7227             :                         }
    7228             : str_index_prop:
    7229           0 :                         value = zend_hash_find_ind(ht, str);
    7230           0 :                 } else if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
    7231           0 :                         hval = Z_LVAL_P(offset);
    7232             : num_index_prop:
    7233           0 :                         value = zend_hash_index_find(ht, hval);
    7234             :                 } else {
    7235           0 :                         switch (Z_TYPE_P(offset)) {
    7236             :                                 case IS_DOUBLE:
    7237           0 :                                         hval = zend_dval_to_lval(Z_DVAL_P(offset));
    7238           0 :                                         goto num_index_prop;
    7239             :                                 case IS_NULL:
    7240           0 :                                         str = STR_EMPTY_ALLOC();
    7241           0 :                                         goto str_index_prop;
    7242             :                                 case IS_FALSE:
    7243           0 :                                         hval = 0;
    7244           0 :                                         goto num_index_prop;
    7245             :                                 case IS_TRUE:
    7246           0 :                                         hval = 1;
    7247           0 :                                         goto num_index_prop;
    7248             :                                 case IS_RESOURCE:
    7249           0 :                                         hval = Z_RES_HANDLE_P(offset);
    7250           0 :                                         goto num_index_prop;
    7251             :                                 case IS_REFERENCE:
    7252           0 :                                         offset = Z_REFVAL_P(offset);
    7253           0 :                                         goto isset_again;
    7254             :                                 default:
    7255           0 :                                         zend_error(E_WARNING, "Illegal offset type in isset or empty");
    7256           0 :                                         value = NULL;
    7257             :                                         break;
    7258             :                         }
    7259             :                 }
    7260             : 
    7261           0 :                 if (opline->extended_value & ZEND_ISSET) {
    7262             :                         /* > IS_NULL means not IS_UNDEF and not IS_NULL */
    7263           0 :                         result = value != NULL && Z_TYPE_P(value) > IS_NULL &&
    7264           0 :                             (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
    7265             :                 } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
    7266           0 :                         result = (value == NULL || !i_zend_is_true(value TSRMLS_CC));
    7267             :                 }
    7268           0 :         } else if (IS_CONST == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
    7269           0 :                 if (EXPECTED(Z_OBJ_HT_P(container)->has_dimension)) {
    7270           0 :                         result = Z_OBJ_HT_P(container)->has_dimension(container, offset, (opline->extended_value & ZEND_ISSET) == 0 TSRMLS_CC);
    7271             :                 } else {
    7272           0 :                         zend_error(E_NOTICE, "Trying to check element of non-array");
    7273           0 :                         result = 0;
    7274             :                 }
    7275           0 :                 if ((opline->extended_value & ZEND_ISSET) == 0) {
    7276           0 :                         result = !result;
    7277             :                 }
    7278           0 :         } else if (EXPECTED(Z_TYPE_P(container) == IS_STRING)) { /* string offsets */
    7279             :                 zval tmp;
    7280             : 
    7281           0 :                 result = 0;
    7282           0 :                 if (UNEXPECTED(Z_TYPE_P(offset) != IS_LONG)) {
    7283           0 :                         if (IS_CONST == IS_CV || IS_CONST == IS_VAR) {
    7284             :                                 ZVAL_DEREF(offset);
    7285             :                         }
    7286           0 :                         if (Z_TYPE_P(offset) < IS_STRING /* simple scalar types */
    7287             :                                         || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */
    7288           0 :                                                 && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) {
    7289           0 :                                 ZVAL_DUP(&tmp, offset);
    7290           0 :                                 convert_to_long(&tmp);
    7291           0 :                                 offset = &tmp;
    7292             :                         }
    7293             :                 }
    7294           0 :                 if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
    7295           0 :                         if (offset->value.lval >= 0 && (size_t)offset->value.lval < Z_STRLEN_P(container)) {
    7296           0 :                                 if ((opline->extended_value & ZEND_ISSET) ||
    7297           0 :                                     Z_STRVAL_P(container)[offset->value.lval] != '0') {
    7298           0 :                                         result = 1;
    7299             :                                 }
    7300             :                         }
    7301             :                 }
    7302           0 :                 if ((opline->extended_value & ZEND_ISSET) == 0) {
    7303           0 :                         result = !result;
    7304             :                 }
    7305             :         } else {
    7306           0 :                 result = ((opline->extended_value & ZEND_ISSET) == 0);
    7307             :         }
    7308             : 
    7309           0 :         zval_ptr_dtor_nogc(free_op2.var);
    7310           0 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    7311             : 
    7312             :         CHECK_EXCEPTION();
    7313           0 :         ZEND_VM_NEXT_OPCODE();
    7314             : }
    7315             : 
    7316           0 : static int ZEND_FASTCALL  ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7317             : {
    7318           0 :         USE_OPLINE
    7319             :         zend_free_op free_op2;
    7320             :         zval *container;
    7321             :         int result;
    7322             :         zval *offset;
    7323             : 
    7324             :         SAVE_OPLINE();
    7325           0 :         container = opline->op1.zv;
    7326           0 :         offset = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
    7327             : 
    7328           0 :         if (IS_CONST == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
    7329           0 :                 if (EXPECTED(Z_OBJ_HT_P(container)->has_property)) {
    7330           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);
    7331             :                 } else {
    7332           0 :                         zend_error(E_NOTICE, "Trying to check property of non-object");
    7333           0 :                         result = 0;
    7334             :                 }
    7335           0 :                 if ((opline->extended_value & ZEND_ISSET) == 0) {
    7336           0 :                         result = !result;
    7337             :                 }
    7338             :         } else {
    7339           0 :                 result = ((opline->extended_value & ZEND_ISSET) == 0);
    7340             :         }
    7341             : 
    7342           0 :         zval_ptr_dtor_nogc(free_op2.var);
    7343           0 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    7344             : 
    7345             :         CHECK_EXCEPTION();
    7346           0 :         ZEND_VM_NEXT_OPCODE();
    7347             : }
    7348             : 
    7349           1 : static int ZEND_FASTCALL  ZEND_YIELD_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7350             : {
    7351           1 :         USE_OPLINE
    7352             : 
    7353             :         /* The generator object is stored in EX(return_value) */
    7354           1 :         zend_generator *generator = (zend_generator *) EX(return_value);
    7355             : 
    7356           1 :         if (generator->flags & ZEND_GENERATOR_FORCED_CLOSE) {
    7357           0 :                 zend_error_noreturn(E_ERROR, "Cannot yield from finally in a force-closed generator");
    7358             :         }
    7359             : 
    7360             :         /* Destroy the previously yielded value */
    7361           1 :         zval_ptr_dtor(&generator->value);
    7362             : 
    7363             :         /* Destroy the previously yielded key */
    7364           1 :         zval_ptr_dtor(&generator->key);
    7365             : 
    7366             :         /* Set the new yielded value */
    7367             :         if (IS_CONST != IS_UNUSED) {
    7368             : 
    7369             : 
    7370           1 :                 if (EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE) {
    7371             :                         /* Constants and temporary variables aren't yieldable by reference,
    7372             :                          * but we still allow them with a notice. */
    7373             :                         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    7374             :                                 zval *value;
    7375             : 
    7376           0 :                                 zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    7377             : 
    7378           0 :                                 value = opline->op1.zv;
    7379           0 :                                 ZVAL_COPY_VALUE(&generator->value, value);
    7380           0 :                                 if (Z_OPT_REFCOUNTED(generator->value)) Z_SET_REFCOUNT(generator->value, 1);
    7381             : 
    7382             :                                 /* Temporary variables don't need ctor copying */
    7383             :                                 if (IS_CONST != IS_TMP_VAR) {
    7384           0 :                                         zval_opt_copy_ctor(&generator->value);
    7385             :                                 }
    7386             :                         } else {
    7387             :                                 zval *value_ptr = NULL;
    7388             : 
    7389             :                                 if (IS_CONST == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
    7390             :                                         zend_error_noreturn(E_ERROR, "Cannot yield string offsets by reference");
    7391             :                                 }
    7392             : 
    7393             :                                 /* If a function call result is yielded and the function did
    7394             :                                  * not return by reference we throw a notice. */
    7395             :                                 if (IS_CONST == IS_VAR &&
    7396             :                                     (value_ptr == &EG(uninitialized_zval) ||
    7397             :                                      (opline->extended_value == ZEND_RETURNS_FUNCTION &&
    7398             :                                       !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
    7399             :                                         zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    7400             :                                 } else {
    7401             :                                         ZVAL_MAKE_REF(value_ptr);
    7402             :                                 }
    7403             :                                 ZVAL_COPY(&generator->value, value_ptr);
    7404             : 
    7405             :                         }
    7406             :                 } else {
    7407           1 :                         zval *value = opline->op1.zv;
    7408             : 
    7409             :                         /* Consts, temporary variables and references need copying */
    7410             :                         if (IS_CONST == IS_CONST) {
    7411           1 :                                 ZVAL_DUP(&generator->value, value);
    7412             :                         } else if (IS_CONST == IS_TMP_VAR) {
    7413             :                                 ZVAL_COPY_VALUE(&generator->value, value);
    7414             :             } else if ((IS_CONST == IS_CV || IS_CONST == IS_VAR) && Z_ISREF_P(value)) {
    7415             :                                 ZVAL_DUP(&generator->value, Z_REFVAL_P(value));
    7416             : 
    7417             :                         } else {
    7418             :                                 ZVAL_COPY_VALUE(&generator->value, value);
    7419             :                                 if (IS_CONST == IS_CV) {
    7420             :                                         if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
    7421             :                                 }
    7422             :                         }
    7423             :                 }
    7424             :         } else {
    7425             :                 /* If no value was specified yield null */
    7426             :                 ZVAL_NULL(&generator->value);
    7427             :         }
    7428             : 
    7429             :         /* Set the new yielded key */
    7430             :         if (IS_VAR != IS_UNUSED) {
    7431             :                 zend_free_op free_op2;
    7432           2 :                 zval *key = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
    7433             : 
    7434             :                 /* Consts, temporary variables and references need copying */
    7435           1 :                 if (IS_VAR == IS_CONST) {
    7436             :                         ZVAL_DUP(&generator->key, key);
    7437           1 :                 } else if (IS_VAR == IS_TMP_VAR) {
    7438             :                         ZVAL_COPY_VALUE(&generator->key, key);
    7439           1 :                 } else if ((IS_VAR == IS_VAR || IS_VAR == IS_CV) && Z_ISREF_P(key)) {
    7440           0 :                         ZVAL_DUP(&generator->key, Z_REFVAL_P(key));
    7441           0 :                         zval_ptr_dtor_nogc(free_op2.var);
    7442             :                 } else {
    7443           1 :                         ZVAL_COPY_VALUE(&generator->key, key);
    7444           1 :                         if (IS_VAR == IS_CV) {
    7445             :                                 if (Z_OPT_REFCOUNTED_P(key)) Z_ADDREF_P(key);
    7446             :                         }
    7447             :                 }
    7448             : 
    7449           2 :                 if (Z_TYPE(generator->key) == IS_LONG
    7450           0 :                     && Z_LVAL(generator->key) > generator->largest_used_integer_key
    7451             :                 ) {
    7452           0 :                         generator->largest_used_integer_key = Z_LVAL(generator->key);
    7453             :                 }
    7454             :         } else {
    7455             :                 /* If no key was specified we use auto-increment keys */
    7456             :                 generator->largest_used_integer_key++;
    7457             :                 ZVAL_LONG(&generator->key, generator->largest_used_integer_key);
    7458             :         }
    7459             : 
    7460           1 :         if (RETURN_VALUE_USED(opline)) {
    7461             :                 /* If the return value of yield is used set the send
    7462             :                  * target and initialize it to NULL */
    7463           0 :                 generator->send_target = EX_VAR(opline->result.var);
    7464           0 :                 ZVAL_NULL(generator->send_target);
    7465             :         } else {
    7466           1 :                 generator->send_target = NULL;
    7467             :         }
    7468             : 
    7469             :         /* We increment to the next op, so we are at the correct position when the
    7470             :          * generator is resumed. */
    7471           1 :         ZEND_VM_INC_OPCODE();
    7472             : 
    7473             :         /* The GOTO VM uses a local opline variable. We need to set the opline
    7474             :          * variable in execute_data so we don't resume at an old position. */
    7475             :         SAVE_OPLINE();
    7476             : 
    7477           1 :         ZEND_VM_RETURN();
    7478             : }
    7479             : 
    7480           0 : static int ZEND_FASTCALL  ZEND_POW_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7481             : {
    7482           0 :         USE_OPLINE
    7483             :         zend_free_op free_op2;
    7484             : 
    7485             :         SAVE_OPLINE();
    7486           0 :         pow_function(EX_VAR(opline->result.var),
    7487             :                 opline->op1.zv,
    7488             :                 _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    7489             : 
    7490           0 :         zval_ptr_dtor_nogc(free_op2.var);
    7491             :         CHECK_EXCEPTION();
    7492           0 :         ZEND_VM_NEXT_OPCODE();
    7493             : }
    7494             : 
    7495      103926 : static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CONST_UNUSED(int type, ZEND_OPCODE_HANDLER_ARGS)
    7496             : {
    7497      103926 :         USE_OPLINE
    7498             : 
    7499             :         zval *varname;
    7500             :         zval *retval;
    7501             :         zend_string *name;
    7502             :         HashTable *target_symbol_table;
    7503             : 
    7504             :         SAVE_OPLINE();
    7505      103926 :         varname = opline->op1.zv;
    7506             : 
    7507             :         if (IS_CONST == IS_CONST) {
    7508      103926 :                 name = Z_STR_P(varname);
    7509             :         } else if (EXPECTED(Z_TYPE_P(varname) == IS_STRING)) {
    7510             :                 name = Z_STR_P(varname);
    7511             :                 zend_string_addref(name);
    7512             :         } else {
    7513             :                 name = zval_get_string(varname);
    7514             :         }
    7515             : 
    7516      103926 :         if (IS_UNUSED != IS_UNUSED) {
    7517             :                 zend_class_entry *ce;
    7518             : 
    7519             :                 if (IS_UNUSED == IS_CONST) {
    7520             :                         if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv))) {
    7521             :                                 ce = CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv));
    7522             :                         } else {
    7523             :                                 ce = zend_fetch_class_by_name(Z_STR_P(opline->op2.zv), opline->op2.zv + 1, 0 TSRMLS_CC);
    7524             :                                 if (UNEXPECTED(ce == NULL)) {
    7525             :                                         if (IS_CONST != IS_CONST) {
    7526             :                                                 zend_string_release(name);
    7527             :                                         }
    7528             : 
    7529             :                                         CHECK_EXCEPTION();
    7530             :                                         ZEND_VM_NEXT_OPCODE();
    7531             :                                 }
    7532             :                                 CACHE_PTR(Z_CACHE_SLOT_P(opline->op2.zv), ce);
    7533             :                         }
    7534             :                 } else {
    7535             :                         ce = Z_CE_P(EX_VAR(opline->op2.var));
    7536             :                 }
    7537             :                 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);
    7538             : 
    7539             :         } else {
    7540      207852 :                 target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
    7541      103926 :                 retval = zend_hash_find(target_symbol_table, name);
    7542      103926 :                 if (retval == NULL) {
    7543         808 :                         switch (type) {
    7544             :                                 case BP_VAR_R:
    7545             :                                 case BP_VAR_UNSET:
    7546         804 :                                         zend_error(E_NOTICE,"Undefined variable: %s", name->val);
    7547             :                                         /* break missing intentionally */
    7548             :                                 case BP_VAR_IS:
    7549         804 :                                         retval = &EG(uninitialized_zval);
    7550         804 :                                         break;
    7551             :                                 case BP_VAR_RW:
    7552           0 :                                         zend_error(E_NOTICE,"Undefined variable: %s", name->val);
    7553             :                                         /* break missing intentionally */
    7554             :                                 case BP_VAR_W:
    7555           4 :                                         retval = zend_hash_add_new(target_symbol_table, name, &EG(uninitialized_zval));
    7556             :                                         break;
    7557             :                                 EMPTY_SWITCH_DEFAULT_CASE()
    7558             :                         }
    7559             :                 /* GLOBAL or $$name variable may be an INDIRECT pointer to CV */
    7560      103118 :                 } else if (Z_TYPE_P(retval) == IS_INDIRECT) {
    7561       88393 :                         retval = Z_INDIRECT_P(retval);
    7562       88393 :                         if (Z_TYPE_P(retval) == IS_UNDEF) {
    7563         700 :                                 switch (type) {
    7564             :                                         case BP_VAR_R:
    7565             :                                         case BP_VAR_UNSET:
    7566         700 :                                                 zend_error(E_NOTICE,"Undefined variable: %s", name->val);
    7567             :                                                 /* break missing intentionally */
    7568             :                                         case BP_VAR_IS:
    7569         700 :                                                 retval = &EG(uninitialized_zval);
    7570         700 :                                                 break;
    7571             :                                         case BP_VAR_RW:
    7572           0 :                                                 zend_error(E_NOTICE,"Undefined variable: %s", name->val);
    7573             :                                                 /* break missing intentionally */
    7574             :                                         case BP_VAR_W:
    7575           0 :                                                 ZVAL_NULL(retval);
    7576             :                                                 break;
    7577             :                                         EMPTY_SWITCH_DEFAULT_CASE()
    7578             :                                 }
    7579             :                         }
    7580             :                 }
    7581      103926 :                 if ((opline->extended_value & ZEND_FETCH_TYPE_MASK) == ZEND_FETCH_STATIC) {
    7582        1437 :                         if (Z_CONSTANT_P(retval)) {
    7583           7 :                                 zval_update_constant(retval, 1 TSRMLS_CC);
    7584             :                         }
    7585      102489 :                 } else if ((opline->extended_value & ZEND_FETCH_TYPE_MASK) != ZEND_FETCH_GLOBAL_LOCK) {
    7586             : 
    7587             :                 }
    7588             :         }
    7589             : 
    7590      103926 :         if (IS_CONST != IS_CONST) {
    7591             :                 zend_string_release(name);
    7592             :         }
    7593             : 
    7594             :         ZEND_ASSERT(retval != NULL);
    7595      206045 :         if (type == BP_VAR_R || type == BP_VAR_IS) {
    7596      102604 :                 if (/*type == BP_VAR_R &&*/ Z_ISREF_P(retval) && Z_REFCOUNT_P(retval) == 1) {
    7597         168 :                         ZVAL_UNREF(retval);
    7598             :                 }
    7599      102119 :                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    7600             :         } else {
    7601        1807 :                 ZVAL_INDIRECT(EX_VAR(opline->result.var), retval);
    7602             :         }
    7603             :         CHECK_EXCEPTION();
    7604      103926 :         ZEND_VM_NEXT_OPCODE();
    7605             : }
    7606             : 
    7607      102098 : static int ZEND_FASTCALL  ZEND_FETCH_R_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7608             : {
    7609      102098 :         return zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    7610             : }
    7611             : 
    7612        1772 : static int ZEND_FASTCALL  ZEND_FETCH_W_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7613             : {
    7614        1772 :         return zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_W, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    7615             : }
    7616             : 
    7617           5 : static int ZEND_FASTCALL  ZEND_FETCH_RW_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7618             : {
    7619           5 :         return zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_RW, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    7620             : }
    7621             : 
    7622           4 : static int ZEND_FASTCALL  ZEND_FETCH_FUNC_ARG_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7623             : {
    7624           4 :         USE_OPLINE
    7625             : 
    7626           8 :         if (zend_is_by_ref_func_arg_fetch(opline, EX(call) TSRMLS_CC)) {
    7627           0 :                 return zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_W, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    7628             :         } else {
    7629           4 :                 return zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    7630             :         }
    7631             : }
    7632             : 
    7633          30 : static int ZEND_FASTCALL  ZEND_FETCH_UNSET_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7634             : {
    7635          30 :         return zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_UNSET, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    7636             : }
    7637             : 
    7638          17 : static int ZEND_FASTCALL  ZEND_FETCH_IS_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7639             : {
    7640          17 :         return zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    7641             : }
    7642             : 
    7643           0 : static int ZEND_FASTCALL  ZEND_FETCH_DIM_FUNC_ARG_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7644             : {
    7645           0 :         USE_OPLINE
    7646             :         zval *container;
    7647             :         zend_free_op free_op1;
    7648             : 
    7649             :         SAVE_OPLINE();
    7650             : 
    7651           0 :         if (zend_is_by_ref_func_arg_fetch(opline, EX(call) TSRMLS_CC)) {
    7652             :         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    7653           0 :             zend_error_noreturn(E_ERROR, "Cannot use temporary expression in write context");
    7654             :         }
    7655             :                 container = NULL;
    7656             :                 if (IS_CONST == IS_VAR && UNEXPECTED(container == NULL)) {
    7657             :                         zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
    7658             :                 }
    7659             :                 ZVAL_DEREF(container);
    7660             :                 zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, NULL, IS_UNUSED TSRMLS_CC);
    7661             :                 if (IS_CONST == IS_VAR && READY_TO_DESTROY(free_op1.var)) {
    7662             :                         EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
    7663             :                 }
    7664             : 
    7665             : 
    7666             :         } else {
    7667             :                 if (IS_UNUSED == IS_UNUSED) {
    7668           0 :                         zend_error_noreturn(E_ERROR, "Cannot use [] for reading");
    7669             :                 }
    7670             :                 container = opline->op1.zv;
    7671             :                 zend_fetch_dimension_address_read_R(EX_VAR(opline->result.var), container, NULL, IS_UNUSED TSRMLS_CC);
    7672             : 
    7673             : 
    7674             :         }
    7675             :         CHECK_EXCEPTION();
    7676             :         ZEND_VM_NEXT_OPCODE();
    7677             : }
    7678             : 
    7679           2 : static int ZEND_FASTCALL  ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7680             : {
    7681           2 :         USE_OPLINE
    7682             :         zval *function_name;
    7683             :         zend_class_entry *ce;
    7684             :         zend_object *object;
    7685             :         zend_function *fbc;
    7686             : 
    7687             :         SAVE_OPLINE();
    7688             : 
    7689             :         if (IS_CONST == IS_CONST) {
    7690             :                 /* no function found. try a static method in class */
    7691           2 :                 if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op1.zv))) {
    7692           0 :                         ce = CACHED_PTR(Z_CACHE_SLOT_P(opline->op1.zv));
    7693             :                 } else {
    7694           2 :                         ce = zend_fetch_class_by_name(Z_STR_P(opline->op1.zv), opline->op1.zv + 1, ZEND_FETCH_CLASS_DEFAULT TSRMLS_CC);
    7695           2 :                         if (UNEXPECTED(EG(exception) != NULL)) {
    7696           0 :                                 HANDLE_EXCEPTION();
    7697             :                         }
    7698           2 :                         if (UNEXPECTED(ce == NULL)) {
    7699           0 :                                 zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op1.zv));
    7700             :                         }
    7701           2 :                         CACHE_PTR(Z_CACHE_SLOT_P(opline->op1.zv), ce);
    7702             :                 }
    7703             :         } else {
    7704             :                 ce = Z_CE_P(EX_VAR(opline->op1.var));
    7705             :         }
    7706             : 
    7707           2 :         if (IS_CONST == IS_CONST &&
    7708             :             IS_UNUSED == IS_CONST &&
    7709             :             CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv))) {
    7710             :                 fbc = CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv));
    7711           2 :         } else if (IS_CONST != IS_CONST &&
    7712             :                    IS_UNUSED == IS_CONST &&
    7713             :                    (fbc = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(opline->op2.zv), ce))) {
    7714             :                 /* do nothing */
    7715           2 :         } else if (IS_UNUSED != IS_UNUSED) {
    7716             : 
    7717             : 
    7718             :                 function_name = NULL;
    7719             :                 if (IS_UNUSED != IS_CONST) {
    7720             :                         if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
    7721             :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    7722             :                                         HANDLE_EXCEPTION();
    7723             :                                 }
    7724             :                                 zend_error_noreturn(E_ERROR, "Function name must be a string");
    7725             :                         }
    7726             :                 }
    7727             : 
    7728             :                 if (ce->get_static_method) {
    7729             :                         fbc = ce->get_static_method(ce, Z_STR_P(function_name) TSRMLS_CC);
    7730             :                 } else {
    7731             :                         fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_UNUSED == IS_CONST) ? (opline->op2.zv + 1) : NULL) TSRMLS_CC);
    7732             :                 }
    7733             :                 if (UNEXPECTED(fbc == NULL)) {
    7734             :                         zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", ce->name->val, Z_STRVAL_P(function_name));
    7735             :                 }
    7736             :                 if (IS_UNUSED == IS_CONST &&
    7737             :                     EXPECTED(fbc->type <= ZEND_USER_FUNCTION) &&
    7738             :                     EXPECTED((fbc->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0)) {
    7739             :                         if (IS_CONST == IS_CONST) {
    7740             :                                 CACHE_PTR(Z_CACHE_SLOT_P(function_name), fbc);
    7741             :                         } else {
    7742             :                                 CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), ce, fbc);
    7743             :                         }
    7744             :                 }
    7745             :                 if (IS_UNUSED != IS_CONST) {
    7746             : 
    7747             :                 }
    7748             :         } else {
    7749           2 :                 if (UNEXPECTED(ce->constructor == NULL)) {
    7750           1 :                         zend_error_noreturn(E_ERROR, "Cannot call constructor");
    7751             :                 }
    7752           1 :                 if (Z_OBJ(EX(This)) && Z_OBJ(EX(This))->ce != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
    7753           0 :                         zend_error_noreturn(E_ERROR, "Cannot call private %s::__construct()", ce->name->val);
    7754             :                 }
    7755           1 :                 fbc = ce->constructor;
    7756             :         }
    7757             : 
    7758           1 :         object = NULL;
    7759           1 :         if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
    7760           1 :                 if (Z_OBJ(EX(This))) {
    7761           1 :                         object = Z_OBJ(EX(This));
    7762           1 :                         GC_REFCOUNT(object)++;
    7763             :                 }
    7764           2 :                 if (!object ||
    7765           1 :                     !instanceof_function(object->ce, ce TSRMLS_CC)) {
    7766             :                     /* We are calling method of the other (incompatible) class,
    7767             :                        but passing $this. This is done for compatibility with php-4. */
    7768           0 :                         if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
    7769           0 :                                 zend_error(
    7770             :                                         object ? E_DEPRECATED : E_STRICT,
    7771             :                                         "Non-static method %s::%s() should not be called statically%s",
    7772           0 :                                         fbc->common.scope->name->val, fbc->common.function_name->val,
    7773             :                                         object ? ", assuming $this from incompatible context" : "");
    7774             :                         } else {
    7775             :                                 /* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
    7776           0 :                                 zend_error_noreturn(
    7777             :                                         E_ERROR,
    7778             :                                         "Non-static method %s::%s() cannot be called statically%s",
    7779           0 :                                         fbc->common.scope->name->val, fbc->common.function_name->val,
    7780             :                                         object ? ", assuming $this from incompatible context" : "");
    7781             :                         }
    7782             :                 }
    7783             :         }
    7784             : 
    7785           1 :         if (IS_CONST != IS_CONST) {
    7786             :                 /* previous opcode is ZEND_FETCH_CLASS */
    7787             :                 if ((opline-1)->extended_value == ZEND_FETCH_CLASS_PARENT || (opline-1)->extended_value == ZEND_FETCH_CLASS_SELF) {
    7788             :                         ce = EX(called_scope);
    7789             :                 }
    7790             :         }
    7791             : 
    7792           3 :         EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
    7793           1 :                 fbc, opline->extended_value, ce, object, EX(call) TSRMLS_CC);
    7794             : 
    7795             :         if (IS_UNUSED == IS_UNUSED) {
    7796           1 :                 EX(call)->return_value = NULL;
    7797             :         }
    7798             : 
    7799             :         CHECK_EXCEPTION();
    7800           1 :         ZEND_VM_NEXT_OPCODE();
    7801             : }
    7802             : 
    7803       13628 : static int ZEND_FASTCALL  ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7804             : {
    7805       13628 :         USE_OPLINE
    7806             : 
    7807             :         zval *expr_ptr, new_expr;
    7808             : 
    7809             :         SAVE_OPLINE();
    7810       13628 :         if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) &&
    7811             :             (opline->extended_value & ZEND_ARRAY_ELEMENT_REF)) {
    7812             :                 expr_ptr = NULL;
    7813             :                 if (IS_CONST == IS_VAR && UNEXPECTED(expr_ptr == NULL)) {
    7814             :                         zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets");
    7815             :                 }
    7816             :                 ZVAL_MAKE_REF(expr_ptr);
    7817             :                 Z_ADDREF_P(expr_ptr);
    7818             : 
    7819             :         } else {
    7820       13628 :                 expr_ptr = opline->op1.zv;
    7821       13628 :                 if (IS_CONST == IS_TMP_VAR) {
    7822             :                         ZVAL_COPY_VALUE(&new_expr, expr_ptr);
    7823             :                         expr_ptr = &new_expr;
    7824             :                 } else if (IS_CONST == IS_CONST) {
    7825       13628 :                         if (!Z_IMMUTABLE_P(expr_ptr)) {
    7826       13628 :                                 ZVAL_DUP(&new_expr, expr_ptr);
    7827       13628 :                                 expr_ptr = &new_expr;
    7828             :                         }
    7829             :                 } else if ((IS_CONST == IS_CV || IS_CONST == IS_VAR) && Z_ISREF_P(expr_ptr)) {
    7830             :                         expr_ptr = Z_REFVAL_P(expr_ptr);
    7831             :                         if (Z_REFCOUNTED_P(expr_ptr)) Z_ADDREF_P(expr_ptr);
    7832             : 
    7833             :                 } else if (IS_CONST == IS_CV && Z_REFCOUNTED_P(expr_ptr)) {
    7834             :                         Z_ADDREF_P(expr_ptr);
    7835             :                 }
    7836             :         }
    7837             : 
    7838       13628 :         if (IS_UNUSED != IS_UNUSED) {
    7839             : 
    7840             :                 zval *offset = NULL;
    7841             :                 zend_string *str;
    7842             :                 zend_ulong hval;
    7843             : 
    7844             : add_again:
    7845             :                 switch (Z_TYPE_P(offset)) {
    7846             :                         case IS_DOUBLE:
    7847             :                                 hval = zend_dval_to_lval(Z_DVAL_P(offset));
    7848             :                                 goto num_index;
    7849             :                         case IS_LONG:
    7850             :                                 hval = Z_LVAL_P(offset);
    7851             : num_index:
    7852             :                                 zend_hash_index_update(Z_ARRVAL_P(EX_VAR(opline->result.var)), hval, expr_ptr);
    7853             :                                 break;
    7854             :                         case IS_STRING:
    7855             :                                 str = Z_STR_P(offset);
    7856             :                                 if (IS_UNUSED != IS_CONST) {
    7857             :                                         if (ZEND_HANDLE_NUMERIC(str, hval)) {
    7858             :                                                 goto num_index;
    7859             :                                         }
    7860             :                                 }
    7861             : str_index:
    7862             :                                 zend_hash_update(Z_ARRVAL_P(EX_VAR(opline->result.var)), str, expr_ptr);
    7863             :                                 break;
    7864             :                         case IS_NULL:
    7865             :                                 str = STR_EMPTY_ALLOC();
    7866             :                                 goto str_index;
    7867             :                         case IS_FALSE:
    7868             :                                 hval = 0;
    7869             :                                 goto num_index;
    7870             :                         case IS_TRUE:
    7871             :                                 hval = 1;
    7872             :                                 goto num_index;
    7873             :                         case IS_REFERENCE:
    7874             :                                 offset = Z_REFVAL_P(offset);
    7875             :                                 goto add_again;
    7876             :                                 break;
    7877             :                         default:
    7878             :                                 zend_error(E_WARNING, "Illegal offset type");
    7879             :                                 zval_ptr_dtor(expr_ptr);
    7880             :                                 /* do nothing */
    7881             :                                 break;
    7882             :                 }
    7883             : 
    7884             :         } else {
    7885       13628 :                 zend_hash_next_index_insert(Z_ARRVAL_P(EX_VAR(opline->result.var)), expr_ptr);
    7886             :         }
    7887             :         CHECK_EXCEPTION();
    7888       13628 :         ZEND_VM_NEXT_OPCODE();
    7889             : }
    7890             : 
    7891        1036 : static int ZEND_FASTCALL  ZEND_INIT_ARRAY_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7892             : {
    7893             :         zval *array;
    7894             :         uint32_t size;
    7895        1036 :         USE_OPLINE
    7896             : 
    7897        1036 :         array = EX_VAR(opline->result.var);
    7898             :         if (IS_CONST != IS_UNUSED) {
    7899        1036 :                 size = opline->extended_value >> ZEND_ARRAY_SIZE_SHIFT;
    7900             :         } else {
    7901             :                 size = 0;
    7902             :         }
    7903        1036 :         ZVAL_NEW_ARR(array);
    7904        1036 :         zend_hash_init(Z_ARRVAL_P(array), size, NULL, ZVAL_PTR_DTOR, 0);
    7905             : 
    7906             :         if (IS_CONST != IS_UNUSED) {
    7907             :                 /* Explicitly initialize array as not-packed if flag is set */
    7908        1036 :                 if (opline->extended_value & ZEND_ARRAY_NOT_PACKED) {
    7909          13 :                         zend_hash_real_init(Z_ARRVAL_P(array), 0);
    7910             :                 }
    7911             :         }
    7912             : 
    7913        1036 :         if (IS_CONST == IS_UNUSED) {
    7914             :                 ZEND_VM_NEXT_OPCODE();
    7915             : #if 0 || IS_CONST != IS_UNUSED
    7916             :         } else {
    7917        1036 :                 return ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    7918             : #endif
    7919             :         }
    7920             : }
    7921             : 
    7922           5 : static int ZEND_FASTCALL  ZEND_UNSET_VAR_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7923             : {
    7924           5 :         USE_OPLINE
    7925             :         zval tmp, *varname;
    7926             :         HashTable *target_symbol_table;
    7927             : 
    7928             : 
    7929             :         SAVE_OPLINE();
    7930           5 :         if (IS_CONST == IS_CV &&
    7931             :             IS_UNUSED == IS_UNUSED &&
    7932             :             (opline->extended_value & ZEND_QUICK_SET)) {
    7933             :                 zval *var = EX_VAR(opline->op1.var);
    7934             : 
    7935             :                 if (Z_REFCOUNTED_P(var)) {
    7936             :                         zend_refcounted *garbage = Z_COUNTED_P(var);
    7937             : 
    7938             :                         if (!--GC_REFCOUNT(garbage)) {
    7939             :                                 ZVAL_UNDEF(var);
    7940             :                                 _zval_dtor_func_for_ptr(garbage ZEND_FILE_LINE_CC);
    7941             :                         } else {
    7942             :                                 GC_ZVAL_CHECK_POSSIBLE_ROOT(var);
    7943             :                                 ZVAL_UNDEF(var);
    7944             :                         }
    7945             :                 } else {
    7946             :                         ZVAL_UNDEF(var);
    7947             :                 }
    7948             :                 CHECK_EXCEPTION();
    7949             :                 ZEND_VM_NEXT_OPCODE();
    7950             :         }
    7951             : 
    7952           5 :         varname = opline->op1.zv;
    7953             : 
    7954           5 :         ZVAL_UNDEF(&tmp);
    7955           5 :         if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
    7956             :                 ZVAL_STR(&tmp, zval_get_string(varname));
    7957             :                 varname = &tmp;
    7958             :         }
    7959             : 
    7960           5 :         if (IS_UNUSED != IS_UNUSED) {
    7961             :                 zend_class_entry *ce;
    7962             : 
    7963             :                 if (IS_UNUSED == IS_CONST) {
    7964             :                         if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv))) {
    7965             :                                 ce = CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv));
    7966             :                         } else {
    7967             :                                 ce = zend_fetch_class_by_name(Z_STR_P(opline->op2.zv), opline->op2.zv + 1, 0 TSRMLS_CC);
    7968             :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    7969             :                                         if (IS_CONST != IS_CONST) {
    7970             :                                                 zval_dtor(&tmp);
    7971             :                                         }
    7972             : 
    7973             :                                         HANDLE_EXCEPTION();
    7974             :                                 }
    7975             :                                 if (UNEXPECTED(ce == NULL)) {
    7976             :                                         zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op2.zv));
    7977             :                                 }
    7978             :                                 CACHE_PTR(Z_CACHE_SLOT_P(opline->op2.zv), ce);
    7979             :                         }
    7980             :                 } else {
    7981             :                         ce = Z_CE_P(EX_VAR(opline->op2.var));
    7982             :                 }
    7983             :                 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);
    7984             :         } else {
    7985          10 :                 target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
    7986           5 :                 zend_hash_del_ind(target_symbol_table, Z_STR_P(varname));
    7987             :         }
    7988             : 
    7989           5 :         if (IS_CONST != IS_CONST) {
    7990             :                 zval_dtor(&tmp);
    7991             :         }
    7992             : 
    7993             :         CHECK_EXCEPTION();
    7994           5 :         ZEND_VM_NEXT_OPCODE();
    7995             : }
    7996             : 
    7997          11 : static int ZEND_FASTCALL  ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7998             : {
    7999          11 :         USE_OPLINE
    8000             :         zval *value;
    8001             : 
    8002             :         SAVE_OPLINE();
    8003          11 :         if (IS_CONST == IS_CV &&
    8004             :             IS_UNUSED == IS_UNUSED &&
    8005             :             (opline->extended_value & ZEND_QUICK_SET)) {
    8006             :                 value = EX_VAR(opline->op1.var);
    8007             :                 if (opline->extended_value & ZEND_ISSET) {
    8008             :                         ZVAL_BOOL(EX_VAR(opline->result.var),
    8009             :                                 Z_TYPE_P(value) > IS_NULL &&
    8010             :                             (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL));
    8011             :                 } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
    8012             :                         ZVAL_BOOL(EX_VAR(opline->result.var),
    8013             :                                 !i_zend_is_true(value TSRMLS_CC));
    8014             :                         CHECK_EXCEPTION();
    8015             :                 }
    8016             :                 ZEND_VM_NEXT_OPCODE();
    8017             :         } else {
    8018             : 
    8019          11 :                 zval tmp, *varname = opline->op1.zv;
    8020             : 
    8021          11 :                 if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
    8022             :                         ZVAL_STR(&tmp, zval_get_string(varname));
    8023             :                         varname = &tmp;
    8024             :                 }
    8025             : 
    8026          11 :                 if (IS_UNUSED != IS_UNUSED) {
    8027             :                         zend_class_entry *ce;
    8028             : 
    8029             :                         if (IS_UNUSED == IS_CONST) {
    8030             :                                 if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv))) {
    8031             :                                         ce = CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv));
    8032             :                                 } else {
    8033             :                                         ce = zend_fetch_class_by_name(Z_STR_P(opline->op2.zv), opline->op2.zv + 1, 0 TSRMLS_CC);
    8034             :                                         if (UNEXPECTED(ce == NULL)) {
    8035             :                                                 CHECK_EXCEPTION();
    8036             :                                                 ZEND_VM_NEXT_OPCODE();
    8037             :                                         }
    8038             :                                         CACHE_PTR(Z_CACHE_SLOT_P(opline->op2.zv), ce);
    8039             :                                 }
    8040             :                         } else {
    8041             :                                 ce = Z_CE_P(EX_VAR(opline->op2.var));
    8042             :                         }
    8043             :                         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);
    8044             :                 } else {
    8045          22 :                         HashTable *target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
    8046          22 :                         value = zend_hash_find_ind(target_symbol_table, Z_STR_P(varname));
    8047             :                 }
    8048             : 
    8049          11 :                 if (IS_CONST != IS_CONST && varname == &tmp) {
    8050             :                         zval_dtor(&tmp);
    8051             :                 }
    8052             : 
    8053          11 :                 if (opline->extended_value & ZEND_ISSET) {
    8054          23 :                         ZVAL_BOOL(EX_VAR(opline->result.var),
    8055             :                                 value && Z_TYPE_P(value) > IS_NULL &&
    8056             :                             (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL));
    8057             :                 } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
    8058           8 :                         ZVAL_BOOL(EX_VAR(opline->result.var),
    8059             :                                 !value || !i_zend_is_true(value TSRMLS_CC));
    8060             :                 }
    8061             : 
    8062             :                 CHECK_EXCEPTION();
    8063          11 :                 ZEND_VM_NEXT_OPCODE();
    8064             :         }
    8065             : }
    8066             : 
    8067         338 : static int ZEND_FASTCALL  ZEND_DECLARE_LAMBDA_FUNCTION_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8068             : {
    8069         338 :         USE_OPLINE
    8070             :         zval *zfunc;
    8071             :         int closure_is_static, closure_is_being_defined_inside_static_context;
    8072             : 
    8073             :         SAVE_OPLINE();
    8074             : 
    8075         676 :         if (UNEXPECTED((zfunc = zend_hash_find(EG(function_table), Z_STR_P(opline->op1.zv))) == NULL) ||
    8076         338 :             UNEXPECTED(Z_FUNC_P(zfunc)->type != ZEND_USER_FUNCTION)) {
    8077           0 :                 zend_error_noreturn(E_ERROR, "Base lambda function for closure not found");
    8078             :         }
    8079             : 
    8080         338 :         closure_is_static = Z_FUNC_P(zfunc)->common.fn_flags & ZEND_ACC_STATIC;
    8081         338 :         closure_is_being_defined_inside_static_context = EX(func)->common.fn_flags & ZEND_ACC_STATIC;
    8082         356 :         if (closure_is_static || closure_is_being_defined_inside_static_context) {
    8083          18 :                 zend_create_closure(EX_VAR(opline->result.var), Z_FUNC_P(zfunc), EX(called_scope), NULL TSRMLS_CC);
    8084             :         } else {
    8085         320 :                 zend_create_closure(EX_VAR(opline->result.var), Z_FUNC_P(zfunc), EX(scope), Z_OBJ(EX(This)) ? &EX(This) : NULL TSRMLS_CC);
    8086             :         }
    8087             : 
    8088             :         CHECK_EXCEPTION();
    8089         338 :         ZEND_VM_NEXT_OPCODE();
    8090             : }
    8091             : 
    8092          28 : static int ZEND_FASTCALL  ZEND_YIELD_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8093             : {
    8094          28 :         USE_OPLINE
    8095             : 
    8096             :         /* The generator object is stored in EX(return_value) */
    8097          28 :         zend_generator *generator = (zend_generator *) EX(return_value);
    8098             : 
    8099          28 :         if (generator->flags & ZEND_GENERATOR_FORCED_CLOSE) {
    8100           0 :                 zend_error_noreturn(E_ERROR, "Cannot yield from finally in a force-closed generator");
    8101             :         }
    8102             : 
    8103             :         /* Destroy the previously yielded value */
    8104          28 :         zval_ptr_dtor(&generator->value);
    8105             : 
    8106             :         /* Destroy the previously yielded key */
    8107          28 :         zval_ptr_dtor(&generator->key);
    8108             : 
    8109             :         /* Set the new yielded value */
    8110             :         if (IS_CONST != IS_UNUSED) {
    8111             : 
    8112             : 
    8113          28 :                 if (EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE) {
    8114             :                         /* Constants and temporary variables aren't yieldable by reference,
    8115             :                          * but we still allow them with a notice. */
    8116             :                         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    8117             :                                 zval *value;
    8118             : 
    8119           1 :                                 zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    8120             : 
    8121           1 :                                 value = opline->op1.zv;
    8122           1 :                                 ZVAL_COPY_VALUE(&generator->value, value);
    8123           1 :                                 if (Z_OPT_REFCOUNTED(generator->value)) Z_SET_REFCOUNT(generator->value, 1);
    8124             : 
    8125             :                                 /* Temporary variables don't need ctor copying */
    8126             :                                 if (IS_CONST != IS_TMP_VAR) {
    8127           1 :                                         zval_opt_copy_ctor(&generator->value);
    8128             :                                 }
    8129             :                         } else {
    8130             :                                 zval *value_ptr = NULL;
    8131             : 
    8132             :                                 if (IS_CONST == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
    8133             :                                         zend_error_noreturn(E_ERROR, "Cannot yield string offsets by reference");
    8134             :                                 }
    8135             : 
    8136             :                                 /* If a function call result is yielded and the function did
    8137             :                                  * not return by reference we throw a notice. */
    8138             :                                 if (IS_CONST == IS_VAR &&
    8139             :                                     (value_ptr == &EG(uninitialized_zval) ||
    8140             :                                      (opline->extended_value == ZEND_RETURNS_FUNCTION &&
    8141             :                                       !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
    8142             :                                         zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    8143             :                                 } else {
    8144             :                                         ZVAL_MAKE_REF(value_ptr);
    8145             :                                 }
    8146             :                                 ZVAL_COPY(&generator->value, value_ptr);
    8147             : 
    8148             :                         }
    8149             :                 } else {
    8150          27 :                         zval *value = opline->op1.zv;
    8151             : 
    8152             :                         /* Consts, temporary variables and references need copying */
    8153             :                         if (IS_CONST == IS_CONST) {
    8154          27 :                                 ZVAL_DUP(&generator->value, value);
    8155             :                         } else if (IS_CONST == IS_TMP_VAR) {
    8156             :                                 ZVAL_COPY_VALUE(&generator->value, value);
    8157             :             } else if ((IS_CONST == IS_CV || IS_CONST == IS_VAR) && Z_ISREF_P(value)) {
    8158             :                                 ZVAL_DUP(&generator->value, Z_REFVAL_P(value));
    8159             : 
    8160             :                         } else {
    8161             :                                 ZVAL_COPY_VALUE(&generator->value, value);
    8162             :                                 if (IS_CONST == IS_CV) {
    8163             :                                         if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
    8164             :                                 }
    8165             :                         }
    8166             :                 }
    8167             :         } else {
    8168             :                 /* If no value was specified yield null */
    8169             :                 ZVAL_NULL(&generator->value);
    8170             :         }
    8171             : 
    8172             :         /* Set the new yielded key */
    8173          28 :         if (IS_UNUSED != IS_UNUSED) {
    8174             : 
    8175             :                 zval *key = NULL;
    8176             : 
    8177             :                 /* Consts, temporary variables and references need copying */
    8178             :                 if (IS_UNUSED == IS_CONST) {
    8179             :                         ZVAL_DUP(&generator->key, key);
    8180             :                 } else if (IS_UNUSED == IS_TMP_VAR) {
    8181             :                         ZVAL_COPY_VALUE(&generator->key, key);
    8182             :                 } else if ((IS_UNUSED == IS_VAR || IS_UNUSED == IS_CV) && Z_ISREF_P(key)) {
    8183             :                         ZVAL_DUP(&generator->key, Z_REFVAL_P(key));
    8184             : 
    8185             :                 } else {
    8186             :                         ZVAL_COPY_VALUE(&generator->key, key);
    8187             :                         if (IS_UNUSED == IS_CV) {
    8188             :                                 if (Z_OPT_REFCOUNTED_P(key)) Z_ADDREF_P(key);
    8189             :                         }
    8190             :                 }
    8191             : 
    8192             :                 if (Z_TYPE(generator->key) == IS_LONG
    8193             :                     && Z_LVAL(generator->key) > generator->largest_used_integer_key
    8194             :                 ) {
    8195             :                         generator->largest_used_integer_key = Z_LVAL(generator->key);
    8196             :                 }
    8197             :         } else {
    8198             :                 /* If no key was specified we use auto-increment keys */
    8199          28 :                 generator->largest_used_integer_key++;
    8200          28 :                 ZVAL_LONG(&generator->key, generator->largest_used_integer_key);
    8201             :         }
    8202             : 
    8203          28 :         if (RETURN_VALUE_USED(opline)) {
    8204             :                 /* If the return value of yield is used set the send
    8205             :                  * target and initialize it to NULL */
    8206           2 :                 generator->send_target = EX_VAR(opline->result.var);
    8207           2 :                 ZVAL_NULL(generator->send_target);
    8208             :         } else {
    8209          26 :                 generator->send_target = NULL;
    8210             :         }
    8211             : 
    8212             :         /* We increment to the next op, so we are at the correct position when the
    8213             :          * generator is resumed. */
    8214          28 :         ZEND_VM_INC_OPCODE();
    8215             : 
    8216             :         /* The GOTO VM uses a local opline variable. We need to set the opline
    8217             :          * variable in execute_data so we don't resume at an old position. */
    8218             :         SAVE_OPLINE();
    8219             : 
    8220          28 :         ZEND_VM_RETURN();
    8221             : }
    8222             : 
    8223          54 : static int ZEND_FASTCALL  ZEND_ADD_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8224             : {
    8225          54 :         USE_OPLINE
    8226             : 
    8227             : 
    8228             :         SAVE_OPLINE();
    8229         108 :         fast_add_function(EX_VAR(opline->result.var),
    8230             :                 opline->op1.zv,
    8231             :                 _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    8232             : 
    8233             : 
    8234             :         CHECK_EXCEPTION();
    8235          54 :         ZEND_VM_NEXT_OPCODE();
    8236             : }
    8237             : 
    8238         118 : static int ZEND_FASTCALL  ZEND_SUB_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8239             : {
    8240         118 :         USE_OPLINE
    8241             : 
    8242             : 
    8243             :         SAVE_OPLINE();
    8244         236 :         fast_sub_function(EX_VAR(opline->result.var),
    8245             :                 opline->op1.zv,
    8246             :                 _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    8247             : 
    8248             : 
    8249             :         CHECK_EXCEPTION();
    8250         118 :         ZEND_VM_NEXT_OPCODE();
    8251             : }
    8252             : 
    8253        2116 : static int ZEND_FASTCALL  ZEND_MUL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8254             : {
    8255        2116 :         USE_OPLINE
    8256             : 
    8257             : 
    8258             :         SAVE_OPLINE();
    8259        4232 :         fast_mul_function(EX_VAR(opline->result.var),
    8260             :                 opline->op1.zv,
    8261             :                 _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    8262             : 
    8263             : 
    8264             :         CHECK_EXCEPTION();
    8265        2116 :         ZEND_VM_NEXT_OPCODE();
    8266             : }
    8267             : 
    8268           3 : static int ZEND_FASTCALL  ZEND_DIV_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8269             : {
    8270           3 :         USE_OPLINE
    8271             : 
    8272             : 
    8273             :         SAVE_OPLINE();
    8274           6 :         fast_div_function(EX_VAR(opline->result.var),
    8275             :                 opline->op1.zv,
    8276             :                 _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    8277             : 
    8278             : 
    8279             :         CHECK_EXCEPTION();
    8280           3 :         ZEND_VM_NEXT_OPCODE();
    8281             : }
    8282             : 
    8283           1 : static int ZEND_FASTCALL  ZEND_MOD_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8284             : {
    8285           1 :         USE_OPLINE
    8286             : 
    8287             : 
    8288             :         SAVE_OPLINE();
    8289           2 :         fast_mod_function(EX_VAR(opline->result.var),
    8290             :                 opline->op1.zv,
    8291             :                 _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    8292             : 
    8293             : 
    8294             :         CHECK_EXCEPTION();
    8295           1 :         ZEND_VM_NEXT_OPCODE();
    8296             : }
    8297             : 
    8298           1 : static int ZEND_FASTCALL  ZEND_SL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8299             : {
    8300           1 :         USE_OPLINE
    8301             : 
    8302             : 
    8303             :         SAVE_OPLINE();
    8304           2 :         shift_left_function(EX_VAR(opline->result.var),
    8305             :                 opline->op1.zv,
    8306             :                 _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    8307             : 
    8308             : 
    8309             :         CHECK_EXCEPTION();
    8310           1 :         ZEND_VM_NEXT_OPCODE();
    8311             : }
    8312             : 
    8313           0 : static int ZEND_FASTCALL  ZEND_SR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8314             : {
    8315           0 :         USE_OPLINE
    8316             : 
    8317             : 
    8318             :         SAVE_OPLINE();
    8319           0 :         shift_right_function(EX_VAR(opline->result.var),
    8320             :                 opline->op1.zv,
    8321             :                 _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    8322             : 
    8323             : 
    8324             :         CHECK_EXCEPTION();
    8325           0 :         ZEND_VM_NEXT_OPCODE();
    8326             : }
    8327             : 
    8328      310294 : static int ZEND_FASTCALL  ZEND_CONCAT_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8329             : {
    8330      310294 :         USE_OPLINE
    8331             : 
    8332             : 
    8333             :         SAVE_OPLINE();
    8334      620588 :         concat_function(EX_VAR(opline->result.var),
    8335             :                 opline->op1.zv,
    8336             :                 _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    8337             : 
    8338             : 
    8339             :         CHECK_EXCEPTION();
    8340      310294 :         ZEND_VM_NEXT_OPCODE();
    8341             : }
    8342             : 
    8343          41 : static int ZEND_FASTCALL  ZEND_IS_IDENTICAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8344             : {
    8345          41 :         USE_OPLINE
    8346             : 
    8347             : 
    8348             :         SAVE_OPLINE();
    8349          82 :         fast_is_identical_function(EX_VAR(opline->result.var),
    8350             :                 opline->op1.zv,
    8351             :                 _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    8352             : 
    8353             : 
    8354             :         CHECK_EXCEPTION();
    8355          41 :         ZEND_VM_NEXT_OPCODE();
    8356             : }
    8357             : 
    8358         139 : static int ZEND_FASTCALL  ZEND_IS_NOT_IDENTICAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8359             : {
    8360         139 :         USE_OPLINE
    8361             : 
    8362         139 :         zval *result = EX_VAR(opline->result.var);
    8363             : 
    8364             :         SAVE_OPLINE();
    8365         278 :         fast_is_not_identical_function(result,
    8366             :                 opline->op1.zv,
    8367             :                 _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    8368             : 
    8369             : 
    8370             :         CHECK_EXCEPTION();
    8371         139 :         ZEND_VM_NEXT_OPCODE();
    8372             : }
    8373             : 
    8374        3148 : static int ZEND_FASTCALL  ZEND_IS_EQUAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8375             : {
    8376        3148 :         USE_OPLINE
    8377             : 
    8378        3148 :         zval *result = EX_VAR(opline->result.var);
    8379             : 
    8380             :         SAVE_OPLINE();
    8381        6296 :         fast_equal_function(result,
    8382             :                 opline->op1.zv,
    8383             :                 _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    8384             : 
    8385             : 
    8386             :         CHECK_EXCEPTION();
    8387        3148 :         ZEND_VM_NEXT_OPCODE();
    8388             : }
    8389             : 
    8390         147 : static int ZEND_FASTCALL  ZEND_IS_NOT_EQUAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8391             : {
    8392         147 :         USE_OPLINE
    8393             : 
    8394         147 :         zval *result = EX_VAR(opline->result.var);
    8395             : 
    8396             :         SAVE_OPLINE();
    8397         294 :         fast_not_equal_function(result,
    8398             :                 opline->op1.zv,
    8399             :                 _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    8400             : 
    8401             : 
    8402             :         CHECK_EXCEPTION();
    8403         147 :         ZEND_VM_NEXT_OPCODE();
    8404             : }
    8405             : 
    8406     1016669 : static int ZEND_FASTCALL  ZEND_IS_SMALLER_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8407             : {
    8408     1016669 :         USE_OPLINE
    8409             : 
    8410     1016669 :         zval *result = EX_VAR(opline->result.var);
    8411             : 
    8412             :         SAVE_OPLINE();
    8413     2033338 :         fast_is_smaller_function(result,
    8414             :                 opline->op1.zv,
    8415             :                 _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    8416             : 
    8417             : 
    8418             :         CHECK_EXCEPTION();
    8419     1016669 :         ZEND_VM_NEXT_OPCODE();
    8420             : }
    8421             : 
    8422      158333 : static int ZEND_FASTCALL  ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8423             : {
    8424      158333 :         USE_OPLINE
    8425             : 
    8426      158333 :         zval *result = EX_VAR(opline->result.var);
    8427             : 
    8428             :         SAVE_OPLINE();
    8429      316666 :         fast_is_smaller_or_equal_function(result,
    8430             :                 opline->op1.zv,
    8431             :                 _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    8432             : 
    8433             : 
    8434             :         CHECK_EXCEPTION();
    8435      158333 :         ZEND_VM_NEXT_OPCODE();
    8436             : }
    8437             : 
    8438           1 : static int ZEND_FASTCALL  ZEND_BW_OR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8439             : {
    8440           1 :         USE_OPLINE
    8441             : 
    8442             : 
    8443             :         SAVE_OPLINE();
    8444           2 :         bitwise_or_function(EX_VAR(opline->result.var),
    8445             :                 opline->op1.zv,
    8446             :                 _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    8447             : 
    8448             : 
    8449             :         CHECK_EXCEPTION();
    8450           1 :         ZEND_VM_NEXT_OPCODE();
    8451             : }
    8452             : 
    8453           1 : static int ZEND_FASTCALL  ZEND_BW_AND_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8454             : {
    8455           1 :         USE_OPLINE
    8456             : 
    8457             : 
    8458             :         SAVE_OPLINE();
    8459           2 :         bitwise_and_function(EX_VAR(opline->result.var),
    8460             :                 opline->op1.zv,
    8461             :                 _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    8462             : 
    8463             : 
    8464             :         CHECK_EXCEPTION();
    8465           1 :         ZEND_VM_NEXT_OPCODE();
    8466             : }
    8467             : 
    8468           1 : static int ZEND_FASTCALL  ZEND_BW_XOR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8469             : {
    8470           1 :         USE_OPLINE
    8471             : 
    8472             : 
    8473             :         SAVE_OPLINE();
    8474           2 :         bitwise_xor_function(EX_VAR(opline->result.var),
    8475             :                 opline->op1.zv,
    8476             :                 _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    8477             : 
    8478             : 
    8479             :         CHECK_EXCEPTION();
    8480           1 :         ZEND_VM_NEXT_OPCODE();
    8481             : }
    8482             : 
    8483           0 : static int ZEND_FASTCALL  ZEND_BOOL_XOR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8484             : {
    8485           0 :         USE_OPLINE
    8486             : 
    8487             : 
    8488             :         SAVE_OPLINE();
    8489           0 :         boolean_xor_function(EX_VAR(opline->result.var),
    8490             :                 opline->op1.zv,
    8491             :                 _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    8492             : 
    8493             : 
    8494             :         CHECK_EXCEPTION();
    8495           0 :         ZEND_VM_NEXT_OPCODE();
    8496             : }
    8497             : 
    8498           0 : static int ZEND_FASTCALL  ZEND_FETCH_DIM_R_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8499             : {
    8500           0 :         USE_OPLINE
    8501             : 
    8502             :         zval *container;
    8503             : 
    8504             :         SAVE_OPLINE();
    8505           0 :         container = opline->op1.zv;
    8506           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);
    8507             : 
    8508             : 
    8509             :         CHECK_EXCEPTION();
    8510           0 :         ZEND_VM_NEXT_OPCODE();
    8511             : }
    8512             : 
    8513           0 : static int ZEND_FASTCALL  ZEND_FETCH_DIM_IS_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8514             : {
    8515           0 :         USE_OPLINE
    8516             : 
    8517             :         zval *container;
    8518             : 
    8519             :         SAVE_OPLINE();
    8520           0 :         container = opline->op1.zv;
    8521           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);
    8522             : 
    8523             : 
    8524             :         CHECK_EXCEPTION();
    8525           0 :         ZEND_VM_NEXT_OPCODE();
    8526             : }
    8527             : 
    8528           0 : static int ZEND_FASTCALL  ZEND_FETCH_DIM_FUNC_ARG_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8529             : {
    8530           0 :         USE_OPLINE
    8531             :         zval *container;
    8532             :         zend_free_op free_op1;
    8533             : 
    8534             :         SAVE_OPLINE();
    8535             : 
    8536           0 :         if (zend_is_by_ref_func_arg_fetch(opline, EX(call) TSRMLS_CC)) {
    8537             :         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    8538           0 :             zend_error_noreturn(E_ERROR, "Cannot use temporary expression in write context");
    8539             :         }
    8540             :                 container = NULL;
    8541             :                 if (IS_CONST == IS_VAR && UNEXPECTED(container == NULL)) {
    8542             :                         zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
    8543             :                 }
    8544             :                 ZVAL_DEREF(container);
    8545             :                 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);
    8546             :                 if (IS_CONST == IS_VAR && READY_TO_DESTROY(free_op1.var)) {
    8547             :                         EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
    8548             :                 }
    8549             : 
    8550             : 
    8551             :         } else {
    8552           0 :                 if (IS_CV == IS_UNUSED) {
    8553             :                         zend_error_noreturn(E_ERROR, "Cannot use [] for reading");
    8554             :                 }
    8555           0 :                 container = opline->op1.zv;
    8556           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);
    8557             : 
    8558             : 
    8559             :         }
    8560             :         CHECK_EXCEPTION();
    8561           0 :         ZEND_VM_NEXT_OPCODE();
    8562             : }
    8563             : 
    8564           0 : static int ZEND_FASTCALL  ZEND_FETCH_OBJ_R_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8565             : {
    8566           0 :         USE_OPLINE
    8567             : 
    8568             :         zval *container;
    8569             : 
    8570             :         zval *offset;
    8571             : 
    8572             :         SAVE_OPLINE();
    8573           0 :         container = opline->op1.zv;
    8574           0 :         offset  = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
    8575             : 
    8576           0 :         if ((IS_CONST != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT)) ||
    8577           0 :             UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
    8578           0 :                 zend_error(E_NOTICE, "Trying to get property of non-object");
    8579           0 :                 ZVAL_NULL(EX_VAR(opline->result.var));
    8580             :         } else {
    8581             :                 zval *retval;
    8582             : 
    8583             :                 /* here we are sure we are dealing with an object */
    8584             :                 do {
    8585           0 :                         if (IS_CV == IS_CONST &&
    8586             :                             EXPECTED(Z_OBJCE_P(container) == CACHED_PTR(Z_CACHE_SLOT_P(offset)))) {
    8587             :                                 zend_property_info *prop_info = CACHED_PTR(Z_CACHE_SLOT_P(offset) + 1);
    8588             :                                 zend_object *zobj = Z_OBJ_P(container);
    8589             : 
    8590             :                                 if (EXPECTED(prop_info)) {
    8591             :                                         retval = OBJ_PROP(zobj, prop_info->offset);
    8592             :                                         if (EXPECTED(Z_TYPE_P(retval) != IS_UNDEF)) {
    8593             :                                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    8594             :                                                 break;
    8595             :                                         }
    8596             :                                 } else if (EXPECTED(zobj->properties != NULL)) {
    8597             :                                         retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
    8598             :                                         if (EXPECTED(retval)) {
    8599             :                                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    8600             :                                                 break;
    8601             :                                         }
    8602             :                                 }
    8603             :                         }
    8604             : 
    8605           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);
    8606             : 
    8607           0 :                         if (retval != EX_VAR(opline->result.var)) {
    8608           0 :                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    8609             :                         }
    8610             :                 } while (0);
    8611             :         }
    8612             : 
    8613             : 
    8614             :         CHECK_EXCEPTION();
    8615           0 :         ZEND_VM_NEXT_OPCODE();
    8616             : }
    8617             : 
    8618           0 : static int ZEND_FASTCALL  ZEND_FETCH_OBJ_IS_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8619             : {
    8620           0 :         USE_OPLINE
    8621             : 
    8622             :         zval *container;
    8623             : 
    8624             :         zval *offset;
    8625             :         zval *retval;
    8626             :         zend_property_info *prop_info;
    8627             : 
    8628             :         SAVE_OPLINE();
    8629           0 :         container = opline->op1.zv;
    8630           0 :         offset  = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
    8631             : 
    8632           0 :         if ((IS_CONST != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT)) ||
    8633           0 :             UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
    8634           0 :                 ZVAL_NULL(EX_VAR(opline->result.var));
    8635             :         } else {
    8636             :                 zval *retval;
    8637             : 
    8638             :                 /* here we are sure we are dealing with an object */
    8639             :                 do {
    8640           0 :                         if (IS_CV == IS_CONST &&
    8641             :                             EXPECTED(Z_OBJCE_P(container) == CACHED_PTR(Z_CACHE_SLOT_P(offset)))) {
    8642             :                                 zend_property_info *prop_info = CACHED_PTR(Z_CACHE_SLOT_P(offset) + 1);
    8643             :                                 zend_object *zobj = Z_OBJ_P(container);
    8644             : 
    8645             :                                 if (EXPECTED(prop_info)) {
    8646             :                                         retval = OBJ_PROP(zobj, prop_info->offset);
    8647             :                                         if (EXPECTED(Z_TYPE_P(retval) != IS_UNDEF)) {
    8648             :                                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    8649             :                                                 break;
    8650             :                                         }
    8651             :                                 } else if (EXPECTED(zobj->properties != NULL)) {
    8652             :                                         retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
    8653             :                                         if (EXPECTED(retval)) {
    8654             :                                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    8655             :                                                 break;
    8656             :                                         }
    8657             :                                 }
    8658             :                         }
    8659             : 
    8660           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);
    8661             : 
    8662           0 :                         if (retval != EX_VAR(opline->result.var)) {
    8663           0 :                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    8664             :                         }
    8665             :                 } while (0);
    8666             :         }
    8667             : 
    8668             : 
    8669             :         CHECK_EXCEPTION();
    8670           0 :         ZEND_VM_NEXT_OPCODE();
    8671             : }
    8672             : 
    8673           0 : static int ZEND_FASTCALL  ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8674             : {
    8675           0 :         USE_OPLINE
    8676             :         zval *container;
    8677             : 
    8678           0 :         if (zend_is_by_ref_func_arg_fetch(opline, EX(call) TSRMLS_CC)) {
    8679             :                 /* Behave like FETCH_OBJ_W */
    8680             :                 zend_free_op free_op1;
    8681             :                 zval *property;
    8682             : 
    8683             :                 SAVE_OPLINE();
    8684           0 :                 property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
    8685           0 :                 container = NULL;
    8686             : 
    8687             :         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    8688           0 :             zend_error_noreturn(E_ERROR, "Cannot use temporary expression in write context");
    8689             :         }
    8690             :                 if (IS_CONST == IS_VAR && UNEXPECTED(container == NULL)) {
    8691             :                         zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
    8692             :                 }
    8693             :                 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);
    8694             : 
    8695             :                 if (IS_CONST == IS_VAR && READY_TO_DESTROY(free_op1.var)) {
    8696             :                         EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
    8697             :                 }
    8698             : 
    8699             :                 CHECK_EXCEPTION();
    8700             :                 ZEND_VM_NEXT_OPCODE();
    8701             :         } else {
    8702           0 :                 return ZEND_FETCH_OBJ_R_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    8703             :         }
    8704             : }
    8705             : 
    8706          10 : static int ZEND_FASTCALL  ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8707             : {
    8708          10 :         USE_OPLINE
    8709             :         zval *function_name;
    8710             :         zend_class_entry *ce;
    8711             :         zend_object *object;
    8712             :         zend_function *fbc;
    8713             : 
    8714             :         SAVE_OPLINE();
    8715             : 
    8716             :         if (IS_CONST == IS_CONST) {
    8717             :                 /* no function found. try a static method in class */
    8718          10 :                 if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op1.zv))) {
    8719           2 :                         ce = CACHED_PTR(Z_CACHE_SLOT_P(opline->op1.zv));
    8720             :                 } else {
    8721           8 :                         ce = zend_fetch_class_by_name(Z_STR_P(opline->op1.zv), opline->op1.zv + 1, ZEND_FETCH_CLASS_DEFAULT TSRMLS_CC);
    8722           8 :                         if (UNEXPECTED(EG(exception) != NULL)) {
    8723           0 :                                 HANDLE_EXCEPTION();
    8724             :                         }
    8725           8 :                         if (UNEXPECTED(ce == NULL)) {
    8726           0 :                                 zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op1.zv));
    8727             :                         }
    8728           8 :                         CACHE_PTR(Z_CACHE_SLOT_P(opline->op1.zv), ce);
    8729             :                 }
    8730             :         } else {
    8731             :                 ce = Z_CE_P(EX_VAR(opline->op1.var));
    8732             :         }
    8733             : 
    8734          10 :         if (IS_CONST == IS_CONST &&
    8735             :             IS_CV == IS_CONST &&
    8736             :             CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv))) {
    8737             :                 fbc = CACHED_PTR(Z_CACHE_SLOT_P(opline->op2.zv));
    8738          10 :         } else if (IS_CONST != IS_CONST &&
    8739             :                    IS_CV == IS_CONST &&
    8740             :                    (fbc = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(opline->op2.zv), ce))) {
    8741             :                 /* do nothing */
    8742             :         } else if (IS_CV != IS_UNUSED) {
    8743             : 
    8744             : 
    8745          20 :                 function_name = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
    8746             :                 if (IS_CV != IS_CONST) {
    8747          10 :                         if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
    8748           2 :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    8749           1 :                                         HANDLE_EXCEPTION();
    8750             :                                 }
    8751           1 :                                 zend_error_noreturn(E_ERROR, "Function name must be a string");
    8752             :                         }
    8753             :                 }
    8754             : 
    8755           8 :                 if (ce->get_static_method) {
    8756           0 :                         fbc = ce->get_static_method(ce, Z_STR_P(function_name) TSRMLS_CC);
    8757             :                 } else {
    8758           8 :                         fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_CV == IS_CONST) ? (opline->op2.zv + 1) : NULL) TSRMLS_CC);
    8759             :                 }
    8760           8 :                 if (UNEXPECTED(fbc == NULL)) {
    8761           0 :                         zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", ce->name->val, Z_STRVAL_P(function_name));
    8762             :                 }
    8763           8 :                 if (IS_CV == IS_CONST &&
    8764             :                     EXPECTED(fbc->type <= ZEND_USER_FUNCTION) &&
    8765             :                     EXPECTED((fbc->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0)) {
    8766             :                         if (IS_CONST == IS_CONST) {
    8767             :                                 CACHE_PTR(Z_CACHE_SLOT_P(function_name), fbc);
    8768             :                         } else {
    8769             :                                 CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), ce, fbc);
    8770             :                         }
    8771             :                 }
    8772             :                 if (IS_CV != IS_CONST) {
    8773             : 
    8774             :                 }
    8775             :         } else {
    8776             :                 if (UNEXPECTED(ce->constructor == NULL)) {
    8777             :                         zend_error_noreturn(E_ERROR, "Cannot call constructor");
    8778             :                 }
    8779             :                 if (Z_OBJ(EX(This)) && Z_OBJ(EX(This))->ce != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
    8780             :                         zend_error_noreturn(E_ERROR, "Cannot call private %s::__construct()", ce->name->val);
    8781             :                 }
    8782             :                 fbc = ce->constructor;
    8783             :         }
    8784             : 
    8785           8 :         object = NULL;
    8786           8 :         if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
    8787           1 :                 if (Z_OBJ(EX(This))) {
    8788           0 :                         object = Z_OBJ(EX(This));
    8789           0 :                         GC_REFCOUNT(object)++;
    8790             :                 }
    8791           1 :                 if (!object ||
    8792           0 :                     !instanceof_function(object->ce, ce TSRMLS_CC)) {
    8793             :                     /* We are calling method of the other (incompatible) class,
    8794             :                        but passing $this. This is done for compatibility with php-4. */
    8795           1 :                         if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
    8796           3 :                                 zend_error(
    8797             :                                         object ? E_DEPRECATED : E_STRICT,
    8798             :                                         "Non-static method %s::%s() should not be called statically%s",
    8799           2 :                                         fbc->common.scope->name->val, fbc->common.function_name->val,
    8800             :                                         object ? ", assuming $this from incompatible context" : "");
    8801             :                         } else {
    8802             :                                 /* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
    8803           0 :                                 zend_error_noreturn(
    8804             :                                         E_ERROR,
    8805             :                                         "Non-static method %s::%s() cannot be called statically%s",
    8806           0 :                                         fbc->common.scope->name->val, fbc->common.function_name->val,
    8807             :                                         object ? ", assuming $this from incompatible context" : "");
    8808             :                         }
    8809             :                 }
    8810             :         }
    8811             : 
    8812           8 :         if (IS_CONST != IS_CONST) {
    8813             :                 /* previous opcode is ZEND_FETCH_CLASS */
    8814             :                 if ((opline-1)->extended_value == ZEND_FETCH_CLASS_PARENT || (opline-1)->extended_value == ZEND_FETCH_CLASS_SELF) {
    8815             :                         ce = EX(called_scope);
    8816             :                 }
    8817             :         }
    8818             : 
    8819          24 :         EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
    8820           8 :                 fbc, opline->extended_value, ce, object, EX(call) TSRMLS_CC);
    8821             : 
    8822           8 :         if (IS_CV == IS_UNUSED) {
    8823             :                 EX(call)->return_value = NULL;
    8824             :         }
    8825             : 
    8826             :         CHECK_EXCEPTION();
    8827           8 :         ZEND_VM_NEXT_OPCODE();
    8828             : }
    8829             : 
    8830          94 : static int ZEND_FASTCALL  ZEND_INIT_USER_CALL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8831             : {
    8832          94 :         USE_OPLINE
    8833             : 
    8834         188 :         zval *function_name = _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
    8835             :         zend_fcall_info_cache fcc;
    8836          94 :         char *error = NULL;
    8837             :         zend_function *func;
    8838             :         zend_class_entry *called_scope;
    8839             :         zend_object *object;
    8840             : 
    8841          94 :         if (zend_is_callable_ex(function_name, NULL, 0, NULL, &fcc, &error TSRMLS_CC)) {
    8842          68 :                 if (error) {
    8843           1 :                         efree(error);
    8844             :                 }
    8845          68 :                 func = fcc.function_handler;
    8846          68 :                 if (func->common.fn_flags & ZEND_ACC_CLOSURE) {
    8847             :                         /* Delay closure destruction until its invocation */
    8848           2 :                         func->common.prototype = (zend_function*)Z_OBJ_P(function_name);
    8849             :                         Z_ADDREF_P(function_name);
    8850             :                 }
    8851          68 :                 called_scope = fcc.called_scope;
    8852          68 :                 object = fcc.object;
    8853          68 :                 if (object) {
    8854          19 :                         GC_REFCOUNT(object)++; /* For $this pointer */
    8855          52 :                 } else if (func->common.scope &&
    8856           3 :                            !(func->common.fn_flags & ZEND_ACC_STATIC)) {
    8857           1 :                         if (func->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
    8858           2 :                                 zend_error(E_STRICT,
    8859             :                                 "Non-static method %s::%s() should not be called statically",
    8860           2 :                                 func->common.scope->name->val, func->common.function_name->val);
    8861             :                         } else {
    8862           0 :                                 zend_error_noreturn(
    8863             :                                         E_ERROR,
    8864             :                                         "Non-static method %s::%s() cannot be called statically",
    8865           0 :                                         func->common.scope->name->val, func->common.function_name->val);
    8866             :                         }
    8867             :                 }
    8868             :         } else {
    8869          26 :                 zend_error(E_WARNING, "%s() expects parameter 1 to be a valid callback, %s", Z_STRVAL_P(opline->op1.zv), error);
    8870          26 :                 efree(error);
    8871          26 :                 func = (zend_function*)&zend_pass_function;
    8872          26 :                 called_scope = NULL;
    8873          26 :                 object = NULL;
    8874             :         }
    8875             : 
    8876         282 :         EX(call) = zend_vm_stack_push_call_frame(VM_FRAME_NESTED_FUNCTION,
    8877          94 :                 func, opline->extended_value, called_scope, object, EX(call) TSRMLS_CC);
    8878             : 
    8879             :         CHECK_EXCEPTION();
    8880          94 :         ZEND_VM_NEXT_OPCODE();
    8881             : }
    8882             : 
    8883        1123 : static int ZEND_FASTCALL  ZEND_CATCH_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8884             : {
    8885        1123 :         USE_OPLINE
    8886             :         zend_class_entry *ce, *catch_ce;
    8887             :         zend_object *exception;
    8888             : 
    8889             :         SAVE_OPLINE();
    8890             :         /* Check whether an exception has been thrown, if not, jump over code */
    8891        1123 :         zend_exception_restore(TSRMLS_C);
    8892        1123 :         if (EG(exception) == NULL) {
    8893           0 :                 ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[opline->extended_value]);
    8894           0 :                 ZEND_VM_CONTINUE(); /* CHECK_ME */
    8895             :         }
    8896        1123 :         if (CACHED_PTR(Z_CACHE_SLOT_P(opline->op1.zv))) {
    8897         298 :                 catch_ce = CACHED_PTR(Z_CACHE_SLOT_P(opline->op1.zv));
    8898             :         } else {
    8899         825 :                 catch_ce = zend_fetch_class_by_name(Z_STR_P(opline->op1.zv), opline->op1.zv + 1, ZEND_FETCH_CLASS_NO_AUTOLOAD TSRMLS_CC);
    8900             : 
    8901         825 :                 CACHE_PTR(Z_CACHE_SLOT_P(opline->op1.zv), catch_ce);
    8902             :         }
    8903        1123 :         ce = EG(exception)->ce;
    8904             : 
    8905             : #ifdef HAVE_DTRACE
    8906             :         if (DTRACE_EXCEPTION_CAUGHT_ENABLED()) {
    8907             :                 DTRACE_EXCEPTION_CAUGHT((char *)ce->name);
    8908             :         }
    8909             : #endif /* HAVE_DTRACE */
    8910             : 
    8911        1123 :         if (ce != catch_ce) {
    8912         516 :                 if (!instanceof_function(ce, catch_ce TSRMLS_CC)) {
    8913          11 :                         if (opline->result.num) {
    8914           6 :                                 zend_throw_exception_internal(NULL TSRMLS_CC);
    8915           6 :                                 HANDLE_EXCEPTION();
    8916             :                         }
    8917           5 :                         ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[opline->extended_value]);
    8918           5 :                         ZEND_VM_CONTINUE(); /* CHECK_ME */
    8919             :                 }
    8920             :         }
    8921             : 
    8922        1112 :         exception = EG(exception);
    8923        1112 :         if (Z_REFCOUNTED_P(EX_VAR(opline->op2.var))) {
    8924         513 :                 zval_ptr_dtor(EX_VAR(opline->op2.var));
    8925             :         }
    8926        1112 :         ZVAL_OBJ(EX_VAR(opline->op2.var), EG(exception));
    8927        1112 :         if (UNEXPECTED(EG(exception) != exception)) {
    8928           1 :                 GC_REFCOUNT(EG(exception))++;
    8929           1 :                 HANDLE_EXCEPTION();
    8930             :         } else {
    8931        1111 :                 EG(exception) = NULL;
    8932        1111 :                 ZEND_VM_NEXT_OPCODE();
    8933             :         }
    8934             : }
    8935             : 
    8936           0 : static int ZEND_FASTCALL  ZEND_CASE_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8937             : {
    8938           0 :         USE_OPLINE
    8939             : 
    8940           0 :         zval *result = EX_VAR(opline->result.var);
    8941             : 
    8942             :         SAVE_OPLINE();
    8943           0 :         fast_equal_function(result,
    8944             :                  opline->op1.zv,
    8945             :                  _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    8946             : 
    8947             :         CHECK_EXCEPTION();
    8948           0 :         ZEND_VM_NEXT_OPCODE();
    8949             : }
    8950             : 
    8951          70 : static int ZEND_FASTCALL  ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8952             : {
    8953          70 :         USE_OPLINE
    8954             : 
    8955             :         zval *expr_ptr, new_expr;
    8956             : 
    8957             :         SAVE_OPLINE();
    8958          70 :         if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) &&
    8959             :             (opline->extended_value & ZEND_ARRAY_ELEMENT_REF)) {
    8960             :                 expr_ptr = NULL;
    8961             :                 if (IS_CONST == IS_VAR && UNEXPECTED(expr_ptr == NULL)) {
    8962             :                         zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets");
    8963             :                 }
    8964             :                 ZVAL_MAKE_REF(expr_ptr);
    8965             :                 Z_ADDREF_P(expr_ptr);
    8966             : 
    8967             :         } else {
    8968          70 :                 expr_ptr = opline->op1.zv;
    8969          70 :                 if (IS_CONST == IS_TMP_VAR) {
    8970             :                         ZVAL_COPY_VALUE(&new_expr, expr_ptr);
    8971             :                         expr_ptr = &new_expr;
    8972             :                 } else if (IS_CONST == IS_CONST) {
    8973          70 :                         if (!Z_IMMUTABLE_P(expr_ptr)) {
    8974          70 :                                 ZVAL_DUP(&new_expr, expr_ptr);
    8975          70 :                                 expr_ptr = &new_expr;
    8976             :                         }
    8977             :                 } else if ((IS_CONST == IS_CV || IS_CONST == IS_VAR) && Z_ISREF_P(expr_ptr)) {
    8978             :                         expr_ptr = Z_REFVAL_P(expr_ptr);
    8979             :                         if (Z_REFCOUNTED_P(expr_ptr)) Z_ADDREF_P(expr_ptr);
    8980             : 
    8981             :                 } else if (IS_CONST == IS_CV && Z_REFCOUNTED_P(expr_ptr)) {
    8982             :                         Z_ADDREF_P(expr_ptr);
    8983             :                 }
    8984             :         }
    8985             : 
    8986             :         if (IS_CV != IS_UNUSED) {
    8987             : 
    8988         140 :                 zval *offset = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
    8989             :                 zend_string *str;
    8990             :                 zend_ulong hval;
    8991             : 
    8992             : add_again:
    8993          71 :                 switch (Z_TYPE_P(offset)) {
    8994             :                         case IS_DOUBLE:
    8995           0 :                                 hval = zend_dval_to_lval(Z_DVAL_P(offset));
    8996           0 :                                 goto num_index;
    8997             :                         case IS_LONG:
    8998           4 :                                 hval = Z_LVAL_P(offset);
    8999             : num_index:
    9000           4 :                                 zend_hash_index_update(Z_ARRVAL_P(EX_VAR(opline->result.var)), hval, expr_ptr);
    9001           4 :                                 break;
    9002             :                         case IS_STRING:
    9003          56 :                                 str = Z_STR_P(offset);
    9004             :                                 if (IS_CV != IS_CONST) {
    9005         112 :                                         if (ZEND_HANDLE_NUMERIC(str, hval)) {
    9006           0 :                                                 goto num_index;
    9007             :                                         }
    9008             :                                 }
    9009             : str_index:
    9010          56 :                                 zend_hash_update(Z_ARRVAL_P(EX_VAR(opline->result.var)), str, expr_ptr);
    9011          56 :                                 break;
    9012             :                         case IS_NULL:
    9013           0 :                                 str = STR_EMPTY_ALLOC();
    9014           0 :                                 goto str_index;
    9015             :                         case IS_FALSE:
    9016           0 :                                 hval = 0;
    9017           0 :                                 goto num_index;
    9018             :                         case IS_TRUE:
    9019           0 :                                 hval = 1;
    9020           0 :                                 goto num_index;
    9021             :                         case IS_REFERENCE:
    9022           1 :                                 offset = Z_REFVAL_P(offset);
    9023           1 :                                 goto add_again;
    9024             :                                 break;
    9025             :                         default:
    9026          10 :                                 zend_error(E_WARNING, "Illegal offset type");
    9027             :                                 zval_ptr_dtor(expr_ptr);
    9028             :                                 /* do nothing */
    9029             :                                 break;
    9030             :                 }
    9031             : 
    9032             :         } else {
    9033             :                 zend_hash_next_index_insert(Z_ARRVAL_P(EX_VAR(opline->result.var)), expr_ptr);
    9034             :         }
    9035             :         CHECK_EXCEPTION();
    9036          70 :         ZEND_VM_NEXT_OPCODE();
    9037             : }
    9038             : 
    9039           6 : static int ZEND_FASTCALL  ZEND_INIT_ARRAY_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9040             : {
    9041             :         zval *array;
    9042             :         uint32_t size;
    9043           6 :         USE_OPLINE
    9044             : 
    9045           6 :         array = EX_VAR(opline->result.var);
    9046             :         if (IS_CONST != IS_UNUSED) {
    9047           6 :                 size = opline->extended_value >> ZEND_ARRAY_SIZE_SHIFT;
    9048             :         } else {
    9049             :                 size = 0;
    9050             :         }
    9051           6 :         ZVAL_NEW_ARR(array);
    9052           6 :         zend_hash_init(Z_ARRVAL_P(array), size, NULL, ZVAL_PTR_DTOR, 0);
    9053             : 
    9054             :         if (IS_CONST != IS_UNUSED) {
    9055             :                 /* Explicitly initialize array as not-packed if flag is set */
    9056           6 :                 if (opline->extended_value & ZEND_ARRAY_NOT_PACKED) {
    9057           0 :                         zend_hash_real_init(Z_ARRVAL_P(array), 0);
    9058             :                 }
    9059             :         }
    9060             : 
    9061           6 :         if (IS_CONST == IS_UNUSED) {
    9062             :                 ZEND_VM_NEXT_OPCODE();
    9063             : #if 0 || IS_CONST != IS_UNUSED
    9064             :         } else {
    9065           6 :                 return ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    9066             : #endif
    9067             :         }
    9068             : }
    9069             : 
    9070           0 : static int ZEND_FASTCALL  ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9071             : {
    9072           0 :         USE_OPLINE
    9073             : 
    9074             :         zval *container;
    9075             :         int result;
    9076             :         zend_ulong hval;
    9077             :         zval *offset;
    9078             : 
    9079             :         SAVE_OPLINE();
    9080           0 :         container = opline->op1.zv;
    9081           0 :         offset = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
    9082             : 
    9083           0 :         if (IS_CONST != IS_UNUSED && EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
    9084           0 :                 HashTable *ht = Z_ARRVAL_P(container);
    9085             :                 zval *value;
    9086             :                 zend_string *str;
    9087             : 
    9088             : isset_again:
    9089           0 :                 if (EXPECTED(Z_TYPE_P(offset) == IS_STRING)) {
    9090           0 :                         str = Z_STR_P(offset);
    9091             :                         if (IS_CV != IS_CONST) {
    9092           0 :                                 if (ZEND_HANDLE_NUMERIC(str, hval)) {
    9093           0 :                                         goto num_index_prop;
    9094             :                                 }
    9095             :                         }
    9096             : str_index_prop:
    9097           0 :                         value = zend_hash_find_ind(ht, str);
    9098           0 :                 } else if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
    9099           0 :                         hval = Z_LVAL_P(offset);
    9100             : num_index_prop:
    9101           0 :                         value = zend_hash_index_find(ht, hval);
    9102             :                 } else {
    9103           0 :                         switch (Z_TYPE_P(offset)) {
    9104             :                                 case IS_DOUBLE:
    9105           0 :                                         hval = zend_dval_to_lval(Z_DVAL_P(offset));
    9106           0 :                                         goto num_index_prop;
    9107             :                                 case IS_NULL:
    9108           0 :                                         str = STR_EMPTY_ALLOC();
    9109           0 :                                         goto str_index_prop;
    9110             :                                 case IS_FALSE:
    9111           0 :                                         hval = 0;
    9112           0 :                                         goto num_index_prop;
    9113             :                                 case IS_TRUE:
    9114           0 :                                         hval = 1;
    9115           0 :                                         goto num_index_prop;
    9116             :                                 case IS_RESOURCE:
    9117           0 :                                         hval = Z_RES_HANDLE_P(offset);
    9118           0 :                                         goto num_index_prop;
    9119             :                                 case IS_REFERENCE:
    9120           0 :                                         offset = Z_REFVAL_P(offset);
    9121           0 :                                         goto isset_again;
    9122             :                                 default:
    9123           0 :                                         zend_error(E_WARNING, "Illegal offset type in isset or empty");
    9124           0 :                                         value = NULL;
    9125             :                                         break;
    9126             :                         }
    9127             :                 }
    9128             : 
    9129           0 :                 if (opline->extended_value & ZEND_ISSET) {
    9130             :                         /* > IS_NULL means not IS_UNDEF and not IS_NULL */
    9131           0 :                         result = value != NULL && Z_TYPE_P(value) > IS_NULL &&
    9132           0 :                             (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
    9133             :                 } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
    9134           0 :                         result = (value == NULL || !i_zend_is_true(value TSRMLS_CC));
    9135             :                 }
    9136           0 :         } else if (IS_CONST == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
    9137           0 :                 if (EXPECTED(Z_OBJ_HT_P(container)->has_dimension)) {
    9138           0 :                         result = Z_OBJ_HT_P(container)->has_dimension(container, offset, (opline->extended_value & ZEND_ISSET) == 0 TSRMLS_CC);
    9139             :                 } else {
    9140           0 :                         zend_error(E_NOTICE, "Trying to check element of non-array");
    9141           0 :                         result = 0;
    9142             :                 }
    9143           0 :                 if ((opline->extended_value & ZEND_ISSET) == 0) {
    9144           0 :                         result = !result;
    9145             :                 }
    9146           0 :         } else if (EXPECTED(Z_TYPE_P(container) == IS_STRING)) { /* string offsets */
    9147             :                 zval tmp;
    9148             : 
    9149           0 :                 result = 0;
    9150           0 :                 if (UNEXPECTED(Z_TYPE_P(offset) != IS_LONG)) {
    9151           0 :                         if (IS_CONST == IS_CV || IS_CONST == IS_VAR) {
    9152             :                                 ZVAL_DEREF(offset);
    9153             :                         }
    9154           0 :                         if (Z_TYPE_P(offset) < IS_STRING /* simple scalar types */
    9155             :                                         || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */
    9156           0 :                                                 && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) {
    9157           0 :                                 ZVAL_DUP(&tmp, offset);
    9158           0 :                                 convert_to_long(&tmp);
    9159           0 :                                 offset = &tmp;
    9160             :                         }
    9161             :                 }
    9162           0 :                 if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
    9163           0 :                         if (offset->value.lval >= 0 && (size_t)offset->value.lval < Z_STRLEN_P(container)) {
    9164           0 :                                 if ((opline->extended_value & ZEND_ISSET) ||
    9165           0 :                                     Z_STRVAL_P(container)[offset->value.lval] != '0') {
    9166           0 :                                         result = 1;
    9167             :                                 }
    9168             :                         }
    9169             :                 }
    9170           0 :                 if ((opline->extended_value & ZEND_ISSET) == 0) {
    9171           0 :                         result = !result;
    9172             :                 }
    9173             :         } else {
    9174           0 :                 result = ((opline->extended_value & ZEND_ISSET) == 0);
    9175             :         }
    9176             : 
    9177           0 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    9178             : 
    9179             :         CHECK_EXCEPTION();
    9180           0 :         ZEND_VM_NEXT_OPCODE();
    9181             : }
    9182             : 
    9183           0 : static int ZEND_FASTCALL  ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9184             : {
    9185           0 :         USE_OPLINE
    9186             : 
    9187             :         zval *container;
    9188             :         int result;
    9189             :         zval *offset;
    9190             : 
    9191             :         SAVE_OPLINE();
    9192           0 :         container = opline->op1.zv;
    9193           0 :         offset = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
    9194             : 
    9195           0 :         if (IS_CONST == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
    9196           0 :                 if (EXPECTED(Z_OBJ_HT_P(container)->has_property)) {
    9197           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);
    9198             :                 } else {
    9199           0 :                         zend_error(E_NOTICE, "Trying to check property of non-object");
    9200           0 :                         result = 0;
    9201             :                 }
    9202           0 :                 if ((opline->extended_value & ZEND_ISSET) == 0) {
    9203           0 :                         result = !result;
    9204             :                 }
    9205             :         } else {
    9206           0 :                 result = ((opline->extended_value & ZEND_ISSET) == 0);
    9207             :         }
    9208             : 
    9209           0 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    9210             : 
    9211             :         CHECK_EXCEPTION();
    9212           0 :         ZEND_VM_NEXT_OPCODE();
    9213             : }
    9214             : 
    9215           0 : static int ZEND_FASTCALL  ZEND_YIELD_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9216             : {
    9217           0 :         USE_OPLINE
    9218             : 
    9219             :         /* The generator object is stored in EX(return_value) */
    9220           0 :         zend_generator *generator = (zend_generator *) EX(return_value);
    9221             : 
    9222           0 :         if (generator->flags & ZEND_GENERATOR_FORCED_CLOSE) {
    9223           0 :                 zend_error_noreturn(E_ERROR, "Cannot yield from finally in a force-closed generator");
    9224             :         }
    9225             : 
    9226             :         /* Destroy the previously yielded value */
    9227           0 :         zval_ptr_dtor(&generator->value);
    9228             : 
    9229             :         /* Destroy the previously yielded key */
    9230           0 :         zval_ptr_dtor(&generator->key);
    9231             : 
    9232             :         /* Set the new yielded value */
    9233             :         if (IS_CONST != IS_UNUSED) {
    9234             : 
    9235             : 
    9236           0 :                 if (EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE) {
    9237             :                         /* Constants and temporary variables aren't yieldable by reference,
    9238             :                          * but we still allow them with a notice. */
    9239             :                         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    9240             :                                 zval *value;
    9241             : 
    9242           0 :                                 zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    9243             : 
    9244           0 :                                 value = opline->op1.zv;
    9245           0 :                                 ZVAL_COPY_VALUE(&generator->value, value);
    9246           0 :                                 if (Z_OPT_REFCOUNTED(generator->value)) Z_SET_REFCOUNT(generator->value, 1);
    9247             : 
    9248             :                                 /* Temporary variables don't need ctor copying */
    9249             :                                 if (IS_CONST != IS_TMP_VAR) {
    9250           0 :                                         zval_opt_copy_ctor(&generator->value);
    9251             :                                 }
    9252             :                         } else {
    9253             :                                 zval *value_ptr = NULL;
    9254             : 
    9255             :                                 if (IS_CONST == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
    9256             :                                         zend_error_noreturn(E_ERROR, "Cannot yield string offsets by reference");
    9257             :                                 }
    9258             : 
    9259             :                                 /* If a function call result is yielded and the function did
    9260             :                                  * not return by reference we throw a notice. */
    9261             :                                 if (IS_CONST == IS_VAR &&
    9262             :                                     (value_ptr == &EG(uninitialized_zval) ||
    9263             :                                      (opline->extended_value == ZEND_RETURNS_FUNCTION &&
    9264             :                                       !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
    9265             :                                         zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    9266             :                                 } else {
    9267             :                                         ZVAL_MAKE_REF(value_ptr);
    9268             :                                 }
    9269             :                                 ZVAL_COPY(&generator->value, value_ptr);
    9270             : 
    9271             :                         }
    9272             :                 } else {
    9273           0 :                         zval *value = opline->op1.zv;
    9274             : 
    9275             :                         /* Consts, temporary variables and references need copying */
    9276             :                         if (IS_CONST == IS_CONST) {
    9277           0 :                                 ZVAL_DUP(&generator->value, value);
    9278             :                         } else if (IS_CONST == IS_TMP_VAR) {
    9279             :                                 ZVAL_COPY_VALUE(&generator->value, value);
    9280             :             } else if ((IS_CONST == IS_CV || IS_CONST == IS_VAR) && Z_ISREF_P(value)) {
    9281             :                                 ZVAL_DUP(&generator->value, Z_REFVAL_P(value));
    9282             : 
    9283             :                         } else {
    9284             :                                 ZVAL_COPY_VALUE(&generator->value, value);
    9285             :                                 if (IS_CONST == IS_CV) {
    9286             :                                         if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
    9287             :                                 }
    9288             :                         }
    9289             :                 }
    9290             :         } else {
    9291             :                 /* If no value was specified yield null */
    9292             :                 ZVAL_NULL(&generator->value);
    9293             :         }
    9294             : 
    9295             :         /* Set the new yielded key */
    9296             :         if (IS_CV != IS_UNUSED) {
    9297             : 
    9298           0 :                 zval *key = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
    9299             : 
    9300             :                 /* Consts, temporary variables and references need copying */
    9301           0 :                 if (IS_CV == IS_CONST) {
    9302             :                         ZVAL_DUP(&generator->key, key);
    9303           0 :                 } else if (IS_CV == IS_TMP_VAR) {
    9304             :                         ZVAL_COPY_VALUE(&generator->key, key);
    9305           0 :                 } else if ((IS_CV == IS_VAR || IS_CV == IS_CV) && Z_ISREF_P(key)) {
    9306           0 :                         ZVAL_DUP(&generator->key, Z_REFVAL_P(key));
    9307             : 
    9308             :                 } else {
    9309           0 :                         ZVAL_COPY_VALUE(&generator->key, key);
    9310             :                         if (IS_CV == IS_CV) {
    9311           0 :                                 if (Z_OPT_REFCOUNTED_P(key)) Z_ADDREF_P(key);
    9312             :                         }
    9313             :                 }
    9314             : 
    9315           0 :                 if (Z_TYPE(generator->key) == IS_LONG
    9316           0 :                     && Z_LVAL(generator->key) > generator->largest_used_integer_key
    9317             :                 ) {
    9318           0 :                         generator->largest_used_integer_key = Z_LVAL(generator->key);
    9319             :                 }
    9320             :         } else {
    9321             :                 /* If no key was specified we use auto-increment keys */
    9322             :                 generator->largest_used_integer_key++;
    9323             :                 ZVAL_LONG(&generator->key, generator->largest_used_integer_key);
    9324             :         }
    9325             : 
    9326           0 :         if (RETURN_VALUE_USED(opline)) {
    9327             :                 /* If the return value of yield is used set the send
    9328             :                  * target and initialize it to NULL */
    9329           0 :                 generator->send_target = EX_VAR(opline->result.var);
    9330           0 :                 ZVAL_NULL(generator->send_target);
    9331             :         } else {
    9332           0 :                 generator->send_target = NULL;
    9333             :         }
    9334             : 
    9335             :         /* We increment to the next op, so we are at the correct position when the
    9336             :          * generator is resumed. */
    9337           0 :         ZEND_VM_INC_OPCODE();
    9338             : 
    9339             :         /* The GOTO VM uses a local opline variable. We need to set the opline
    9340             :          * variable in execute_data so we don't resume at an old position. */
    9341             :         SAVE_OPLINE();
    9342             : 
    9343           0 :         ZEND_VM_RETURN();
    9344             : }
    9345             : 
    9346           1 : static int ZEND_FASTCALL  ZEND_POW_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9347             : {
    9348           1 :         USE_OPLINE
    9349             : 
    9350             : 
    9351             :         SAVE_OPLINE();
    9352           2 :         pow_function(EX_VAR(opline->result.var),
    9353             :                 opline->op1.zv,
    9354             :                 _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    9355             : 
    9356             : 
    9357             :         CHECK_EXCEPTION();
    9358           1 :         ZEND_VM_NEXT_OPCODE();
    9359             : }
    9360             : 
    9361           0 : static int ZEND_FASTCALL  ZEND_BW_NOT_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9362             : {
    9363           0 :         USE_OPLINE
    9364             :         zend_free_op free_op1;
    9365             : 
    9366             :         SAVE_OPLINE();
    9367           0 :         bitwise_not_function(EX_VAR(opline->result.var),
    9368             :                 _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC) TSRMLS_CC);
    9369           0 :         zval_ptr_dtor_nogc(free_op1.var);
    9370             :         CHECK_EXCEPTION();
    9371           0 :         ZEND_VM_NEXT_OPCODE();
    9372             : }
    9373             : 
    9374      229412 : static int ZEND_FASTCALL  ZEND_BOOL_NOT_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9375             : {
    9376      229412 :         USE_OPLINE
    9377             :         zend_free_op free_op1;
    9378             : 
    9379             :         SAVE_OPLINE();
    9380      458824 :         boolean_not_function(EX_VAR(opline->result.var),
    9381             :                 _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC) TSRMLS_CC);
    9382      229412 :         zval_ptr_dtor_nogc(free_op1.var);
    9383             :         CHECK_EXCEPTION();
    9384      229412 :         ZEND_VM_NEXT_OPCODE();
    9385             : }
    9386             : 
    9387      101526 : static int ZEND_FASTCALL  ZEND_ECHO_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9388             : {
    9389      101526 :         USE_OPLINE
    9390             :         zend_free_op free_op1;
    9391             :         zval *z;
    9392             : 
    9393             :         SAVE_OPLINE();
    9394      203052 :         z = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
    9395             : 
    9396      101526 :         zend_print_variable(z TSRMLS_CC);
    9397             : 
    9398      101526 :         zval_ptr_dtor_nogc(free_op1.var);
    9399             :         CHECK_EXCEPTION();
    9400      101526 :         ZEND_VM_NEXT_OPCODE();
    9401             : }
    9402             : 
    9403        8128 : static int ZEND_FASTCALL  ZEND_PRINT_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9404             : {
    9405        8128 :         USE_OPLINE
    9406             : 
    9407        8128 :         ZVAL_LONG(EX_VAR(opline->result.var), 1);
    9408        8128 :         return ZEND_ECHO_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    9409             : }
    9410             : 
    9411    19099271 : static int ZEND_FASTCALL  ZEND_JMPZ_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9412             : {
    9413    19099271 :         USE_OPLINE
    9414             :         zend_free_op free_op1;
    9415             :         zval *val;
    9416             : 
    9417             :         SAVE_OPLINE();
    9418    38198542 :         val = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
    9419             : 
    9420             :         if (IS_TMP_VAR == IS_TMP_VAR) {
    9421    19099271 :                 if (Z_TYPE_P(val) == IS_TRUE) {
    9422     8638180 :                         ZEND_VM_SET_OPCODE(opline + 1);
    9423     8638180 :                         ZEND_VM_CONTINUE();
    9424    10461091 :                 } else if (EXPECTED(Z_TYPE_P(val) <= IS_TRUE)) {
    9425    10448395 :                         ZEND_VM_SET_OPCODE(opline->op2.jmp_addr);
    9426    10448395 :                         ZEND_VM_CONTINUE();
    9427             :                 }
    9428             :         }
    9429             : 
    9430       12696 :         if (i_zend_is_true(val TSRMLS_CC)) {
    9431       12443 :                 opline++;
    9432             :         } else {
    9433         253 :                 opline = opline->op2.jmp_addr;
    9434             :         }
    9435       12696 :         zval_ptr_dtor_nogc(free_op1.var);
    9436       12696 :         if (UNEXPECTED(EG(exception) != NULL)) {
    9437           0 :                 HANDLE_EXCEPTION();
    9438             :         }
    9439       12696 :         ZEND_VM_JMP(opline);
    9440             : }
    9441             : 
    9442      100809 : static int ZEND_FASTCALL  ZEND_JMPNZ_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9443             : {
    9444      100809 :         USE_OPLINE
    9445             :         zend_free_op free_op1;
    9446             :         zval *val;
    9447             : 
    9448             :         SAVE_OPLINE();
    9449      201618 :         val = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
    9450             : 
    9451             :         if (IS_TMP_VAR == IS_TMP_VAR) {
    9452      100809 :                 if (Z_TYPE_P(val) == IS_TRUE) {
    9453       98512 :                         ZEND_VM_SET_OPCODE(opline->op2.jmp_addr);
    9454       98512 :                         ZEND_VM_CONTINUE();
    9455        2297 :                 } else if (EXPECTED(Z_TYPE_P(val) <= IS_TRUE)) {
    9456        2297 :                         ZEND_VM_SET_OPCODE(opline + 1);
    9457        2297 :                         ZEND_VM_CONTINUE();
    9458             :                 }
    9459             :         }
    9460             : 
    9461           0 :         if (i_zend_is_true(val TSRMLS_CC)) {
    9462           0 :                 opline = opline->op2.jmp_addr;
    9463             :         } else {
    9464           0 :                 opline++;
    9465             :         }
    9466           0 :         zval_ptr_dtor_nogc(free_op1.var);
    9467           0 :         if (UNEXPECTED(EG(exception) != NULL)) {
    9468           0 :                 HANDLE_EXCEPTION();
    9469             :         }
    9470           0 :         ZEND_VM_JMP(opline);
    9471             : }
    9472             : 
    9473           0 : static int ZEND_FASTCALL  ZEND_JMPZNZ_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9474             : {
    9475           0 :         USE_OPLINE
    9476             :         zend_free_op free_op1;
    9477             :         zval *val;
    9478             : 
    9479             :         SAVE_OPLINE();
    9480           0 :         val = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
    9481             : 
    9482             :         if (IS_TMP_VAR == IS_TMP_VAR) {
    9483           0 :                 if (EXPECTED(Z_TYPE_P(val) == IS_TRUE)) {
    9484           0 :                         ZEND_VM_SET_RELATIVE_OPCODE(opline, opline->extended_value);
    9485           0 :                         ZEND_VM_CONTINUE();
    9486           0 :                 } else if (EXPECTED(Z_TYPE_P(val) <= IS_TRUE)) {
    9487           0 :                         ZEND_VM_SET_OPCODE(opline->op2.jmp_addr);
    9488           0 :                         ZEND_VM_CONTINUE();
    9489             :                 }
    9490             :         }
    9491             : 
    9492           0 :         if (i_zend_is_true(val TSRMLS_CC)) {
    9493           0 :                 opline = (zend_op*)(((char*)opline) + opline->extended_value);
    9494             :         } else {
    9495           0 :                 opline = opline->op2.jmp_addr;
    9496             :         }
    9497           0 :         zval_ptr_dtor_nogc(free_op1.var);
    9498           0 :         if (UNEXPECTED(EG(exception) != NULL)) {
    9499           0 :                 HANDLE_EXCEPTION();
    9500             :         }
    9501           0 :         ZEND_VM_JMP(opline);
    9502             : }
    9503             : 
    9504     2378843 : static int ZEND_FASTCALL  ZEND_JMPZ_EX_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9505             : {
    9506     2378843 :         USE_OPLINE
    9507             :         zend_free_op free_op1;
    9508             :         zval *val;
    9509             : 
    9510             :         SAVE_OPLINE();
    9511     4757686 :         val = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
    9512             : 
    9513             :         if (IS_TMP_VAR == IS_TMP_VAR) {
    9514     2378843 :                 if (Z_TYPE_P(val) == IS_TRUE) {
    9515     1356074 :                         ZVAL_TRUE(EX_VAR(opline->result.var));
    9516     1356074 :                         ZEND_VM_SET_OPCODE(opline + 1);
    9517     1356074 :                         ZEND_VM_CONTINUE();
    9518     1022769 :                 } else if (EXPECTED(Z_TYPE_P(val) <= IS_TRUE)) {
    9519     1022759 :                         ZVAL_FALSE(EX_VAR(opline->result.var));
    9520     1022759 :                         ZEND_VM_SET_OPCODE(opline->op2.jmp_addr);
    9521     1022759 :                         ZEND_VM_CONTINUE();
    9522             :                 }
    9523             :         }
    9524             : 
    9525          10 :         if (i_zend_is_true(val TSRMLS_CC)) {
    9526           8 :                 zval_ptr_dtor_nogc(free_op1.var);
    9527           8 :                 ZVAL_TRUE(EX_VAR(opline->result.var));
    9528           8 :                 opline++;
    9529             :         } else {
    9530           2 :                 zval_ptr_dtor_nogc(free_op1.var);
    9531           2 :                 ZVAL_FALSE(EX_VAR(opline->result.var));
    9532           2 :                 opline = opline->op2.jmp_addr;
    9533             :         }
    9534          10 :         if (UNEXPECTED(EG(exception) != NULL)) {
    9535           0 :                 HANDLE_EXCEPTION();
    9536             :         }
    9537          10 :         ZEND_VM_JMP(opline);
    9538             : }
    9539             : 
    9540      433967 : static int ZEND_FASTCALL  ZEND_JMPNZ_EX_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9541             : {
    9542      433967 :         USE_OPLINE
    9543             :         zend_free_op free_op1;
    9544             :         zval *val;
    9545             : 
    9546             :         SAVE_OPLINE();
    9547      867934 :         val = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
    9548             : 
    9549             :         if (IS_TMP_VAR == IS_TMP_VAR) {
    9550      433967 :                 if (Z_TYPE_P(val) == IS_TRUE) {
    9551       52764 :                         ZVAL_TRUE(EX_VAR(opline->result.var));
    9552       52764 :                         ZEND_VM_SET_OPCODE(opline->op2.jmp_addr);
    9553       52764 :                         ZEND_VM_CONTINUE();
    9554      381203 :                 } else if (EXPECTED(Z_TYPE_P(val) <= IS_TRUE)) {
    9555      381203 :                         ZVAL_FALSE(EX_VAR(opline->result.var));
    9556      381203 :                         ZEND_VM_SET_OPCODE(opline + 1);
    9557      381203 :                         ZEND_VM_CONTINUE();
    9558             :                 }
    9559             :         }
    9560           0 :         if (i_zend_is_true(val TSRMLS_CC)) {
    9561           0 :                 ZVAL_TRUE(EX_VAR(opline->result.var));
    9562           0 :                 opline = opline->op2.jmp_addr;
    9563             :         } else {
    9564           0 :                 ZVAL_FALSE(EX_VAR(opline->result.var));
    9565           0 :                 opline++;
    9566             :         }
    9567           0 :         zval_ptr_dtor_nogc(free_op1.var);
    9568           0 :         if (UNEXPECTED(EG(exception) != NULL)) {
    9569           0 :                 HANDLE_EXCEPTION();
    9570             :         }
    9571           0 :         ZEND_VM_JMP(opline);
    9572             : }
    9573             : 
    9574     4806183 : static int ZEND_FASTCALL  ZEND_FREE_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9575             : {
    9576     4806183 :         USE_OPLINE
    9577             : 
    9578             :         SAVE_OPLINE();
    9579     4806183 :         zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
    9580             :         CHECK_EXCEPTION();
    9581     4806183 :         ZEND_VM_NEXT_OPCODE();
    9582             : }
    9583             : 
    9584      214092 : static int ZEND_FASTCALL  ZEND_RETURN_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9585             : {
    9586      214092 :         USE_OPLINE
    9587             :         zval *retval_ptr;
    9588             :         zend_free_op free_op1;
    9589             : 
    9590             :         SAVE_OPLINE();
    9591      428184 :         retval_ptr = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
    9592             : 
    9593      214092 :         if (!EX(return_value)) {
    9594         323 :                 zval_ptr_dtor_nogc(free_op1.var);
    9595             :         } else {
    9596             :                 if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR) {
    9597      213769 :                         ZVAL_COPY_VALUE(EX(return_value), retval_ptr);
    9598      213769 :                         if (IS_TMP_VAR == IS_CONST) {
    9599             :                                 if (UNEXPECTED(Z_OPT_COPYABLE_P(EX(return_value)))) {
    9600             :                                         zval_copy_ctor_func(EX(return_value));
    9601             :                                 }
    9602             :                         }
    9603             :                 } else if ((IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) && Z_ISREF_P(retval_ptr)) {
    9604             :                         ZVAL_COPY(EX(return_value), Z_REFVAL_P(retval_ptr));
    9605             : 
    9606             :                 } else {
    9607             :                         ZVAL_COPY_VALUE(EX(return_value), retval_ptr);
    9608             :                         if (IS_TMP_VAR == IS_CV) {
    9609             :                                 if (Z_OPT_REFCOUNTED_P(retval_ptr)) Z_ADDREF_P(retval_ptr);
    9610             :                         }
    9611             :                 }
    9612             :         }
    9613      214092 :         return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    9614             : }
    9615             : 
    9616           0 : static int ZEND_FASTCALL  ZEND_RETURN_BY_REF_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9617             : {
    9618           0 :         USE_OPLINE
    9619             :         zval *retval_ptr;
    9620             :         zend_free_op free_op1;
    9621             : 
    9622             :         SAVE_OPLINE();
    9623             : 
    9624             :         do {
    9625             :                 if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR ||
    9626             :                     (IS_TMP_VAR == IS_VAR && opline->extended_value == ZEND_RETURNS_VALUE)) {
    9627             :                         /* Not supposed to happen, but we'll allow it */
    9628           0 :                         zend_error(E_NOTICE, "Only variable references should be returned by reference");
    9629             : 
    9630           0 :                         retval_ptr = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
    9631           0 :                         if (!EX(return_value)) {
    9632             :                                 if (IS_TMP_VAR == IS_TMP_VAR) {
    9633           0 :                                         zval_ptr_dtor_nogc(free_op1.var);
    9634             :                                 }
    9635             :                         } else {
    9636           0 :                                 ZVAL_COPY_VALUE(EX(return_value), retval_ptr);
    9637           0 :                                 Z_VAR_FLAGS_P(EX(return_value)) = IS_VAR_RET_REF;
    9638           0 :                                 if (IS_TMP_VAR != IS_TMP_VAR) {
    9639             :                                         zval_opt_copy_ctor_no_imm(EX(return_value));
    9640             :                                 }
    9641             :                         }
    9642           0 :                         break;
    9643             :                 }
    9644             : 
    9645             :                 retval_ptr = NULL;
    9646             : 
    9647             :                 if (IS_TMP_VAR == IS_VAR && UNEXPECTED(retval_ptr == NULL)) {
    9648             :                         zend_error_noreturn(E_ERROR, "Cannot return string offsets by reference");
    9649             :                 }
    9650             : 
    9651             :                 if (IS_TMP_VAR == IS_VAR) {
    9652             :                         if (retval_ptr == &EG(uninitialized_zval) ||
    9653             :                             (opline->extended_value == ZEND_RETURNS_FUNCTION &&
    9654             :                              !(Z_VAR_FLAGS_P(retval_ptr) & IS_VAR_RET_REF))) {
    9655             :                                 zend_error(E_NOTICE, "Only variable references should be returned by reference");
    9656             :                                 if (EX(return_value)) {
    9657             :                                         ZVAL_NEW_REF(EX(return_value), retval_ptr);
    9658             :                                         Z_VAR_FLAGS_P(EX(return_value)) = IS_VAR_RET_REF;
    9659             :                                         if (Z_REFCOUNTED_P(retval_ptr)) Z_ADDREF_P(retval_ptr);
    9660             :                                 }
    9661             :                                 break;
    9662             :                         }
    9663             :                 }
    9664             : 
    9665             :                 if (EX(return_value)) {
    9666             :                         ZVAL_MAKE_REF(retval_ptr);
    9667             :                         Z_ADDREF_P(retval_ptr);
    9668             :                         ZVAL_REF(EX(return_value), Z_REF_P(retval_ptr));
    9669             :                         Z_VAR_FLAGS_P(EX(return_value)) = IS_VAR_RET_REF;
    9670             :                 }
    9671             :         } while (0);
    9672             : 
    9673           0 :         return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    9674             : }
    9675             : 
    9676           0 : static int ZEND_FASTCALL  ZEND_THROW_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9677             : {
    9678           0 :         USE_OPLINE
    9679             :         zval *value;
    9680             :         zend_free_op free_op1;
    9681             : 
    9682             :         SAVE_OPLINE();
    9683           0 :         value = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
    9684             : 
    9685           0 :         if (IS_TMP_VAR == IS_CONST || UNEXPECTED(Z_TYPE_P(value) != IS_OBJECT)) {
    9686           0 :                 if (UNEXPECTED(EG(exception) != NULL)) {
    9687           0 :                         HANDLE_EXCEPTION();
    9688             :                 }
    9689           0 :                 zend_error_noreturn(E_ERROR, "Can only throw objects");
    9690             :         }
    9691             : 
    9692           0 :         zend_exception_save(TSRMLS_C);
    9693           0 :         if (IS_TMP_VAR != IS_TMP_VAR) {
    9694             :                 if (Z_REFCOUNTED_P(value)) Z_ADDREF_P(value);
    9695             :         }
    9696             : 
    9697           0 :         zend_throw_exception_object(value TSRMLS_CC);
    9698           0 :         zend_exception_restore(TSRMLS_C);
    9699             : 
    9700           0 :         HANDLE_EXCEPTION();
    9701             : }
    9702             : 
    9703     1557663 : static int ZEND_FASTCALL  ZEND_SEND_VAL_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9704             : {
    9705     1557663 :         USE_OPLINE
    9706             :         zval *value, *arg;
    9707             :         zend_free_op free_op1;
    9708             : 
    9709             :         SAVE_OPLINE();
    9710     3115326 :         value = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
    9711     1557663 :         arg = ZEND_CALL_ARG(EX(call), opline->op2.num);
    9712     1557663 :         EX(call)->num_args = opline->op2.num;
    9713     1557663 :         ZVAL_COPY_VALUE(arg, value);
    9714     1557663 :         if (IS_TMP_VAR == IS_CONST) {
    9715             :                 if (UNEXPECTED(Z_OPT_COPYABLE_P(arg))) {
    9716             :                         zval_copy_ctor_func(arg);
    9717             :                 }
    9718             :         }
    9719     1557663 :         ZEND_VM_NEXT_OPCODE();
    9720             : }
    9721             : 
    9722       29709 : static int ZEND_FASTCALL  ZEND_SEND_VAL_EX_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9723             : {
    9724       29709 :         USE_OPLINE
    9725             :         zval *value, *arg;
    9726             :         zend_free_op free_op1;
    9727             : 
    9728             :         SAVE_OPLINE();
    9729       59418 :         if (ARG_MUST_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
    9730           0 :                 zend_error_noreturn(E_ERROR, "Cannot pass parameter %d by reference", opline->op2.num);
    9731             :         }
    9732       59418 :         value = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
    9733       29709 :         arg = ZEND_CALL_ARG(EX(call), opline->op2.num);
    9734       29709 :         EX(call)->num_args = opline->op2.num;
    9735       29709 :         ZVAL_COPY_VALUE(arg, value);
    9736       29709 :         if (IS_TMP_VAR == IS_CONST) {
    9737             :                 if (UNEXPECTED(Z_OPT_COPYABLE_P(arg))) {
    9738             :                         zval_copy_ctor_func(arg);
    9739             :                 }
    9740             :         }
    9741       29709 :         ZEND_VM_NEXT_OPCODE();
    9742             : }
    9743             : 
    9744     1370077 : static int ZEND_FASTCALL  ZEND_BOOL_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9745             : {
    9746     1370077 :         USE_OPLINE
    9747             :         zend_free_op free_op1;
    9748     1370077 :         zval *retval = EX_VAR(opline->result.var);
    9749             : 
    9750             :         SAVE_OPLINE();
    9751             :         /* PHP 3.0 returned "" for false and 1 for true, here we use 0 and 1 for now */
    9752     2740154 :         ZVAL_BOOL(retval, i_zend_is_true(_get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC) TSRMLS_CC));
    9753     1370077 :         zval_ptr_dtor_nogc(free_op1.var);
    9754             : 
    9755             :         CHECK_EXCEPTION();
    9756     1370077 :         ZEND_VM_NEXT_OPCODE();
    9757             : }
    9758             : 
    9759           0 : static int ZEND_FASTCALL  ZEND_CLONE_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9760             : {
    9761           0 :         USE_OPLINE
    9762             :         zend_free_op free_op1;
    9763             :         zval *obj;
    9764             :         zend_class_entry *ce;
    9765             :         zend_function *clone;
    9766             :         zend_object_clone_obj_t clone_call;
    9767             : 
    9768             :         SAVE_OPLINE();
    9769           0 :         obj = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
    9770             : 
    9771           0 :         if (IS_TMP_VAR == IS_CONST ||
    9772             :             (IS_TMP_VAR != IS_UNUSED && UNEXPECTED(Z_TYPE_P(obj) != IS_OBJECT))) {
    9773           0 :                 if (UNEXPECTED(EG(exception) != NULL)) {
    9774           0 :                         HANDLE_EXCEPTION();
    9775             :                 }
    9776           0 :                 zend_error_noreturn(E_ERROR, "__clone method called on non-object");
    9777             :         }
    9778             : 
    9779           0 :         ce = Z_OBJCE_P(obj);
    9780           0 :         clone = ce ? ce->clone : NULL;
    9781           0 :         clone_call =  Z_OBJ_HT_P(obj)->clone_obj;
    9782           0 :         if (UNEXPECTED(clone_call == NULL)) {
    9783           0 :                 if (ce) {
    9784           0 :                         zend_error_noreturn(E_ERROR, "Trying to clone an uncloneable object of class %s", ce->name->val);
    9785             :                 } else {
    9786           0 :                         zend_error_noreturn(E_ERROR, "Trying to clone an uncloneable object");
    9787             :                 }
    9788             :         }
    9789             : 
    9790           0 :         if (ce && clone) {
    9791           0 :                 if (clone->op_array.fn_flags & ZEND_ACC_PRIVATE) {
    9792             :                         /* Ensure that if we're calling a private function, we're allowed to do so.
    9793             :                          */
    9794           0 :                         if (UNEXPECTED(ce != EX(scope))) {
    9795           0 :                                 zend_error_noreturn(E_ERROR, "Call to private %s::__clone() from context '%s'", ce->name->val, EX(scope) ? EX(scope)->name->val : "");
    9796             :                         }
    9797           0 :                 } else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) {
    9798             :                         /* Ensure that if we're calling a protected function, we're allowed to do so.
    9799             :                          */
    9800           0 :                         if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(clone), EX(scope)))) {
    9801           0 :                                 zend_error_noreturn(E_ERROR, "Call to protected %s::__clone() from context '%s'", ce->name->val, EX(scope) ? EX(scope)->name->val : "");
    9802             :                         }
    9803             :                 }
    9804             :