WP Content

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

WooCommerce Membership Plugins: How to Choose (2026)

WordPress User Management: A Practical Guide (2026)

WordPress Community Plugins: How to Build a Community Site

600,000 WordPress Sites Affected by SQL Injection Vulnerability in Backuply WordPress Plugin

Matt Mullenweg Orders Accessibility Revert, Tells Core Committer to “Contribute Your Talents to Another Project”

7 Best WordPress User Profile Plugins Compared (2026)

How to Add reCAPTCHA to WordPress (v2, v3 or hCaptcha)

The Best Commenting Plugins for WordPress Websites

What’s new for developers? (October 2026)

Wordfence Argus Discovers Critical Vulnerability in Ghostscript, the Program That Turns Uploaded PDFs into Thumbnails ...

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. Introducing Content Tools: your AI assistant can now build and...
  2. What’s new for developers? (October 2026)

Recent

  • WooCommerce Membership Plugins: How to Choose (2026)

    WooCommerce Membership Plugins: How to Choose (2026) wpusermanager.com

  • WordPress User Management: A Practical Guide (2026)

    WordPress User Management: A Practical Guide (2026) wpusermanager.com

  • WordPress Community Plugins: How to Build a Community Site

    WordPress Community Plugins: How to Build a Community Site wpusermanager.com

  • 600,000 WordPress Sites Affected by SQL Injection Vulnerability in Backuply WordPress Plugin

    600,000 WordPress Sites Affected by SQL Injection Vulnerability in Backuply... wordfence.com

  • Matt Mullenweg Orders Accessibility Revert, Tells Core Committer to “Contribute Your Talents to Another Project”

    Matt Mullenweg Orders Accessibility Revert, Tells Core Committer to “Contribute... therepository.email

Recent Comments

  • 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
  • Shams Sumon on How To Fix Your WordPress Memory Exhausted Error- The Easy Way

✉️ 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