3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump([json_encode(json_decode( '{}', false )), json_encode(array())]);
Output for 8.0.1 - 8.0.30, 8.1.0 - 8.1.29, 8.2.0 - 8.2.20, 8.3.0 - 8.3.8
array(2) { [0]=> string(2) "{}" [1]=> string(2) "[]" }

preferences:
94.28 ms | 402 KiB | 94 Q