1--TEST-- 2Undef to exception for assign dim offset 3--INI-- 4opcache.enable=1 5opcache.enable_cli=1 6opcache.file_update_protection=0 7--FILE-- 8<?php 9set_error_handler(function($_, $m){ 10 throw new Exception($m); 11}); 12function test1() { 13 $a = []; 14 $res = $a[$undef] = null; 15} 16function test2() { 17 $a = []; 18 $res = $a[$undef] += 1; 19} 20function test3() { 21 $a = []; 22 $res = isset($a[$undef]); 23} 24try { 25 test1(); 26} catch (Exception $e) { 27 echo $e->getMessage(), "\n"; 28} 29try { 30 test2(); 31} catch (Exception $e) { 32 echo $e->getMessage(), "\n"; 33} 34?> 35--EXPECT-- 36Undefined variable $undef 37Undefined variable $undef 38