3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '{"test-me+for": "X"}'; var_dump(json_encode($string));

preferences:
36.14 ms | 402 KiB | 5 Q