3v4l.org

run code in 500+ PHP versions simultaneously
<?php //$dom = new DOMDocument(); // //$file = file_get_contents(__DIR__ . '/test.xml'); //$dom->loadXML($file, LIBXML_NOWARNING); // //$xpath = new DOMXPath($dom); //$xpath->registerNamespace('soap', 'http://schemas.xmlsoap.org/soap/envelope/'); //$result = $xpath->query('//soap:Body/*')->item(0); // //file_put_contents(__DIR__ . '/update2.xml', $dom->saveXML($result)); $input = "test 124 gdfjg hdfg df"; echo str_replace(['124', 'gdfgdfg'], '', $input);
Output for 8.2.31 - 8.2.33, 8.3.0 - 8.3.33, 8.4.1 - 8.4.24, 8.5.0 - 8.5.9
test gdfjg hdfg df

preferences:
42.97 ms | 779 KiB | 4 Q