• Skip to primary navigation
  • Skip to content
  • Skip to footer
Hidden Hat Press Hidden Hat Press
  • Python for PHP Programmers
  • Articles

    Python for PHP Programmers

    Dancers. Photo by Hulki Okan Tabak on Unsplash - (cropped and decolorized)

    Python for PHP

    Core code and essential practices

    • Articles
      • Python for PHP Programmers
      • News\Misc
      • Foundations
      • Tools
      • Design

    Reading and writing files with Python

    Python for PHP Programmers

    How to read and write files in Python from a PHP coder’s perspective

    Encoding and Decoding JSON in Python

    Python for PHP Programmers

    Like PHP, Python provides built-in support for encoding and decoding JSON data. We cover the fundamentals in this article.

    Testing for variable existence in Pyt...

    Python for PHP Programmers

    PHP offers isset() to test for the existence of variables and elements. A look at some equivalent tools that Python provides.

    Basic type checking in Python

    Python for PHP Programmers

    Learn how to use Python’s type() and isinstance() functions, the Pythonic counterparts to PHP’s gettype() and instanceof.

    Pick a card - random numbers in Python

    Python for PHP Programmers

    A look at Python’s random module – how it differs from PHP’s rand() and what it adds.

    Multiline strings in Python

    Python for PHP Programmers

    PHP supports multiline strings with the heredoc text syntax. We take a look at a commonly used Python equivalent.

    Iffing and elsing in Python

    Python for PHP Programmers

    Most programs of any complexity must change their behaviour according to circumstances. Conditional statements are among the principle tools for the job.

    Defining functions in Python

    Python for PHP Programmers

    Accepting and processing raw materials, rendering back useful products, functions are the magic machines at the heart of your programs.

    Working with Python variables

    Python for PHP Programmers

    At the core of coding is the ability to change data and behaviour. For that you need to define variables and assign data to them.

    The print() function and string forma...

    Python for PHP Programmers

    You have to start with “Hello, World”, and that means printing it. We begin the project by digging in to Python’s print function.

    Why PHP coders should learn Python too

    Python for PHP Programmers

    Languages are not tribes. Diversify to improve your skills and earning power.

    • Mastodon
    • Bluesky
    • Feed
    © 2025 Hidden Hat Press. Powered by Jekyll & Minimal Mistakes.