persistent-object.php 355 B

12345678910111213
  1. <?php
  2. require_once __DIR__.'/_executor.php';
  3. require_once __DIR__.'/persistent-object-require.php';
  4. $foo = new MyObject('obj1');
  5. return function () use ($foo) {
  6. echo 'request: ' . $_GET['i'] . "\n";
  7. echo 'class exists: ' . class_exists(MyObject::class) . "\n";
  8. echo 'id: ' . $foo->id . "\n";
  9. echo 'object id: '. spl_object_id($foo);
  10. };