3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test='lalala "foo bar" lalala'; $test = preg_replace_callback( '#"([^"]+)"#si', function ($match) { return stripslashes(str_replace(' ', '*', $match[0])); }, $test ); echo $test;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/i5peq
function name:  (null)
number of ops:  10
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'lalala+%22foo+bar%22+lalala'
    5     1        INIT_FCALL                                               'preg_replace_callback'
    6     2        SEND_VAL                                                 '%23%22%28%5B%5E%22%5D%2B%29%22%23si'
    7     3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fi5peq%3A7%240'
    9     4        SEND_VAL                                                 ~2
   10     5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $3      
    5     7        ASSIGN                                                   !0, $3
   13     8        ECHO                                                     !0
          9      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2Fi5peq%3A7%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/i5peq
function name:  {closure}
number of ops:  12
compiled vars:  !0 = $match
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        INIT_FCALL                                               'stripslashes'
          2        INIT_FCALL                                               'str_replace'
          3        SEND_VAL                                                 '+'
          4        SEND_VAL                                                 '%2A'
          5        FETCH_DIM_R                                      ~1      !0, 0
          6        SEND_VAL                                                 ~1
          7        DO_ICALL                                         $2      
          8        SEND_VAR                                                 $2
          9        DO_ICALL                                         $3      
         10      > RETURN                                                   $3
    9    11*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fi5peq%3A7%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
189.17 ms | 1400 KiB | 19 Q