3v4l.org

run code in 300+ PHP versions simultaneously
<?php class WorksIn4And8 { var $int; function __construct($int) { error_log('__construct()'); $this->int = $int; } function WorksIn4And8($int) { error_log('WorksIn4And8()'); $this->__construct($int); } function getInt() { return $this->int; } } $obj = new WorksIn4And8(48); var_dump($obj->getInt());
based on YCCE3

Shows result from various feature-branches currently under review from the php developers. Contact me to have additional branches featured.

Output for branch master
int(48) __construct()
Output for branch master_jit
int(48) __construct()

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