3v4l.org

run code in 300+ PHP versions simultaneously
<?php function ip_clean(string $ip) : ?string { return implode( '.', array_map( function ($el) { return (int) $el; }, explode('.', $ip) ) ); } echo ip_clean('195.194.213.096'), PHP_EOL;

preferences:
10.23 ms | 410 KiB | 5 Q