3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tests = [ 'LocalBusiness' => 'Local Business', 'CivicStructureBuilding' => 'Civic Structure Building', 'getUserMobilePhoneNumber' => 'Get User Mobile Phone Number', 'bandGuitar1' => 'Band Guitar 1', 'band2Guitar123' => 'Band 2 Guitar 123', 'CustomerIDWithSomeOtherJETWords' => 'Customer ID With Some Other JET Words', 'noOneIsMightierThanI' => 'No One Is Mightier Than I', 'USAIsNumber14' => 'USA Is Number 14', '99LuftBallons' => '99 Luft Ballons', 'fillOutYour403EForm' => 'Fill Out Your 403 E Form', 'ABC123IsEasyAs' => 'ABC 123 Is Easy As', ]; foreach ($tests AS $input => $expected) { $output = preg_replace(array('/(?<=[^A-Z])([A-Z])/', '/(?<=[^0-9])([0-9])/'), ' $0', $input); $output = ucwords($output); echo $output .' : '. ($output == $expected ? 'PASSED' : 'FAILED') . PHP_EOL; }
Output for git.master_jit, git.master, rfc.property-hooks
Local Business : PASSED Civic Structure Building : PASSED Get User Mobile Phone Number : PASSED Band Guitar 1 : PASSED Band 2 Guitar 123 : PASSED Customer IDWith Some Other JETWords : FAILED No One Is Mightier Than I : PASSED USAIs Number 14 : FAILED 99 Luft Ballons : PASSED Fill Out Your 403 EForm : FAILED ABC 123 Is Easy As : PASSED

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:
97.94 ms | 406 KiB | 5 Q