3v4l.org

run code in 200+ PHP versions simultaneously
<?php // 获取user参数的值(如果为空,则用'nobody') $username = $_GET['user'] ?: 'nobody'; // 等价于: $username = isset($_GET['user']) ? $_GET['user'] : 'nobody'; echo $username;
based on g9ZPt
Output for 5.5.24 - 7.4.0
Notice: Undefined index: user in /in/q8gPN on line 4 nobody