3v4l.org

run code in 300+ PHP versions simultaneously
<?php $address = "House No. 1234-ABC, Second Floor, XYZ Building, ABC Mall Road, Street Number 1234, ABC Area"; $address_length = strlen($address); if ($address_length > 80) { $parts = explode(',', $address); list($address1, $address2) = array_map(function($x) { return trim(implode(',', $x)); }, array_chunk($parts, 3)); echo $address1; echo PHP_EOL; echo $address2; }
Output for git.master, git.master_jit, rfc.property-hooks
House No. 1234-ABC, Second Floor, XYZ Building ABC Mall Road, Street Number 1234, ABC Area

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
50.31 ms | 405 KiB | 5 Q