mirror of
https://github.com/dunglas/frankenphp.git
synced 2025-12-24 13:38:11 +08:00
chore: add tests regarding persistent objects
This commit is contained in:
13
testdata/persistent-object.php
vendored
Normal file
13
testdata/persistent-object.php
vendored
Normal 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);
|
||||
};
|
||||
Reference in New Issue
Block a user