3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C implements JsonSerializable { var $a = 'lol'; var $b = 'fa'; public function jsonSerialize() { $aux = clone($this); return $aux; unset($aux->a); return $aux; } } echo json_encode(new C());
Output for git.master
Deprecated: Return type of C::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/5TARd on line 7 Fatal error: Out of memory (allocated 29360128 bytes) (tried to allocate 20480 bytes) in /in/5TARd on line 8 mmap() failed: [12] Cannot allocate memory mmap() failed: [12] Cannot allocate memory
Process exited with code 255.
Output for git.master_jit
Deprecated: Return type of C::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/5TARd on line 7 Fatal error: Out of memory (allocated 14680064 bytes) (tried to allocate 4096 bytes) in /in/5TARd on line 8 mmap() failed: [12] Cannot allocate memory mmap() failed: [12] Cannot allocate memory
Process exited with code 255.
Output for rfc.property-hooks
Deprecated: Return type of C::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/5TARd on line 7
Process exited with code 139.

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:
44.3 ms | 401 KiB | 8 Q