3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a{ public function __toString() { $debug = debug_backtrace(); echo "__toString called on line ".$debug['0']['line']."\n"; return ""; } } function string_param(string $a){ } function object_param(object $a){ echo $a; //here (string)$a; //here $a == "0"; //here string_param($a); //here ?><?= $a; ?><?php //here } $a = new a(); $a == "0"; //here string_param($a); //here object_param($a);
Output for git.master, git.master_jit, rfc.property-hooks
__toString called on line 24 __toString called on line 11 __toString called on line 16 __toString called on line 17 __toString called on line 18 __toString called on line 11 __toString called on line 20

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:
33.57 ms | 478 KiB | 5 Q