3v4l.org

run code in 300+ PHP versions simultaneously
<?php class xxyy { } class xx { function __constructor() { return new xxyy(); } } $x= new xx(); $y= xx->__construct(); echo print_r($x); echo print_r($y);

preferences:
36.41 ms | 402 KiB | 5 Q