3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $public_var = 'public'; private $private_var = 'private'; } $foo = new Foo(); echo 'cast: '; var_dump( (array) $foo ); echo "\n"; echo 'get_object_vars(): '; var_dump( get_object_vars( $foo ) );
Output for git.master, git.master_jit, rfc.property-hooks
cast: array(2) { ["public_var"]=> string(6) "public" ["Fooprivate_var"]=> string(7) "private" } get_object_vars(): array(1) { ["public_var"]=> string(6) "public" }

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