3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo preg_replace('/\w+(__)\w+/i', '.', 'aluno_pobre__casado__novata'); $patterns = array ('/(19|20)(\d{2})-(\d{1,2})-(\d{1,2})/', '/^\s*{(\w+)}\s*=/'); $replace = array ('\3/\4/\1\2', '$\1 ='); echo preg_replace($patterns, $replace, '{startDate} = 1999-5-27'); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/h94rt
function name:  (null)
number of ops:  15
compiled vars:  !0 = $patterns, !1 = $replace
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'preg_replace'
          1        SEND_VAL                                                 '%2F%5Cw%2B%28__%29%5Cw%2B%2Fi'
          2        SEND_VAL                                                 '.'
          3        SEND_VAL                                                 'aluno_pobre__casado__novata'
          4        DO_ICALL                                         $2      
          5        ECHO                                                     $2
    4     6        ASSIGN                                                   !0, <array>
    6     7        ASSIGN                                                   !1, <array>
    7     8        INIT_FCALL                                               'preg_replace'
          9        SEND_VAR                                                 !0
         10        SEND_VAR                                                 !1
         11        SEND_VAL                                                 '%7BstartDate%7D+%3D+1999-5-27'
         12        DO_ICALL                                         $5      
         13        ECHO                                                     $5
    8    14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
206.55 ms | 1394 KiB | 15 Q