3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $isUserAuthorized = true; $siteAddress = 'sute.ru/'; class a { function getSources(){ return array('1'); } function getLink(){ return 'link'; } function getTitle(){ return 'title'; } } $art = new a; if ($isUserAuthorized && $art->getSources()|count > 0){ $color = "#999999"; } else { $color = ""; } $link = "<a href='{$siteAddress}{$art->getLink()}' style='color: $color'>{$art->getTitle()}</a>"; echo $link;
based on AYZgs
Output for 7.2.0 - 7.3.1
Warning: Use of undefined constant count - assumed 'count' (this will throw an Error in a future version of PHP) in /in/se50g on line 17 <a href='sute.ru/link' style='color: #999999'>title</a>
Output for 5.6.0 - 7.1.25
Notice: Use of undefined constant count - assumed 'count' in /in/se50g on line 17 <a href='sute.ru/link' style='color: #999999'>title</a>