3v4l.org

run code in 300+ PHP versions simultaneously
<?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.1.6, 5.2.0 - 5.2.17, 5.3.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.3.11, 4.4.0 - 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.

preferences:
219.39 ms | 1395 KiB | 117 Q