Visitar URL original
From PHP to Python - A Straight-to-the-Point Guide
Settings

Reading Settings

Pick the syntax highlighting you like. Everything is saved in your browser, no account needed.

Highlighting Themes

Customize syntax highlighting for Python and PHP code

Theme updated successfully!
Python logo

Python

Light and dark mode themes

Copied
Highlighting...
value = amount.value if amount else 23.22

# Equivalent:
if amount:
    value = amount.value
else:
    value = 23.22
Copied
Highlighting...
value = amount.value if amount else 23.22

# Equivalent:
if amount:
    value = amount.value
else:
    value = 23.22
PHP logo

PHP

Light and dark mode themes

Copied
Highlighting...
$value = $amount ? $amount->getValue() : 23.22;

// Equivalent:
if ($amount) {
    $value = $amount->getValue();
} else {
    $value = 23.22;
}
Copied
Highlighting...
$value = $amount ? $amount->getValue() : 23.22;

// Equivalent:
if ($amount) {
    $value = $amount->getValue();
} else {
    $value = 23.22;
}

Keep these settings everywhere

Your themes are stored in this browser only. Log in and they follow your account from any device, along with the 60 highlighting themes reserved for members.