3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { } $ref = new ReflectionClass('A'); var_dump(method_exists($ref, 'getDocComment')); //bool(true) var_dump($ref->getDocComment()); //bool(false) // serialize only the class name $refClass = unserialize(serialize($ref)); try { $refClass->getDocComment(); } catch (Error $e) { echo "Malformed Reflection object: ".$e->getMessage(); }
Output for git.master, git.master_jit, rfc.property-hooks
bool(true) bool(false) Fatal error: Uncaught Exception: Serialization of 'ReflectionClass' is not allowed in /in/SliR1:8 Stack trace: #0 /in/SliR1(8): serialize(Object(ReflectionClass)) #1 {main} thrown in /in/SliR1 on line 8
Process exited with code 255.

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:
175.25 ms | 405 KiB | 5 Q