3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Model { protected $attributes = []; public function __set($key, $value) { echo 'called magic method: ', var_export([$key => $value], true), \PHP_EOL; } } $model = new \Model(); $model->attributes = 'foo'; var_dump($model);
Output for git.master, git.master_jit, rfc.property-hooks
called magic method: array ( 'attributes' => 'foo', ) object(Model)#1 (1) { ["attributes":protected]=> 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:
96.89 ms | 405 KiB | 5 Q