File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ --TEST--
2+ JIT ASSIGN_OBJ: violation of dominance
3+ --INI--
4+ opcache.enable=1
5+ opcache.enable_cli=1
6+ opcache.file_update_protection=0
7+ opcache.jit_buffer_size=1M
8+ --FILE--
9+ <?php 
10+ class  CacheItem {
11+     protected  mixed  $ value  = null ;
12+ }
13+ 
14+ function  test ($ value ) {
15+     $ test  = Closure::bind (
16+         static  function  ($ value ) {
17+             $ item  = new  CacheItem ();
18+             if  (\is_array ($ value ) && \array_key_exists ('value ' , $ value )) {
19+                 $ item ->value  = $ value ['value ' ];
20+             }
21+             return  $ item ;
22+         },
23+         null ,
24+         CacheItem::class);
25+     return  $ test ($ value );
26+ }
27+ 
28+ $ values  = [['value ' =>'str ' ], ['value ' =>'str ' ], ['value ' =>42 ]];
29+ $ n  = count ($ values );
30+ 
31+ for  ($ i  = 0 ; $ i  < $ n ; $ i ++) {
32+    test ($ values [$ i ]);
33+ }
34+ ?> 
35+ OK
36+ --EXPECT--
37+ OK
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments