3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo preg_replace("/(?!^)(?=[A-Z])/", "_", "FooBarAoo"); echo strtolower(preg_replace('/([A-Z])/', '_$1', lcfirst($str)));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Cqtch
function name:  (null)
number of ops:  19
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'preg_replace'
          1        SEND_VAL                                                 '%2F%28%3F%21%5E%29%28%3F%3D%5BA-Z%5D%29%2F'
          2        SEND_VAL                                                 '_'
          3        SEND_VAL                                                 'FooBarAoo'
          4        DO_ICALL                                         $1      
          5        ECHO                                                     $1
    4     6        INIT_FCALL                                               'strtolower'
          7        INIT_FCALL                                               'preg_replace'
          8        SEND_VAL                                                 '%2F%28%5BA-Z%5D%29%2F'
          9        SEND_VAL                                                 '_%241'
         10        INIT_FCALL                                               'lcfirst'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $2      
         13        SEND_VAR                                                 $2
         14        DO_ICALL                                         $3      
         15        SEND_VAR                                                 $3
         16        DO_ICALL                                         $4      
         17        ECHO                                                     $4
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.73 ms | 1394 KiB | 19 Q