3v4l.org

run code in 300+ PHP versions simultaneously
<?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); }
Output for 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
(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 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 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.3.11, 4.4.0 - 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

preferences:
303.35 ms | 401 KiB | 456 Q