3v4l.org

run code in 300+ PHP versions simultaneously
<?php $contents_request = "http://en.wikipedia.org/w/api.php?format=json&action=parse&page=Enter%20Sandman"; $contents_response = file_get_contents($contents_request); $contents_jsonobj = json_decode($contents_response); $key = key($contents_jsonobj->parse->text); $wikitext = $contents_jsonobj->parse->text->$key; $wiki_html = str_replace("<a href=\"/","<a target=\"_blank\" href=\"http://en.wikipedia.org/", $wikitext); $toc = strpos("toc", $wiki_html); echo $toc; ?>

preferences:
39.62 ms | 402 KiB | 5 Q