<?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);
You have javascript disabled. You will not be able to edit any code.