3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function get_string_between($string, $start, $end){ $string = " ".$string; $ini = strpos($string,$start); if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini; return substr($string,$ini,$len); } $fullstring = "<!--:pt--><em>2011 12 30,&nbsp;</em>uma data; uma mulher desenha na parede o contorno do seu corpo nu para dizer alguma coisa que só percebemos no fim.<!--:--><!--:en--><em><span lang="EN-GB">2011 12 30,</span></em><span class="apple-converted-space"><span lang="EN-GB">&nbsp;</span></span><span lang="EN-GB">a date; a woman draws the outline of her body on a wall to say something we’ll only understand at the very end.</span><!--:-->"; $parsed = get_string_between($fullstring, "<!--:pt-->", "<!--:-->"); echo $parsed;
Output for 5.4.0 - 5.4.27
Parse error: syntax error, unexpected 'EN' (T_STRING) in /in/uiQVd on line 12
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.28
Parse error: syntax error, unexpected T_STRING in /in/uiQVd on line 12
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_STRING in /in/uiQVd on line 12
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/uiQVd on line 12
Process exited with code 255.