3v4l.org

run code in 300+ PHP versions simultaneously
<?php $entry = <<<ENTRY Bob 1 https://www.example.com#Anchor Joe 2 joe@exAmple.com Sam 3 http://examPle.org Ian 4 www.Example.net Öna 5 eXample.info Eve 6 Heart_in_a_Blender ENTRY; $entry = preg_replace_callback( '/\S+/', function($m) { if (!filter_var($m[0], FILTER_VALIDATE_URL)) { $m[0] = mb_strtolower($m[0], "UTF-8"); } return $m[0]; }, $entry ); echo $entry;

preferences:
31.62 ms | 406 KiB | 5 Q