3v4l.org

run code in 300+ PHP versions simultaneously
<?php function camelCase($value){ return $studly = ucwords(str_replace(array('-', '_'), ' ', $value)); return str_replace(' ','',lcfirst($studly)); } echo camelCase('question-is-too-simple');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JULqp
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'camelcase'
          1        SEND_VAL                                                 'question-is-too-simple'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function camelcase:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JULqp
function name:  camelCase
number of ops:  21
compiled vars:  !0 = $value, !1 = $studly
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'ucwords'
          2        INIT_FCALL                                               'str_replace'
          3        SEND_VAL                                                 <array>
          4        SEND_VAL                                                 '+'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $2      
          7        SEND_VAR                                                 $2
          8        DO_ICALL                                         $3      
          9        ASSIGN                                           ~4      !1, $3
         10      > RETURN                                                   ~4
    6    11*       INIT_FCALL                                               'str_replace'
         12*       SEND_VAL                                                 '+'
         13*       SEND_VAL                                                 ''
         14*       INIT_FCALL                                               'lcfirst'
         15*       SEND_VAR                                                 !1
         16*       DO_ICALL                                         $5      
         17*       SEND_VAR                                                 $5
         18*       DO_ICALL                                         $6      
         19*       RETURN                                                   $6
    7    20*     > RETURN                                                   null

End of function camelcase

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156 ms | 1397 KiB | 20 Q