3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(json_decode('{"personalizations": [{"to": [{"email": "test@example.com"}]}],"from": {"email": "test@example.com"},"subject": "Sending with SendGrid is Fun","content": [{"type": "text/plain", "value": "and easy to do anywhere, even with cURL"}]}'));
Output for 7.0.0 - 7.2.6
object(stdClass)#3 (4) { ["personalizations"]=> array(1) { [0]=> object(stdClass)#2 (1) { ["to"]=> array(1) { [0]=> object(stdClass)#1 (1) { ["email"]=> string(16) "test@example.com" } } } } ["from"]=> object(stdClass)#4 (1) { ["email"]=> string(16) "test@example.com" } ["subject"]=> string(28) "Sending with SendGrid is Fun" ["content"]=> array(1) { [0]=> object(stdClass)#5 (2) { ["type"]=> string(10) "text/plain" ["value"]=> string(39) "and easy to do anywhere, even with cURL" } } }
Output for 5.6.0 - 5.6.30, hhvm-3.15.4
object(stdClass)#1 (4) { ["personalizations"]=> array(1) { [0]=> object(stdClass)#2 (1) { ["to"]=> array(1) { [0]=> object(stdClass)#3 (1) { ["email"]=> string(16) "test@example.com" } } } } ["from"]=> object(stdClass)#4 (1) { ["email"]=> string(16) "test@example.com" } ["subject"]=> string(28) "Sending with SendGrid is Fun" ["content"]=> array(1) { [0]=> object(stdClass)#5 (2) { ["type"]=> string(10) "text/plain" ["value"]=> string(39) "and easy to do anywhere, even with cURL" } } }