1--TEST-- 2Test strncmp() function : error conditions 3--FILE-- 4<?php 5/* Test strncmp() function with more/less number of args and invalid args */ 6 7echo "*** Testing strncmp() function: error conditions ***\n"; 8$str1 = 'string_val'; 9$str2 = 'string_val'; 10 11/* Invalid argument for $len */ 12$len = -10; 13 14try { 15 var_dump( strncmp($str1, $str2, $len) ); 16} catch (\ValueError $e) { 17 echo $e->getMessage() . \PHP_EOL; 18} 19 20?> 21--EXPECT-- 22*** Testing strncmp() function: error conditions *** 23strncmp(): Argument #3 ($length) must be greater than or equal to 0 24