3v4l.org

run code in 300+ PHP versions simultaneously
<?php $int = random_int(0, 100_000_000); $string = (string) $int; $start = microtime(true); for ($i = 0; $i < 10_000_000; $i++) { $bool = $int == $string; } echo microtime(true) - $start . "s\n"; $int = random_int(0, 100_000_000); $string = (string) $int; $start = microtime(true); for ($i = 0; $i < 10_000_000; $i++) { $bool = $int === $string; } echo microtime(true) - $start . "s\n";

preferences:
16.84 ms | 405 KiB | 5 Q