How can I pass a PHP object created during my initial page load, to an ajax call?
create-page.php creates my page and has an object expensiveObject. I need to pass expensiveObject to ajax-some-stuff.php.
Option 1: Should I json_encode() the object, attach it to my URL, grab that part of my URL with javascript, and send it back to a PHP ajax?
Option 2: Can I store it as a $_SESSION variable?
$expensiveObject->someFunction().