3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { const A_1 = 1; const A_2 = 2; public function test() { $refl = new ReflectionClass($this); var_dump($refl->getConstants()); } } class ab extends a { const B_1 = 'b1'; } $a = new a(); $a->test(); $b = new ab(); $b->test();
Output for git.master, git.master_jit, rfc.property-hooks
array(2) { ["A_1"]=> int(1) ["A_2"]=> int(2) } array(3) { ["B_1"]=> string(2) "b1" ["A_1"]=> int(1) ["A_2"]=> 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:
32.33 ms | 401 KiB | 8 Q