3v4l.org

run code in 300+ PHP versions simultaneously
<?php $maches='{Promotional SMS Credits: 0, Transactional SMS Credits: 9973}'; $matches=preg_replace("/(\w+)?/", '"\1":',$matches); print_r($matches); echo "\n"; $matches=preg_replace("/(\w*)/", '"\1":',$matches); print_r($matches);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iP0IE
function name:  (null)
number of ops:  21
compiled vars:  !0 = $maches, !1 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7BPromotional+SMS+Credits%3A+0%2C+Transactional+SMS+Credits%3A+9973%7D'
    9     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F%28%5Cw%2B%29%3F%2F'
          3        SEND_VAL                                                 '%22%5C1%22%3A'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $3      
          6        ASSIGN                                                   !1, $3
   10     7        INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
   11    10        ECHO                                                     '%0A'
   12    11        INIT_FCALL                                               'preg_replace'
         12        SEND_VAL                                                 '%2F%28%5Cw%2A%29%2F'
         13        SEND_VAL                                                 '%22%5C1%22%3A'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                         $6      
         16        ASSIGN                                                   !1, $6
   13    17        INIT_FCALL                                               'print_r'
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.62 ms | 1386 KiB | 17 Q