WP Content

  • Business
  • Community
  • Development
  • Plugins
  • Security
  • Tutorials
  • Login
Trending now

How to Build a WordPress Membership Site with Elementor

WordPress Email Verification for New User Signups

PSA: Critical Apache HTTP/2 Vulnerability: What WordPress Site Owners Should Know

Kinsta now protects every WordPress site it hosts with Patchstack

WordPress 7.2 Beta 5 Resolves Known PHP 8.6 Issues, Adds Application Password Email Alerts

Per-Seat Pricing for WordPress Memberships, Explained

Automattic Launches Spacefast, a Platform for AI-Built Sites and Apps on WordPress.com’s Infrastructure

WordPress 7.2’s Secrets API Faces Pushback as Hosts Are Asked to Test It Before RC1

10 Best WordPress Security Plugins in 2026 (And How to Stack Them)

WooCommerce 11.3.0: Release notes

Transpiling PHP code from 8.0 to 7.x via Rector blog.logrocket.com

2
Leonardo Losoviz 6 years ago in Development 0

There is no need to wait for WordPress to bump its minimum PHP version to start using features from PHP 7.4 and 8.0 for our themes and plugins.

There is a tool for PHP, called Rector, which enables to transpile PHP code, similar to how Babel compiles JS to make it compatible with older browsers.

So we can use modern features (such as union types, typed properties, and arrow functions), and deploy it to PHP 7.1.

This article introduces the topic of transpiling in PHP.

  • Facebook
  • Twitter
  • Pinterest
voters
  • Leonardo Losoviz
  • Jun-E Tan
Report Article

Related Articles

  1. WordPress 7.2 Beta 5 Resolves Known PHP 8.6 Issues, Adds...
  2. The Secrets API in WordPress 7.2

Recent

  • How to Build a WordPress Membership Site with Elementor

    How to Build a WordPress Membership Site with Elementor wpusermanager.com

  • PSA: Critical Apache HTTP/2 Vulnerability: What WordPress Site Owners Should Know

    PSA: Critical Apache HTTP/2 Vulnerability: What WordPress Site Owners Should... wordfence.com

  • Kinsta now protects every WordPress site it hosts with Patchstack

    Kinsta now protects every WordPress site it hosts with Patchstack patchstack.com

  • WordPress 7.2 Beta 5 Resolves Known PHP 8.6 Issues, Adds Application Password Email Alerts

    WordPress 7.2 Beta 5 Resolves Known PHP 8.6 Issues, Adds... therepository.email

  • Per-Seat Pricing for WordPress Memberships, Explained

    Per-Seat Pricing for WordPress Memberships, Explained profilepress.com

Recent Comments

  • Kishor on Krom Automation Pro: Visual WordPress Workflow Automation Without Monthly Fees
  • Sanjay Joshi on How to Remove WordPress Sidebar On Any Website In a Minute – UnlimitedWP
  • ShadRabbir on How to Migrate Your WordPress Site to Another Host Without Losing Any Data
  • YayCommerce on How to Migrate Your WordPress Site to Another Host Without Losing Any Data
  • Golam Mostafa on How to Offload Your Media Files in WordPress

✉️ Get the most popular articles in your inbox every week!

WP Content

WordPress news and articles from the WordPress community.

Proudly powered by WordPress.
Hosted with SpinupWP.

Discover
  • Business
  • Community
  • Development
  • Editorials
  • Plugins
  • Security
  • Tutorials
WP Content
  • Submit Article
  • Recent Articles
  • Newsletter
  • RSS Feed
  • About
  • Contact
Projects
  • FlipWP
  • Intagrate
  • WP User Manager

© 2026 WP Content. All rights reserved.
  • Terms
  • Privacy
Login Register

Login

Login with Facebook Login with Twitter Lost Password

Register

Login with Facebook Login with Twitter Lost Password