php - Guzzle argument with [] fail to recognize as array -


in example of oficial documentation of guzzle:

$request = $client->createrequest('put', 'http://httpbin.org/put', ['body' => 'testing...']); 

but:

"argument 3 passed guzzlehttp\client::request() must of type array, string given"

php version: php 5.5.9-1ubuntu4.9 (cli)

is version of php or code lack of something?

looks argument 3 must array try

$request = $client->createrequest('put', 'http://httpbin.org/put', array('body' => 'testing...')); 

read more here arrays , structuring


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -