3v4l.org

run code in 500+ PHP versions simultaneously
<?php $a="a / b"; $a=preg_replace('/\//','\\',$a); echo "First version: {$a}\n"; $a=preg_replace('/\//','\\\\',$a); echo "Second version: {$a}\n"; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/C361B
function name:  (null)
number of ops:  16
compiled vars:  !0 = $a
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, 'a+%2F+b'
    3     1        FRAMELESS_ICALL_3                preg_replace        ~2      '%2F%5C%2F%2F', '%5C'
          2        OP_DATA                                                      !0
          3        ASSIGN                                                       !0, ~2
    4     4        ROPE_INIT                                         3  ~5      'First+version%3A+'
          5        ROPE_ADD                                          1  ~5      ~5, !0
          6        ROPE_END                                          2  ~4      ~5, '%0A'
          7        ECHO                                                         ~4
    5     8        FRAMELESS_ICALL_3                preg_replace        ~7      '%2F%5C%2F%2F', '%5C%5C'
          9        OP_DATA                                                      !0
         10        ASSIGN                                                       !0, ~7
    6    11        ROPE_INIT                                         3  ~10     'Second+version%3A+'
         12        ROPE_ADD                                          1  ~10     ~10, !0
         13        ROPE_END                                          2  ~9      ~10, '%0A'
         14        ECHO                                                         ~9
    7    15      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
154.03 ms | 2301 KiB | 13 Q