3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Bar { // protected $compat_fields = array(); public function __construct() { } } class Foo extends Bar { public function __construct() { parent::__construct(); if ( $this->compat_fields && is_array( $this->compat_fields ) ) { array_push( $this->compat_fields, 'all_items' ); } $this->all_items = array(); } } $foo = new Foo(); var_dump( $foo->all_items );
Output for git.master_jit, git.master, rfc.property-hooks
Warning: Undefined property: Foo::$compat_fields in /in/8djK8 on line 15 Deprecated: Creation of dynamic property Foo::$all_items is deprecated in /in/8djK8 on line 19 array(0) { }

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