https://www.vultr.com

The Everywhere Cloud

Deploy an instance.
Accelerate your application.


Replacing split() with preg_split() in PHP


After upgrading PHP, some scripts such as those used in old Drupal systems may report the fatal error "undefined function split()" due to the function's deprecation and removal. Simply replace it with preg_split() to solve the problem.

==========

1. Find the split() function.

split($pattern, $subject);

2. Convert it to the preg_match() function as shown.

preg_split("/".$pattern."/", $subject);

==========

Comments


Getting paid internationally?
Choose Payoneer.


Get started with DigitalOcean SSD Virtual Servers  Email Newsletters & Email Marketing by YMLP.com

Popular posts from this blog

Enabling HTTPS in Home Assistant

Running Home Assistant on FreeBSD Servers

Configuring the FreeBSD Firewall with IPFW