3v4l.org

run code in 500+ PHP versions simultaneously
<?php $camelTests = [ 'hereIsOne', 'andAnother', 'tryAThirdOne', 'kebab-case', 'getUuid', 'getUUID', 'snake_case', 'mysteryMethod1', 'printIf0Or1', 'itsAMeWario', 'acronymOMGInMiddle', 'DELIMITED_CONSTANT', 'a1AndA2', 'a1andA2', 'StudlyCase', 'FLOTUS', 'makePlanC', '4Life', 'wakeInTheAM', 'code1B35F2', '42', 'aB1c1De' ]; foreach ($camelTests as $test) { printf( "%s%s\n", str_pad($test, 20), preg_match('/^[a-z]+(?:[A-Z](?:[A-Z]?[a-z]+|\d+|$)|\d+)*$/', $test) ? 'PASS' : 'FAIL' ); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 18
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 18
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/vmSIn
function name:  (null)
number of ops:  20
compiled vars:  !0 = $camelTests, !1 = $test
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   28     1      > FE_RESET_R                                           $3      !0, ->18
          2    > > FE_FETCH_R                                                   $3, !1, ->18
   29     3    >   INIT_FCALL                                                   'printf'
   30     4        SEND_VAL                                                     '%25s%25s%0A'
   31     5        INIT_FCALL                                                   'str_pad'
          6        SEND_VAR                                                     !1
          7        SEND_VAL                                                     20
          8        DO_ICALL                                             $4      
          9        SEND_VAR                                                     $4
   32    10        FRAMELESS_ICALL_2                preg_match          ~5      '%2F%5E%5Ba-z%5D%2B%28%3F%3A%5BA-Z%5D%28%3F%3A%5BA-Z%5D%3F%5Ba-z%5D%2B%7C%5Cd%2B%7C%24%29%7C%5Cd%2B%29%2A%24%2F', !1
         11      > JMPZ                                                         ~5, ->14
         12    >   QM_ASSIGN                                            ~6      'PASS'
         13      > JMP                                                          ->15
         14    >   QM_ASSIGN                                            ~6      'FAIL'
         15    >   SEND_VAL                                                     ~6
   29    16        DO_ICALL                                                     
   28    17      > JMP                                                          ->2
         18    >   FE_FREE                                                      $3
   34    19      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
193.73 ms | 1797 KiB | 15 Q