3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = array('a' => '"i'); $y = json_encode($x); $z = str_replace($y, '\"', 'x'); var_dump($y);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Xbo1a
function name:  (null)
number of ops:  15
compiled vars:  !0 = $x, !1 = $y, !2 = $z
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'json_encode'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !1, $4
    5     5        INIT_FCALL                                               'str_replace'
          6        SEND_VAR                                                 !1
          7        SEND_VAL                                                 '%5C%22'
          8        SEND_VAL                                                 'x'
          9        DO_ICALL                                         $6      
         10        ASSIGN                                                   !2, $6
    6    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
188.39 ms | 1394 KiB | 19 Q