1--TEST-- 2str_decrement(): Out of Range ValueErrors for strings that cannot be decremented 3--FILE-- 4<?php 5 6$strings = [ 7 "", 8 "0", 9 "a", 10 "A", 11 "00", 12 "0a", 13 "0A", 14]; 15 16foreach ($strings as $s) { 17 try { 18 var_dump(str_decrement($s)); 19 } catch (ValueError $e) { 20 echo $e->getMessage(), PHP_EOL; 21 } 22} 23 24?> 25--EXPECT-- 26str_decrement(): Argument #1 ($string) must not be empty 27str_decrement(): Argument #1 ($string) "0" is out of decrement range 28str_decrement(): Argument #1 ($string) "a" is out of decrement range 29str_decrement(): Argument #1 ($string) "A" is out of decrement range 30str_decrement(): Argument #1 ($string) "00" is out of decrement range 31str_decrement(): Argument #1 ($string) "0a" is out of decrement range 32str_decrement(): Argument #1 ($string) "0A" is out of decrement range 33