3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface IStatus { const STATUS_ACTIVE = 1; const STATUS_PENDING = 2; const STATUS_REMOVED = 4; } interface IAction { const ACTION_CREATE = 1; const ACTION_UPDATE = 2; } class A implements IStatus { public static function getStatusConstants() { return (new ReflectionClass(IStatus::class))->getConstants(); } public static function getActionConstants() { return (new ReflectionClass(IAction::class))->getConstants(); } } var_dump(A::getStatusConstants()); var_dump(A::getActionConstants());
Output for rfc.property-hooks, git.master, git.master_jit
array(3) { ["STATUS_ACTIVE"]=> int(1) ["STATUS_PENDING"]=> int(2) ["STATUS_REMOVED"]=> int(4) } array(2) { ["ACTION_CREATE"]=> int(1) ["ACTION_UPDATE"]=> int(2) }

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:
41.48 ms | 1672 KiB | 4 Q