Just to add to @dearsina answer, another, even simpler solution, is to send the following in the folder property:
$data = ['name' => 'New folder', 'folder' => ['@odata.type' => 'microsoft.graph.folder'], '@microsoft.graph.conflictBehavior' => 'rename'];
As you can see, folder doesn't necessarily has to be empty, it can have the optional '@odata.type' property, thus, you can avoid the whole issue with PHP's default interpretation of an empty array not being associative (i.e an object in json).