3v4l.org

run code in 300+ PHP versions simultaneously
<?php $stxt = "По словам вице-премьера Крыма, единственными законными вооруженными формированиями на территории Крыма являются российские вооруженные силы."; $keywords = ''; $keywords = explode(',',$keywords); $other_text = "...<br> #Новости_0629"; foreach ($keywords as $value) { $other_text.= !empty($value) ? " #" . trim($value) : ''; } $other_text .= "<br> Подробнее: http://www.0629.com.ua/news/489813"; $description_text_lenght = 220 - strlen($other_text); $full_text = mb_substr($stxt, 0, $description_text_lenght) . $other_text; if(!empty($item['icon_photo'])){ $full_text .="<br> <img src='http://s.citysites.ua/section/newsIcon/upload/images/news/icon/93917261-8562-kryim_13941132274.jpg'/><br>"; } var_dump($full_text);

preferences:
42.27 ms | 402 KiB | 5 Q