Php strcmp

코드 예제

2
0

php 에서 문자열 비교

//In php to compare two string we can use strcmp() function
Syntax
strcmp(string1,string2);

//If both string is same then it will return 0
<?php
echo strcmp("Hello world!","Hello world!");
?>
1
0

php 비교 문자열

<?php
$var1 = "Hello";
$var2 = "hello";
if (strcmp($var1, $var2) !== 0) {
    echo '$var1 is not equal to $var2 in a case sensitive string comparison';
}
?>
1
0

strcmp php

// This function is used to find whether two strings are same or not.
// Syntax
strcmp(string1,string2);
// It returns
// 0 if string1 and string2 are same
// less than zero if string1 is smaller than string2
// greater than zero if string1 is greater than string2
0
0

strcmp php

strcmp("5", 5) => 0
 

다른 언어로

이 페이지는 다른 언어로되어 있습니다

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................