3v4l.org

run code in 300+ 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 = 21
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 21
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 17
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/vmSIn
function name:  (null)
number of ops:  23
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, ->21
          2    > > FE_FETCH_R                                               $3, !1, ->21
   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        INIT_FCALL                                               'preg_match'
         11        SEND_VAL                                                 '%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'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $5      
         14      > JMPZ                                                     $5, ->17
         15    >   QM_ASSIGN                                        ~6      'PASS'
         16      > JMP                                                      ->18
         17    >   QM_ASSIGN                                        ~6      'FAIL'
         18    >   SEND_VAL                                                 ~6
   29    19        DO_ICALL                                                 
   28    20      > JMP                                                      ->2
         21    >   FE_FREE                                                  $3
   34    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.72 ms | 1007 KiB | 16 Q