It's very common to convert from Python to PHP, but many new Python users struggle to reconcile the differences. Please talk about the ways that Python is different or better than PHP and some common situations a new Python user might face.
I think that Python and PHP are in a way similar but they also have their major differences. Python and PHP can both be used for many different things entirely and just how the codes run are different entirely. You can make a calculator with Python easily but making one with PHP may prove to be more of a challenge.I think that Python and PHP are in a way similar but they also have their major differences. Python and PHP can both be used for many different things entirely and just how the codes run are different entirely. You can make a calculator with Python easily but making one with PHP may prove to be more of a challenge.
I always comment out the brackets in Python because I am more familiar with PHP.They are quit similar check out the loops in both languages for a rough idea.
Python loop
[code]
array = ['one', 'two', 'three']
for value in array:
#{
print value
#}
[/code]
and a PHP loop
[code]
$array = ['one', 'two', 'three'];
foreach ($array as $value)
{
print $value;
}
[/code]
I always comment out the brackets in Python because I am more familiar with PHP.
Jadster
Are you sure you want to delete this post?