3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $field; function __construct(){ $this->field = new B; } function __debugInfo(){ return ["should only appear in dump"]; } } class B { private $field; function __construct(){ $this->field = new stdclass; } function __debugInfo(){ return ["should only appear in dump"]; } } $not_debug = (array)new A; var_dump($not_debug); var_export($not_debug);
Output for git.master, git.master_jit, rfc.property-hooks
array(1) { ["Afield"]=> object(B)#2 (1) { [0]=> string(26) "should only appear in dump" } } array ( '' . "\0" . 'A' . "\0" . 'field' => \B::__set_state(array( 'field' => (object) array( ), )), )

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:
127.28 ms | 406 KiB | 5 Q