3v4l.org

run code in 300+ PHP versions simultaneously
<?php function camelCase($value){ $studly = ucwords(str_replace(array('-', '_'), ' ', $value)); return str_replace(' ','',lcfirst($studly)); } echo camelCase('ask-simple-answer');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NPVWp
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                                                 'ask-simple-answer'
          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/NPVWp
function name:  camelCase
number of ops:  20
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                                                   !1, $3
    6    10        INIT_FCALL                                               'str_replace'
         11        SEND_VAL                                                 '+'
         12        SEND_VAL                                                 ''
         13        INIT_FCALL                                               'lcfirst'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                         $5      
         16        SEND_VAR                                                 $5
         17        DO_ICALL                                         $6      
         18      > RETURN                                                   $6
    7    19*     > RETURN                                                   null

End of function camelcase

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
187.46 ms | 1398 KiB | 20 Q