Well i never worked with put, but interesting.
The line break inside the
"curl -X PUT http://localhost/rest_fruit.php -d fruit=orange -d quantity=4" statement is iritating a bit first i thought: Where is the value for quantity transfered and thought of some magic stuff until i saw it belongs to the same line.