PHP Peso to USD Converter: Real-Time Exchange Rate & Calculator

Sandra Jun 29, 2026

PHP Peso to USD Conversion

In the dynamic world of international finance, currency conversion is a crucial process. If you're dealing with PHP (Philippine Pesos) and USD (United States Dollars), you're in the right place. This guide will walk you through the process of PHP peso to USD conversion using PHP, the popular server-side scripting language.

Convert Dominican Pesos (DOP) and United States Dollars (USD): Currency Exchange Rate Conversion Calculator
Convert Dominican Pesos (DOP) and United States Dollars (USD): Currency Exchange Rate Conversion Calculator

Understanding PHP Peso to USD Conversion

Argentinischer Peso to US-Dollar Conversion | ARS to USD Exchange Rate Calculator | Markets Insider
Argentinischer Peso to US-Dollar Conversion | ARS to USD Exchange Rate Calculator | Markets Insider

Before diving into the code, let's understand the basics. The exchange rate between PHP and USD fluctuates daily. As of writing, 1 USD is approximately 50 PHP. However, this rate can change, so it's essential to use an up-to-date exchange rate for accurate conversions.

Using PHP's built-in functions

Pocket-Sized Currency Conversion Chart for Travellers
Pocket-Sized Currency Conversion Chart for Travellers

PHP provides built-in functions that can simplify currency conversion. The `number_format` function can help format numbers with decimal places and thousand separators, while `round` can round numbers to a specified precision.

Converting PHP to USD

OnlineConversions.org | Unit Converter, Currency Converter & BMI Calculator
OnlineConversions.org | Unit Converter, Currency Converter & BMI Calculator

To convert PHP to USD, you'll need the current exchange rate. You can either hardcode the rate or fetch it from an API. For this example, let's hardcode the rate and update it periodically.

Here's a simple PHP function that converts PHP to USD:

```php function phpToUsd($phpAmount, $exchangeRate = 0.02) { $usdAmount = $phpAmount * $exchangeRate; return number_format($usdAmount, 2); } ```

Using the function

the korean currency has been changed to include different types of money, and it is also used
the korean currency has been changed to include different types of money, and it is also used

Now, you can use this function to convert PHP to USD. Here's an example:

```php $phpAmount = 10000; $usdAmount = phpToUsd($phpAmount); echo "{$phpAmount} PHP is equal to {$usdAmount} USD."; ```

Converting USD to PHP

Converting USD to PHP is just as easy. You'll use the reciprocal of the exchange rate. Here's a function that does that:

Travel tip for Mexico 🇲🇽💵

The local currency is the Mexican Peso (MXN), but USD is widely accepted in many tourist areas.

One important ATM tip:
If you’re asked to “Convert to your home currency?” always select “Decline Conversion.”

Why?
Because accepting the ATM’s conversion usually gives you a much worse exchange rate. Let your bank handle the conversion instead.

A small travel tip that can save you money throughout your trip ✈️ Mexican Peso, Save Your Money, The Locals, Travel Tips, The Selection, Let It Be, Travelling Tips
Travel tip for Mexico 🇲🇽💵 The local currency is the Mexican Peso (MXN), but USD is widely accepted in many tourist areas. One important ATM tip: If you’re asked to “Convert to your home currency?” always select “Decline Conversion.” Why? Because accepting the ATM’s conversion usually gives you a much worse exchange rate. Let your bank handle the conversion instead. A small travel tip that can save you money throughout your trip ✈️ Mexican Peso, Save Your Money, The Locals, Travel Tips, The Selection, Let It Be, Travelling Tips

```php function usdToPhp($usdAmount, $exchangeRate = 50) { $phpAmount = $usdAmount * $exchangeRate; return number_format($phpAmount, 2); } ```

Using the function

Here's how you can use this function:

a table that shows the average hours for different types of people in each hour period
a table that shows the average hours for different types of people in each hour period
Pounds Chart, Pounds To Kg Chart, Ounces To Pounds Chart, Cardio Conversion Chart, Weight Conversion Chart Pdf, Kg To Lbs Chart, Weight Conversion Chart Lbs To Kg, Weight Chart In Kilograms, Gemstone Weight Chart Mm
Pounds Chart, Pounds To Kg Chart, Ounces To Pounds Chart, Cardio Conversion Chart, Weight Conversion Chart Pdf, Kg To Lbs Chart, Weight Conversion Chart Lbs To Kg, Weight Chart In Kilograms, Gemstone Weight Chart Mm
How to Convert Minutes for Payroll (+ Conversion Chart)
How to Convert Minutes for Payroll (+ Conversion Chart)
5400 Feet to CM Conversion
5400 Feet to CM Conversion
a poster with numbers and times to print on the back of it, in blue water
a poster with numbers and times to print on the back of it, in blue water
the words cm to inches i centimeters to inches conversion are written in white on a pink background
the words cm to inches i centimeters to inches conversion are written in white on a pink background
an image of a chart with numbers and names
an image of a chart with numbers and names
27.99 USD to EUR exchange rate - How much is US Dollar in Euro?
27.99 USD to EUR exchange rate - How much is US Dollar in Euro?
Dollar to Mexican Peso - USD to MXN - American Dollar to Mexican Peso Exchange Rate -  Convert Dollars to Mexican Pesos
Dollar to Mexican Peso - USD to MXN - American Dollar to Mexican Peso Exchange Rate - Convert Dollars to Mexican Pesos
Currency Conversion Worksheets
Currency Conversion Worksheets
13 cm to inches conversion
13 cm to inches conversion
Civil - Basic unit conversion table | Facebook
Civil - Basic unit conversion table | Facebook
80 kg to lbs conversion
80 kg to lbs conversion
Units Calculators & Converters
Units Calculators & Converters
UNITED STATES DOLLARS to MEXICAN PESOS Exchange Rate and Conversion Table [1 USD = 17.5042 MXN] updated 2026-06-27 10:00:15 GMT (customizable)
UNITED STATES DOLLARS to MEXICAN PESOS Exchange Rate and Conversion Table [1 USD = 17.5042 MXN] updated 2026-06-27 10:00:15 GMT (customizable)
180 lbs to kg conversion
180 lbs to kg conversion
the back cover of a brochure for payment in progress
the back cover of a brochure for payment in progress
a table with numbers and times for the kingdoms to pounds conversion chart on it
a table with numbers and times for the kingdoms to pounds conversion chart on it
kg to lbs | convert kg to pounds
kg to lbs | convert kg to pounds
Kilograms to Stones/ Pounds conversion chart ... - Later Life Training
Kilograms to Stones/ Pounds conversion chart ... - Later Life Training

```php $usdAmount = 100; $phpAmount = usdToPhp($usdAmount); echo "{$usdAmount} USD is equal to {$phpAmount} PHP."; ```

Fetching exchange rates dynamically

Hardcoding exchange rates can lead to inaccuracies. A better approach is to fetch exchange rates dynamically from an API. Services like ExchangeRate-API provide up-to-date exchange rates.

To use an API, you'll need to make an HTTP request. PHP provides several functions for this, such as file_get_contents and curl. Once you have the response, you can parse it to extract the exchange rate.

Conclusion

Converting PHP to USD and vice versa is a straightforward process in PHP. Whether you're building a finance application or just need to perform occasional conversions, these functions should help. Always remember to use up-to-date exchange rates for accurate conversions.