1--TEST-- 2TypeError for compound assignment operations 3--FILE-- 4<?php 5 6$x = []; 7try { 8 $x += "1"; 9} catch (TypeError $e) { 10 echo $e->getMessage(), "\n"; 11} 12try { 13 $x -= "1"; 14} catch (TypeError $e) { 15 echo $e->getMessage(), "\n"; 16} 17try { 18 $x *= "1"; 19} catch (TypeError $e) { 20 echo $e->getMessage(), "\n"; 21} 22try { 23 $x /= "1"; 24} catch (TypeError $e) { 25 echo $e->getMessage(), "\n"; 26} 27try { 28 $x **= "1"; 29} catch (TypeError $e) { 30 echo $e->getMessage(), "\n"; 31} 32try { 33 $x %= "1"; 34} catch (TypeError $e) { 35 echo $e->getMessage(), "\n"; 36} 37try { 38 $x <<= "1"; 39} catch (TypeError $e) { 40 echo $e->getMessage(), "\n"; 41} 42try { 43 $x >>= "1"; 44} catch (TypeError $e) { 45 echo $e->getMessage(), "\n"; 46} 47 48?> 49--EXPECT-- 50Unsupported operand types: array + string 51Unsupported operand types: array - string 52Unsupported operand types: array * string 53Unsupported operand types: array / string 54Unsupported operand types: array ** string 55Unsupported operand types: array % string 56Unsupported operand types: array << string 57Unsupported operand types: array >> string 58