3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = ["White", "White Tank", "White Tank Top"]; foreach ($strings as $string) { echo "\n{$string}:"; echo "\n-\t" , substr($string, 1 + (strpos($string, ' ') ?: -1)); $explodeOnce = explode(' ', $string, 2); echo "\n-\t" , end($explodeOnce); echo "\n-\t" , substr(strstr($string, " "), 1); echo "\n-\t" , ltrim(strstr($string, " ")); echo "\n-\t" , preg_replace('~^\S+\s~', '', $string); }
Output for git.master, git.master_jit, rfc.property-hooks
White: - White - White - - - White White Tank: - Tank - Tank - Tank - Tank - Tank White Tank Top: - Tank Top - Tank Top - Tank Top - Tank Top - Tank Top

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:
30.45 ms | 405 KiB | 5 Q