3v4l.org

run code in 300+ PHP versions simultaneously
<?php $option = 'maxFileSize'; preg_match_all( '#((?:^|[A-Z])[a-z]+)#', $option, $matches ); if ( isset( $matches[1] ) && strlen( strtolower( implode( '_', $matches[1] ) ) ) >= strlen( $option ) ) { $option = strtolower( implode( '_', $matches[1] ) ); } var_dump( $option );
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 8, Position 2 = 20
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 30
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
Branch analysis from position: 20
filename:       /in/7hbSL
function name:  (null)
number of ops:  34
compiled vars:  !0 = $option, !1 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'maxFileSize'
    4     1        INIT_FCALL                                               'preg_match_all'
          2        SEND_VAL                                                 '%23%28%28%3F%3A%5E%7C%5BA-Z%5D%29%5Ba-z%5D%2B%29%23'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                                 
    6     6        ISSET_ISEMPTY_DIM_OBJ                         0  ~4      !1, 1
          7      > JMPZ_EX                                          ~4      ~4, ->20
          8    >   INIT_FCALL                                               'strtolower'
          9        INIT_FCALL                                               'implode'
         10        SEND_VAL                                                 '_'
         11        FETCH_DIM_R                                      ~5      !1, 1
         12        SEND_VAL                                                 ~5
         13        DO_ICALL                                         $6      
         14        SEND_VAR                                                 $6
         15        DO_ICALL                                         $7      
         16        STRLEN                                           ~8      $7
         17        STRLEN                                           ~9      !0
         18        IS_SMALLER_OR_EQUAL                              ~10     ~9, ~8
         19        BOOL                                             ~4      ~10
         20    > > JMPZ                                                     ~4, ->30
    8    21    >   INIT_FCALL                                               'strtolower'
         22        INIT_FCALL                                               'implode'
         23        SEND_VAL                                                 '_'
         24        FETCH_DIM_R                                      ~11     !1, 1
         25        SEND_VAL                                                 ~11
         26        DO_ICALL                                         $12     
         27        SEND_VAR                                                 $12
         28        DO_ICALL                                         $13     
         29        ASSIGN                                                   !0, $13
   11    30    >   INIT_FCALL                                               'var_dump'
         31        SEND_VAR                                                 !0
         32        DO_ICALL                                                 
         33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.69 ms | 1396 KiB | 21 Q