3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tests = [ 'foo', 'fooBar', 'foo123', '123Foo', 'fooBar123', 'foo123Bar', '123FooBar', ]; var_export( preg_replace( '/(?:\d++|[A-Za-z]?[a-z]++)\K(?!$)/', '-', $tests ) );
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => 'foo', 1 => 'foo-Bar', 2 => 'foo-123', 3 => '123-Foo', 4 => 'foo-Bar-123', 5 => 'foo-123-Bar', 6 => '123-Foo-Bar', )

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