- strcmp: documentation ( source)
<?php
$v1 = 5;
$v2 = '5-4';
echo (strcmp($v1,$v2) === 0 ? 'they are the same' : 'they aren\'t the same');
echo "\n";
echo ($v1 == $v2 ? 'they are the same' : 'they aren\'t the same');
echo "\n";
echo ($v1 === $v2 ? 'they are the same' : 'they aren\'t the same');