3v4l.org

run code in 300+ PHP versions simultaneously
<?php $phrase = "The key is now set to :key"; $key = ":key"; $var = "if > $1000"; $re = "/(.+?)(" . $key . ")(.*)/"; $subst = "\1'" . $var . "'\3"; echo preg_replace($re, $subst, $phrase);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fHLj6
function name:  (null)
number of ops:  16
compiled vars:  !0 = $phrase, !1 = $key, !2 = $var, !3 = $re, !4 = $subst
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'The+key+is+now+set+to+%3Akey'
    4     1        ASSIGN                                                   !1, '%3Akey'
    5     2        ASSIGN                                                   !2, 'if+%3E+%241000'
    7     3        CONCAT                                           ~8      '%2F%28.%2B%3F%29%28', !1
          4        CONCAT                                           ~9      ~8, '%29%28.%2A%29%2F'
          5        ASSIGN                                                   !3, ~9
    8     6        CONCAT                                           ~11     '%01%27', !2
          7        CONCAT                                           ~12     ~11, '%27%03'
          8        ASSIGN                                                   !4, ~12
    9     9        INIT_FCALL                                               'preg_replace'
         10        SEND_VAR                                                 !3
         11        SEND_VAR                                                 !4
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $14     
         14        ECHO                                                     $14
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.69 ms | 1394 KiB | 15 Q