3v4l.org

run code in 300+ PHP versions simultaneously
<?php class X { function getHash(){ return "aaa"; } } $a = new X; $b = new X; $c = new X; class ROFL extends SplObjectStorage { function getHash($object){ return $object->getHash(); } } $x = new ROFL(); $x[$a] = $a; $x[$b] = $b; $x[$c] = $c; var_dump($x);
Output for rfc.property-hooks, git.master, git.master_jit
Deprecated: Return type of ROFL::getHash($object) should either be compatible with SplObjectStorage::getHash(object $object): string, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/B1fu6 on line 14 object(ROFL)#4 (1) { ["storage":"SplObjectStorage":private]=> array(1) { [0]=> array(2) { ["obj"]=> object(X)#1 (0) { } ["inf"]=> object(X)#3 (0) { } } } }

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
64.96 ms | 2817 KiB | 4 Q