3v4l.org

run code in 300+ PHP versions simultaneously
<?php class parent1 { public function __construct($param) { var_dump($param); } } class child extends parent1 { public function method() { //而且我在这里直接return居然不生效,代码直接从 //parent::__construct($param);开始执行,也就是说前面的代码没有执行,问题应该就在这里,不理解为什么不执行。 $param = 123; parent::__construct($param); } } (new child(1))->method();
Output for git.master, git.master_jit, rfc.property-hooks
int(1) int(123)

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