3v4l.org

run code in 300+ PHP versions simultaneously
<?php class N { private $val; public function __construct($val) { $this->value = $val; } function __tostring() { return $this->value; } } var_dump((int) new N());

preferences:
57.65 ms | 402 KiB | 5 Q