fork(3) download
  1. <?php
  2. $regex = '~(?<=[a-zA-Z])(?=[A-Z])~';
  3. echo strtolower(preg_replace($regex,"-","HelloWorldThisIsATest"));
Success #stdin #stdout 0.01s 20568KB
stdin
Standard input is empty
stdout
hello-world-this-is-a-test