3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Something extends \SplFileObject { public function __toString() { return 'calling __toString'; } } $file = sys_get_temp_dir() . 'foo.php'; touch($file); $something = new Something($file); echo $something; // 'calling __toString' echo (string) $something; // 'test.php' echo $something->__toString(); // 'calling __toString'
Output for git.master, git.master_jit, rfc.property-hooks
Warning: touch(): open_basedir restriction in effect. File(/tmpfoo.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/uRene on line 10 Fatal error: Uncaught RuntimeException: SplFileObject::__construct(): open_basedir restriction in effect. File(/tmpfoo.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/uRene:12 Stack trace: #0 /in/uRene(12): SplFileObject->__construct('/tmpfoo.php') #1 {main} thrown in /in/uRene on line 12
Process exited with code 255.

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:
38.65 ms | 402 KiB | 8 Q