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 q8gPN

Shows result from various feature-branches currently under review from the php developers. Contact me to have additional branches featured.

Output for branch php-master
nobody
Output for branch php-master+opcache
nobody
Output for branch php-master+jit
nobody
Output for Typed properties v2
nobody
Output for Arrow functions
nobody
Output for Object typehint
nobody
Output for Array change keys
nobody
Output for Lexical anon
nobody

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page