1--TEST-- 2Invalid numeric string TypeErrors and E_WARNINGs 3--FILE-- 4<?php 5 6var_dump("2 Lorem" + "3 ipsum"); 7try { 8 var_dump("dolor" + "sit"); 9} catch (\TypeError $e) { 10 echo $e->getMessage() . \PHP_EOL; 11} 12echo "---", PHP_EOL; 13var_dump("5 amet," - "7 consectetur"); 14try { 15 var_dump("adipiscing" - "elit,"); 16} catch (\TypeError $e) { 17 echo $e->getMessage() . \PHP_EOL; 18} 19echo "---", PHP_EOL; 20var_dump("11 sed" * "13 do"); 21try { 22 var_dump("eiusmod" * "tempor"); 23} catch (\TypeError $e) { 24 echo $e->getMessage() . \PHP_EOL; 25} 26echo "---", PHP_EOL; 27var_dump("17 incididunt" / "19 ut"); 28try { 29 var_dump("labore" / "et"); 30} catch (\TypeError $e) { 31 echo $e->getMessage() . \PHP_EOL; 32} 33echo "---", PHP_EOL; 34var_dump("23 dolore" ** "29 magna"); 35try { 36 var_dump("aliqua." ** "Ut"); 37} catch (\TypeError $e) { 38 echo $e->getMessage() . \PHP_EOL; 39} 40echo "---", PHP_EOL; 41var_dump("31 enim" % "37 ad"); 42try { 43 var_dump("minim" % "veniam,"); 44} catch (\TypeError $e) { 45 echo get_class($e) . ': ' . $e->getMessage() . \PHP_EOL; 46} 47echo "---", PHP_EOL; 48var_dump("41 minim" << "43 veniam,"); 49try { 50 var_dump("quis" << "nostrud"); 51} catch (\TypeError $e) { 52 echo $e->getMessage() . \PHP_EOL; 53} 54echo "---", PHP_EOL; 55var_dump("47 exercitation" >> "53 ullamco"); 56try { 57 var_dump("laboris" >> "nisi"); 58} catch (\TypeError $e) { 59 echo $e->getMessage() . \PHP_EOL; 60} 61echo "---", PHP_EOL; 62var_dump("59 ut" | 61); 63var_dump(67 | "71 aliquip"); 64try { 65 var_dump("ex" | 73); 66} catch (\TypeError $e) { 67 echo $e->getMessage() . \PHP_EOL; 68} 69try { 70 var_dump(79 | "ea"); 71} catch (\TypeError $e) { 72 echo $e->getMessage() . \PHP_EOL; 73} 74echo "---", PHP_EOL; 75var_dump("83 commodo" & 89); 76var_dump(97 & "101 consequat."); 77try { 78 var_dump("Duis" & 103); 79} catch (\TypeError $e) { 80 echo $e->getMessage() . \PHP_EOL; 81} 82try { 83 var_dump(107 & "aute"); 84} catch (\TypeError $e) { 85 echo $e->getMessage() . \PHP_EOL; 86} 87echo "---", PHP_EOL; 88var_dump("109 irure" ^ 113); 89var_dump(127 ^ "131 dolor"); 90try { 91 var_dump("in" ^ 137); 92} catch (\TypeError $e) { 93 echo $e->getMessage() . \PHP_EOL; 94} 95try { 96 var_dump(139 ^ "reprehenderit"); 97} catch (\TypeError $e) { 98 echo $e->getMessage() . \PHP_EOL; 99} 100echo "---", PHP_EOL; 101var_dump(+"149 in"); 102try { 103 var_dump(+"voluptate"); 104} catch (\TypeError $e) { 105 echo $e->getMessage() . \PHP_EOL; 106} 107echo "---", PHP_EOL; 108var_dump(-"151 velit"); 109try { 110 var_dump(-"esse"); 111} catch (\TypeError $e) { 112 echo $e->getMessage() . \PHP_EOL; 113} 114?> 115--EXPECTF-- 116Warning: A non-numeric value encountered in %s on line %d 117 118Warning: A non-numeric value encountered in %s on line %d 119int(5) 120Unsupported operand types: string + string 121--- 122 123Warning: A non-numeric value encountered in %s on line %d 124 125Warning: A non-numeric value encountered in %s on line %d 126int(-2) 127Unsupported operand types: string - string 128--- 129 130Warning: A non-numeric value encountered in %s on line %d 131 132Warning: A non-numeric value encountered in %s on line %d 133int(143) 134Unsupported operand types: string * string 135--- 136 137Warning: A non-numeric value encountered in %s on line %d 138 139Warning: A non-numeric value encountered in %s on line %d 140float(0.8947368421052632) 141Unsupported operand types: string / string 142--- 143 144Warning: A non-numeric value encountered in %s on line %d 145 146Warning: A non-numeric value encountered in %s on line %d 147float(3.0910586430935376E+39) 148Unsupported operand types: string ** string 149--- 150 151Warning: A non-numeric value encountered in %s on line %d 152 153Warning: A non-numeric value encountered in %s on line %d 154int(31) 155TypeError: Unsupported operand types: string % string 156--- 157 158Warning: A non-numeric value encountered in %s on line %d 159 160Warning: A non-numeric value encountered in %s on line %d 161int(%d) 162Unsupported operand types: string << string 163--- 164 165Warning: A non-numeric value encountered in %s on line %d 166 167Warning: A non-numeric value encountered in %s on line %d 168int(0) 169Unsupported operand types: string >> string 170--- 171 172Warning: A non-numeric value encountered in %s on line %d 173int(63) 174 175Warning: A non-numeric value encountered in %s on line %d 176int(71) 177Unsupported operand types: string | int 178Unsupported operand types: int | string 179--- 180 181Warning: A non-numeric value encountered in %s on line %d 182int(81) 183 184Warning: A non-numeric value encountered in %s on line %d 185int(97) 186Unsupported operand types: string & int 187Unsupported operand types: int & string 188--- 189 190Warning: A non-numeric value encountered in %s on line %d 191int(28) 192 193Warning: A non-numeric value encountered in %s on line %d 194int(252) 195Unsupported operand types: string ^ int 196Unsupported operand types: int ^ string 197--- 198 199Warning: A non-numeric value encountered in %s on line %d 200int(149) 201Unsupported operand types: string * int 202--- 203 204Warning: A non-numeric value encountered in %s on line %d 205int(-151) 206Unsupported operand types: string * int 207