3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $x = array('a' => '"i'); $y = json_encode($x); $z = str_replace($y, '\"', 'x'); var_dump($y);
based on 9tDjR
Output for 5.6.0 - 7.3.0beta1
string(11) "{"a":"\"i"}"