3v4l.org

run code in 300+ PHP versions simultaneously
<?php $site_a['text'] = " wort 1 t&auml;glich wort 2"; preg_match('/<title>(.*?)<\/title>/is', $site_a['text'], $title); if(isset($title[1])) { $title = $title[1]; $title = preg_replace('/[^a-z0-9\.-üßäö]+/', ' ', $title); }else $title = ""; $site = preg_replace('#<script(.*?)>(.*?)</script>#is', '', $site_a['text']); $site = preg_replace('#<style(.*?)>(.*?)</style>#is', '', $site); $site = preg_replace('#<a(.*?)>(.*?)</a>#is', '', $site); $site = preg_replace('#<title(.*?)>(.*?)</title>#is', '', $site); $site = strip_tags($site); $site = preg_replace('/[\?]+\s/', '. ', $site); $site = preg_replace('/[\!]+\s/', '. ', $site); $site = preg_replace('/\s\s+/', ' ', $site); $site = strtolower ( $site ); //$site = html_entity_decode($site, ENT_QUOTES, "UTF-8"); $site = html_entity_decode($site, ENT_QUOTES, "ISO-8859-1"); print_r($site); exit; $site = preg_replace('/[^a-z0-9\.\?-üßäö\s]+/', ' ', $site); $search = array("[", "]", "{", "}", ":"); $text = str_replace($search, "", $site); $text = utf8_encode ($text); $site = explode(". ", $text); if(is_array($site)) foreach ($site AS $key => $satz){ $satz = preg_replace('/[^a-z0-9-üßäö]+\s/', ' ', $satz); $satz = preg_replace('/[^a-z0-9-üßäö\s]+/', '', $satz); $site[$key] = explode(" ", $satz); } $paragraph = array(); if(is_array($site)) foreach ($site AS $key => $satz){ $paragraph[] = array("sentence" => $satz); } $json = array("titel" => $title, "id" => "id", "link" => "link", "context" => array(array("paragraph" => $paragraph)) ); $json = json_encode($json); print_r($json);
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 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.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
wort 1 t�glich wort 2
Output for 4.3.0 - 4.3.1

Process exited with code 139.

preferences:
279.5 ms | 401 KiB | 455 Q