3v4l.org

run code in 300+ PHP versions simultaneously
<?php $host = "https://chat.stackoverflow.com/rooms/11/php/"; $currentDomain = preg_replace('(^.+\.(?=[^.]+\.[^.]+$))', '', $host); echo $currentDomain;

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
211.86 ms | 2026 KiB | 11 Q