1--TEST-- 2Test strncasecmp() function: usage variations - single quoted strings 3--FILE-- 4<?php 5/* Test strncasecmp() function with various single quoted strings for 'str1', 'str2' */ 6 7echo "*** Test strncasecmp() function: with single quoted strings ***\n"; 8$strings = array( 9 'Hello, World', 10 'hello, world', 11 'HELLO, WORLD', 12 'Hello, World\n' 13); 14/* loop through to compare each string with the other string */ 15$count = 1; 16for($index1 = 0; $index1 < count($strings); $index1++) { 17 echo "-- Iteration $count --\n"; 18 for($index2 = 0; $index2 < count($strings); $index2++) { 19 var_dump( strncasecmp( $strings[$index1], $strings[$index2], (strlen($strings[$index1]) + 1) ) ); 20 } 21 $count ++; 22} 23echo "*** Done ***\n"; 24?> 25--EXPECTREGEX-- 26\*\*\* Test strncasecmp\(\) function: with single quoted strings \*\*\* 27-- Iteration 1 -- 28int\(0\) 29int\(0\) 30int\(0\) 31int\(-[1-9][0-9]*\) 32-- Iteration 2 -- 33int\(0\) 34int\(0\) 35int\(0\) 36int\(-[1-9][0-9]*\) 37-- Iteration 3 -- 38int\(0\) 39int\(0\) 40int\(0\) 41int\(-[1-9][0-9]*\) 42-- Iteration 4 -- 43int\([1-9][0-9]*\) 44int\([1-9][0-9]*\) 45int\([1-9][0-9]*\) 46int\(0\) 47\*\*\* Done \*\*\* 48