public static function fromBytes(array $bytes)
    {
        $result = null;
        if (count($bytes) === 4) {
            $chunks = array_map(
                function ($byte) {
                    return (is_int($byte) && $byte >= 0 && $byte <= 255) ? (string) $byte : false;
                },
                $bytes
            );
            if (in_array(false, $chunks, true) === false) {
                $result = new static(implode('.', $chunks));
            }
        }

        return $result;
    }
public static function fromBytes(array $bytes)
    {
        $result = null;
        if (count($bytes) === 4) {
            $chunks = array_map(
                function ($byte) {
                    return (is_int($byte) && $byte >= 0 && $byte <= 255) ? (string) $byte : false;
                },
                $bytes
            );
            if (in_array(false, $chunks, true) === false) {
                $result = new static(implode('.', $chunks));
            }
        }

        return $result;
    }
public static function fromBytes ( array $ bytes ) { $ result = null ; if ( count ( $ bytes ) === 4 ) { $ chunks = array_map ( function ( $ byte ) { return ( is_int ( $ byte ) && $ byte >= 0 && $ byte <= 255 ) ? ( string ) $ byte : false ; } , $ bytes ) ; if ( in_array ( false , $ chunks , true ) === false ) { $ result = new static ( implode ( '.' , $ chunks ) ) ; } } return $ result ; }
Parse an array of bytes and returns an IPv4 instance if the array is valid, or null otherwise.

@param int[]|array $bytes

@return static|null
Parse an array of bytes and returns an IPv4 instance if the array is valid or null otherwise .