3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tests = [ 'getADogThenROCKInTheUSA', 'SomeOfTheWords', 'getADog', 'ADog', 'aDog', 'XML', 'SimpleXMLReader', 'FREE4NOW', '123ABC', 'DEF456', 'ghi789', 'wtf666Omg', 'PHP8Point3', ]; foreach ($tests as $test) { printf("%25s => %s\n", $test, strtolower(preg_replace('/(?>[A-Z]?[a-z]+|[A-Z]+(?=[A-Z][a-z]|[^A-Za-z])|[^A-Za-z]+)\K(?!$)/', '-', $test))); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 17
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 17
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/KsCnb
function name:  (null)
number of ops:  19
compiled vars:  !0 = $tests, !1 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   19     1      > FE_RESET_R                                       $3      !0, ->17
          2    > > FE_FETCH_R                                               $3, !1, ->17
   20     3    >   INIT_FCALL                                               'printf'
          4        SEND_VAL                                                 '%2525s+%3D%3E+%25s%0A'
          5        SEND_VAR                                                 !1
          6        INIT_FCALL                                               'strtolower'
          7        INIT_FCALL                                               'preg_replace'
          8        SEND_VAL                                                 '%2F%28%3F%3E%5BA-Z%5D%3F%5Ba-z%5D%2B%7C%5BA-Z%5D%2B%28%3F%3D%5BA-Z%5D%5Ba-z%5D%7C%5B%5EA-Za-z%5D%29%7C%5B%5EA-Za-z%5D%2B%29%5CK%28%3F%21%24%29%2F'
          9        SEND_VAL                                                 '-'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $4      
         12        SEND_VAR                                                 $4
         13        DO_ICALL                                         $5      
         14        SEND_VAR                                                 $5
         15        DO_ICALL                                                 
   19    16      > JMP                                                      ->2
         17    >   FE_FREE                                                  $3
   21    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
193.87 ms | 1012 KiB | 16 Q