chore: add tests regarding persistent objects

This commit is contained in:
Kévin Dunglas
2022-10-05 15:44:02 +02:00
parent d61c96a4c3
commit 4a87ad3609
5 changed files with 42 additions and 0 deletions

13
testdata/persistent-object.php vendored Normal file
View File

@@ -0,0 +1,13 @@
<?php
require_once __DIR__.'/_executor.php';
require_once __DIR__.'/persistent-object-require.php';
$foo = new MyObject('obj1');
return function () use ($foo) {
echo 'request: ' . $_GET['i'] . "\n";
echo 'class exists: ' . class_exists(MyObject::class) . "\n";
echo 'id: ' . $foo->id . "\n";
echo 'object id: '. spl_object_id($foo);
};