Error in PHP documentation


#1

Hello everyone,
I found a problem with the PHP example at page http://wiki.dreamfactory.com/DreamFactory/Tutorials/PHP_Custom_scripting_service_math

I’m using Chrome and I see the object definition for “Result” var as
$result = [‘resource’ => [‘add’, ‘subtract’, ‘multiply’, ‘divide’]];
instead of
$result = [‘resource’ => [‘add’, ‘subtract’, ‘multiply’, ‘divide’]];

This is a problem for all beginners that copy&paste the code without investigation.


#2

To add to this reply, the tutorial currently displays the HTML entity for the double arrow operator (=> is displayed as

 => 
).
e.g, the tutorial shows:
 $result = ['result' => ($n1 + $n2)]; 

and in code this should be:

 $result = ['result' => ($n1 + $n2)]; 

#3

Apologies and thanks for catching that! We’ll fix in the docs.