1--TEST-- 2GMP operator overloading does not support non-numeric strings 3--EXTENSIONS-- 4gmp 5--FILE-- 6<?php 7 8$num = gmp_init(42); 9 10try { 11 var_dump($num + "string"); 12} catch (Throwable $e) { 13 echo $e::class, ': ', $e->getMessage(), PHP_EOL; 14} 15 16try { 17 var_dump($num - "string"); 18} catch (Throwable $e) { 19 echo $e::class, ': ', $e->getMessage(), PHP_EOL; 20} 21 22try { 23 var_dump($num * "string"); 24} catch (Throwable $e) { 25 echo $e::class, ': ', $e->getMessage(), PHP_EOL; 26} 27 28try { 29 var_dump($num / "string"); 30} catch (Throwable $e) { 31 echo $e::class, ': ', $e->getMessage(), PHP_EOL; 32} 33 34try { 35 var_dump($num % "string"); 36} catch (Throwable $e) { 37 echo $e::class, ': ', $e->getMessage(), PHP_EOL; 38} 39 40try { 41 var_dump($num ** "string"); 42} catch (Throwable $e) { 43 echo $e::class, ': ', $e->getMessage(), PHP_EOL; 44} 45 46try { 47 var_dump($num | "string"); 48} catch (Throwable $e) { 49 echo $e::class, ': ', $e->getMessage(), PHP_EOL; 50} 51try { 52 var_dump($num & "string"); 53} catch (Throwable $e) { 54 echo $e::class, ': ', $e->getMessage(), PHP_EOL; 55} 56try { 57 var_dump($num ^ "string"); 58} catch (Throwable $e) { 59 echo $e::class, ': ', $e->getMessage(), PHP_EOL; 60} 61try { 62 var_dump($num << "string"); 63} catch (Throwable $e) { 64 echo $e::class, ': ', $e->getMessage(), PHP_EOL; 65} 66try { 67 var_dump($num >> "string"); 68} catch (Throwable $e) { 69 echo $e::class, ': ', $e->getMessage(), PHP_EOL; 70} 71 72?> 73--EXPECT-- 74ValueError: Number is not an integer string 75ValueError: Number is not an integer string 76ValueError: Number is not an integer string 77ValueError: Number is not an integer string 78ValueError: Number is not an integer string 79ValueError: Number is not an integer string 80ValueError: Number is not an integer string 81ValueError: Number is not an integer string 82ValueError: Number is not an integer string 83ValueError: Number is not an integer string 84ValueError: Number is not an integer string 85