3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace App\Modules\Product\Transformer { use App\Modules\Product\Models\ResourceModel; class ResourceTransformer { public function transform(ResourceModel $model) { } } class ColorTransformer extends ResourceTransformer { } } namespace App\Modules\Product\Models { class ResourceModel { } class ColorModel extends ResourceModel { } } namespace { $colorTransformer = new \App\Modules\Product\Transformer\ColorTransformer; $colorModel = new App\Modules\Product\Models\ColorModel; $colorTransformer->transform($colorModel); var_dump($colorModel); var_dump($colorTransformer); }
Output for git.master, git.master_jit, rfc.property-hooks
object(App\Modules\Product\Models\ColorModel)#2 (0) { } object(App\Modules\Product\Transformer\ColorTransformer)#1 (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:
179.04 ms | 405 KiB | 5 Q