HTTP_RAW_POST_DATA

$GLOBALS[‘HTTP_RAW_POST_DATA’] works only on < PHP 5.5

        $data = isset($GLOBALS['HTTP_RAW_POST_DATA']) ? json_decode($GLOBALS['HTTP_RAW_POST_DATA']) : null;
        if($data == false){
            $data = file_get_contents('php://input');
            if($data != false){
                $data = json_decode($data, true);
            }
        }