I am used to writing C# Windows applications. However, I have some free hosted PHP webspace that I would like to make use of. I have a basic understanding of PHP but have never used its object-oriented capabilities.
Is there an easy way to convert C# classes to PHP classes or is it just not possible to write a fully object-oriented application in PHP?
Update: There is no reliance on the .NET framework beyond the basics. The main aim would be to restructure the class properties, variable enums, etc. The PHP will be hosted on a Linux server.
To convert temperatures in degrees Fahrenheit to Celsius, subtract 32 and multiply by .5556 (or 5/9).
The formula used to convert Fahrenheit to Celsius is C = (F - 32) * (5 / 9). The formula for converting Celsius to Fahrenheit is F = (C * 9 / 5) + 32.
Answer: 40° Celsius is equal to 104° Fahrenheit. Let's look into the conversion between Celsius and Fahrenheit scales in detail.
To convert Fahrenheit to celsius, the formula used is °C = 5/9(°F – 32). Using Fahrenheit to Celsius formula (F to C formula), the temperature in Fahrenheit can easily be converted into Celsius.
PHP doesn't support enums, which might be one area of mismatch.
Also, watch out for collection types, PHP despite it's OO features, tends to have no alternative to over-using the array datatype. Check out the sections on the PHP manual on iterators if you would like to see beyond this.
Public, protected, private, and static properties of classes all work roughly as expected.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With