3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function post_title_only( $atts ) { $str = get_the_title(); if (strlen($str) <15) { $title_only = 'regular'; } elseif (strlen($str) >= 15) { $title_only = 'posttitleonly'; } return $title_only; } ?>
Output for 4.3.0 - 7.1.0