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