3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $params = ['form_params' => ['azaz' => 1]]; if (!isset( $params['multipart'], $params['json'], $params['body'], $params['form_params'] )) { $params = ['form_params' => $params]; } var_dump($params); // if (!isset($params[RequestOptions::MULTIPART]) && // !isset($params[RequestOptions::JSON]) && // !isset($params[RequestOptions::BODY]) && // !isset($params[RequestOptions::FORM_PARAMS]) // ) { // $params = [RequestOptions::FORM_PARAMS => $params]; // }
Output for 7.3.0alpha1
array(1) { ["form_params"]=> array(1) { ["form_params"]=> array(1) { ["azaz"]=> int(1) } } }