3v4l.org

run code in 300+ PHP versions simultaneously
<?php $v1 = 5; $v2 = '5-4'; $time = microtime(1); $i = 0; while($i++ < 1000000) donull((strcmp($v1,$v2) === 0)); echo (microtime(1)-$time)." seconds for strcmp"; echo "\n"; $time = microtime(1); $i = 0; while($i++ < 1000000) donull(((string) $v1 == (string) $v2)); echo (microtime(1)-$time)." seconds for typecasting"; function donull($v){};

preferences:
31.69 ms | 402 KiB | 5 Q