Tagged articles
7 articles
Page 1 of 1
Open Source Tech Hub
Open Source Tech Hub
Mar 4, 2025 · Backend Development

Unlock Python Power in PHP with phpy: New Features and Practical Examples

This article introduces phpy, an open‑source bridge that lets PHP import and execute Python packages, and walks through its latest features such as the with‑syntax, socket handle conversion, exception propagation, slicing, enum definition, annotated functions, and environment variable handling with concrete code samples.

InteropPythonSocket
0 likes · 8 min read
Unlock Python Power in PHP with phpy: New Features and Practical Examples
Open Source Tech Hub
Open Source Tech Hub
Jan 20, 2024 · Artificial Intelligence

How to Set Up ModelScope with Anaconda and Run OCR Inference via PHP

This guide walks through installing Anaconda, creating a Python 3.10 conda environment, adding PyTorch and ModelScope libraries, installing domain-specific dependencies, verifying NLP pipelines, and using PHPY to call ModelScope's OCR model from PHP, complete with code snippets and troubleshooting tips.

AI inferenceAnacondaModelScope
0 likes · 10 min read
How to Set Up ModelScope with Anaconda and Run OCR Inference via PHP
Python Programming Learning Circle
Python Programming Learning Circle
Dec 15, 2023 · Backend Development

phpy v2 – A High‑Performance PHP‑Python Bridge: Architecture, Usage, and Benchmarks

The article introduces the second version of phpy, a PHP extension that embeds a Python interpreter, explains its dual‑VM runtime architecture, shows how to use it under PHP‑FPM, presents detailed performance benchmarks, covers exception handling, IDE auto‑completion, compilation options, dynamic‑library troubleshooting, and provides numerous code examples for testing and scientific computing.

BackendExtensionIntegration
0 likes · 12 min read
phpy v2 – A High‑Performance PHP‑Python Bridge: Architecture, Usage, and Benchmarks
Open Source Tech Hub
Open Source Tech Hub
Dec 6, 2023 · Backend Development

How to Install and Use PHPY: Bridge PHP with Python Libraries on Ubuntu

This guide walks you through installing PHPY on Ubuntu, covering the required environment setup, building PHP 8.3 from source, installing Anaconda and a Python 3.10 environment, compiling the PHPY extension, configuring php.ini, verifying the installation, and running a sample script that accesses Python's os module from PHP.

InstallationPHPPython
0 likes · 13 min read
How to Install and Use PHPY: Bridge PHP with Python Libraries on Ubuntu
21CTO
21CTO
Dec 4, 2023 · Backend Development

Unlock Python in PHP: Install and Use the phpy Extension

This article introduces phpy, a PHP‑Python bridge library from Swoole, explains its purpose of filling gaps in the PHP ecosystem, provides step‑by‑step compilation and installation instructions, and demonstrates how to call Python packages, handle callbacks, and build GUI or AI applications from PHP code.

ExtensionInteropPHP
0 likes · 12 min read
Unlock Python in PHP: Install and Use the phpy Extension