3v4l.org

run code in 300+ PHP versions simultaneously
<?php class X { private $i; function __construct($i) { $this->i = $i; } function __destruct() { echo "I'm done {$this->i} !\n"; } } function make_x() { new X(); } for ($i = 0; $i < 10; $i++) { echo "Making X $i\n"; make_x($i); }
Output for git.master, git.master_jit, rfc.property-hooks
Making X 0 Fatal error: Uncaught ArgumentCountError: Too few arguments to function X::__construct(), 0 passed in /in/PeVSE on line 9 and exactly 1 expected in /in/PeVSE:5 Stack trace: #0 /in/PeVSE(9): X->__construct() #1 /in/PeVSE(13): make_x(0) #2 {main} thrown in /in/PeVSE on line 5
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:
43.31 ms | 401 KiB | 8 Q