Created
March 4, 2021 21:33
-
-
Save tim-cotten/d3b6662feb4b7445ec5aa768597c7bd5 to your computer and use it in GitHub Desktop.
PHP Bugs: Confusing Non-Objects for Objects (Example D: Order Structure)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Order structure example | |
Order Object | |
( | |
[id] => 44274002 | |
[delivery_date] => 2021–03–05 | |
[delivery_location_type] => Home | |
[occasion] => Just Because | |
[fulfillment_type] => 3 | |
[fulfillment_location] => 12 | |
[product] => Product Object | |
( | |
[id] => 5232009 | |
[type] => 4 | |
[name] => Candy Hearts (5 lbs) | |
[price] =>; 29.99 | |
) | |
[customer] => Customer Object | |
( | |
[email] => tim@cotten.io | |
[name_first] => Tim | |
[name_last] => Cotten | |
[address] => 123 Somewhere | |
[city] => Washington | |
[state] => DC | |
[postalcode] => 20008 | |
[country] => US | |
[phone] => 555-555-5555 | |
) | |
[recipient] => Recipient Object | |
( | |
[name_first] => Amy | |
[name_last] => Cotten | |
[address_1] => 123 Somewhere | |
[city] => Washington | |
[state] => DC | |
[postalcode] => 20008 | |
[country] => US | |
[phone] => 555-867-5309 | |
) | |
[fees] => Array | |
( | |
[taxes] => 1.95 | |
[fee_ship_ground] => 10.00 | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment