3v4l.org

run code in 300+ PHP versions simultaneously
<?php $domain['items']['dom'] = 'com.ua'; $is_dot = strrpos($domain['items']['dom'], '.'); $domain_suffix = ($is_dot === FALSE )?$domain['items']['dom']:mb_substr($domain['items']['dom'],$is_dot+1); echo $domain_suffix;

preferences:
42.77 ms | 402 KiB | 5 Q