3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php #echo "Hello, World!"; $stt = "<p><em>(Formerly SCS 1346 The Writer&rsquo;s Handbook)</em></p> <p>Good grammar is the bedrock of good writing. Designed for native or near-native speakers of English, this course will help you improve your skills in grammar and punctuation, whether you write for personal satisfaction or as part of your job. We&rsquo;ll review the basics of grammar and usage so you can write with more confidence, coherence and energy. Exercises and writing assignments will help you master the techniques of clear, correct and effective writing.</p>"; echo substr(strip_tags(stringClean($stt)),0,160) . '...'; function htmlClean( $html, $allowTags = '<p><a><strong><ul><ol><li><em><i>' ) { $html = str_replace(array ('<![CDATA[', ']]>'), '', utf8_encode($html)); $html = htmlspecialchars_decode($html, ENT_QUOTES); $html = html_entity_decode($html, ENT_QUOTES, 'UTF-8'); $html = str_replace('&apos;', '\'', $html); $html = str_replace('&nbsp;', ' ', $html); $html = strip_tags($html, $allowTags); $html = preg_replace('/(<p><\/p>|<p>\s<\/p>|<p>&nbsp;<\/p>)/im', '', $html); $html = trim($html); return preg_replace("/<([b-z][a-z0-9]*)[^>]*?(\/?)>/im", '<$1$2>', $html); } function stringClean( $str ) { $str = htmlspecialchars_decode($str, ENT_QUOTES); $str = html_entity_decode($str, ENT_QUOTES, 'UTF-8'); $str = str_replace('&apos;', '\'', $str); $str = str_replace('&nbsp;', ' ', $str); return trim($str); }
based on PldJD
Output for 5.1.0 - 7.2.0
(Formerly SCS 1346 The Writer’s Handbook) Good grammar is the bedrock of good writing. Designed for native or near-native speakers of English, this course wi...
Output for 5.0.0 - 5.0.5
Fatal error: Call to undefined function htmlspecialchars_decode() in /in/UHsES on line 32
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: htmlspecialchars_decode() in /in/UHsES on line 32
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: htmlspecialchars_decode() in /in/UHsES on line 32
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: htmlspecialchars_decode() in /in/UHsES on line 32