3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = []; $s = microtime(true); for ($i = 0; $i < 1000000; $i++) $name = isset($input['name']) ? $input['name']:'John'; var_dump(microtime(true)-$s); $s = microtime(true); for ($i = 0; $i < 1000000; $i++) $name = $input['name'] ?? 'John'; var_dump(microtime(true)-$s);

preferences:
31.85 ms | 402 KiB | 5 Q