3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; /** * RSS2 Feed Template for displaying RSS2 Posts feed. * * @package WordPress * TARATUR */ function getLastCategory ($allcategories) { $catArray = explode("\n",$allcategories); $lastCat = $catArray[count($catArray)-2]; return $lastCat; } function transliterate($textCyrillic){ $cyr = array( 'а' ,'б' ,'в' ,'г' ,'д' ,'ѓ' ,'е' ,'ж' ,'з' ,'ѕ' ,'и' ,'ј' ,'к' ,'л' ,'љ' ,'м' ,'н' ,'њ' ,'о' ,'п' ,'р' ,'с' ,'т' ,'ќ' ,'у' ,'ф' ,'х' ,'ц' ,'ч' ,'џ' ,'ш' , 'А' ,'Б' ,'В' ,'Г' ,'Д' ,'Ѓ' ,'Е' ,'Ж' ,'З' ,'Ѕ' ,'И' ,'Ј' ,'К' ,'Л' ,'Љ' ,'М' ,'Н' ,'Њ' ,'О' ,'П' ,'Р' ,'С' ,'Т' ,'Ќ' ,'У' ,'Ф' ,'Х' ,'Ц' ,'Ч' ,'Џ' ,'Ш','„','”','–','…','Р','“'); $lat = array( 'a' ,'b' ,'v' ,'g' ,'d' ,'gj' ,'e' ,'zh' ,'z' ,'dz' ,'i' ,'j' ,'k' ,'l' ,'lj' ,'m' ,'n' ,'nj' ,'o' ,'p' ,'r' ,'s' ,'t' ,'kj' ,'u' ,'f' ,'h' ,'c' ,'ch' ,'dz', 'sh' , 'A' ,'B' ,'V' ,'G' ,'D' ,'Gj' ,'E' ,'Zh' ,'Z' ,'Dz' ,'I' ,'J' ,'K' ,'L' ,'Lj' ,'M' ,'N' ,'Nj' ,'O' ,'P' ,'R' ,'S' ,'T' ,'Kj' ,'U' ,'F' ,'H' ,'C' ,'Ch' ,'Dz', 'Sh' ,'"','"','-','...','R','"'); // Р… Рё РЏ СЃРµ исти return str_replace($cyr, $lat, $textCyrillic); } $smsContent = transliterate(strip_tags($content)); $smsContent = str_replace(array("\r\n", "\n", "\r"), ' ', $smsContent); $smsContent = str_replace("&nbsp;", ' ', $smsContent); $smsContent = str_replace("\xc2\xa0", ' ', $smsContent); $smsContent = preg_replace('!\s+!', ' ', $smsContent); $smsContent = substr($smsContent, 0, 300); $smsContent = substr($smsContent,0,strrpos($smsContent," ")); $smsContent = preg_replace('/[^\00-\255]+/u', '', $smsContent); ?> <SMStext><?php echo $smsContent; ?></SMStext>
based on vAc41
Output for 7.0.0 - 7.3.0beta1
Fatal error: Uncaught Error: Call to undefined function get_option() in /in/IAiGZ:3 Stack trace: #0 {main} thrown in /in/IAiGZ on line 3
Process exited with code 255.
Output for hhvm-3.12.14 - 3.17.3
Fatal error: Uncaught Error: Call to undefined function get_option() in /in/IAiGZ:3 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Fatal error: Call to undefined function get_option() in /in/IAiGZ on line 3
Process exited with code 255.