3v4l.org

run code in 300+ PHP versions simultaneously
<?php function camelCase($string) { preg_replace('/[^a-zA-Z0-9]/', '', ucwords(str_replace('/',' ',strtolower($path)))); return $string; } echo camelCase('common/home'); echo camelCase('common_home');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fl36a
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'camelcase'
          1        SEND_VAL                                                 'common%2Fhome'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
    9     4        INIT_FCALL                                               'camelcase'
          5        SEND_VAL                                                 'common_home'
          6        DO_FCALL                                      0  $1      
          7        ECHO                                                     $1
          8      > RETURN                                                   1

Function camelcase:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fl36a
function name:  camelCase
number of ops:  19
compiled vars:  !0 = $string, !1 = $path
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F%5B%5Ea-zA-Z0-9%5D%2F'
          3        SEND_VAL                                                 ''
          4        INIT_FCALL                                               'ucwords'
          5        INIT_FCALL                                               'str_replace'
          6        SEND_VAL                                                 '%2F'
          7        SEND_VAL                                                 '+'
          8        INIT_FCALL                                               'strtolower'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $2      
         11        SEND_VAR                                                 $2
         12        DO_ICALL                                         $3      
         13        SEND_VAR                                                 $3
         14        DO_ICALL                                         $4      
         15        SEND_VAR                                                 $4
         16        DO_ICALL                                                 
    5    17      > RETURN                                                   !0
    6    18*     > RETURN                                                   null

End of function camelcase

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.21 ms | 1398 KiB | 23 Q