3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_REQUEST['token_pre_pop'] = true; $_REQUEST['ids'] = '1000,1002,1004'; //$_REQUEST['ids'] = '1000'; $_REQUEST['ids'] = ''; if (isset($_REQUEST['token_pre_pop'])) { $ids = $_REQUEST['ids']; $ids = explode(",", urldecode($ids)); $ids = "'".implode("','", $ids)."'"; echo $ids; // JSONed }

preferences:
51.57 ms | 402 KiB | 5 Q