3v4l.org

run code in 300+ PHP versions simultaneously
<?php function camelCase($string) { preg_replace('/(?:^|_)(.?)/e',"strtoupper('$1')",$string); 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/gn8X2
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/gn8X2
function name:  camelCase
number of ops:  8
compiled vars:  !0 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F%28%3F%3A%5E%7C_%29%28.%3F%29%2Fe'
          3        SEND_VAL                                                 'strtoupper%28%27%241%27%29'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
    5     6      > RETURN                                                   !0
    6     7*     > RETURN                                                   null

End of function camelcase

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.99 ms | 1397 KiB | 17 Q