3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace MyProject\ClassB; class B { public $something; public function __construct() { $this->something = "Some (dynamic) string value"; } public function getStr() { echo $this->something; } } namespace MyProject\ClassA; use \MyProject\ClassB\B as B; class A { private $privateVariable; public function __construct() { $b = new B(); $this->privateVariable = $b->something; $b->getStr(); } } namespace MyProject\Something; use \MyProject\ClassA\A as A; $a = new A();
Output for git.master, git.master_jit, rfc.property-hooks
Some (dynamic) string value

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