3v4l.org

run code in 300+ PHP versions simultaneously
<?php function replace_text($text) { return preg_replace('/`([^`]*)`/', '<code>$1</code>', $text); } $text = 'some words and `some code` and some more words'; echo replace_text($text);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4qZZM
function name:  (null)
number of ops:  6
compiled vars:  !0 = $text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, 'some+words+and+%60some+code%60+and+some+more+words'
    8     1        INIT_FCALL                                               'replace_text'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $2      
          4        ECHO                                                     $2
          5      > RETURN                                                   1

Function replace_text:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4qZZM
function name:  replace_text
number of ops:  8
compiled vars:  !0 = $text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F%60%28%5B%5E%60%5D%2A%29%60%2F'
          3        SEND_VAL                                                 '%3Ccode%3E%241%3C%2Fcode%3E'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $1      
          6      > RETURN                                                   $1
    5     7*     > RETURN                                                   null

End of function replace_text

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.67 ms | 1397 KiB | 16 Q