3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $var1 = ""; $var2 = ""; $var3 = "x"; $list = ""; $list = ($var1 == "")?('Var 1 Empty'):(""); echo "List:".$list.$var1."\n"; $list = ($list.$var2 == "")?('Var 2 Empty'):(""); echo "List:".$list.$var2."\n"; $list = ($list.$var3 == "")?('Var 3 Empty'):(""); echo "List:".$list.$var3."\n"; ?>
based on n9gKf
Output for 5.3.22 - 7.2.11
List:Var 1 Empty List: List:x