@ 2015-11-10T09:41:18Z <?php
class foo {
function returnArray(){
return [0,1];
}
function returnThis(){
return $this;
}
}
$obj = new foo();
var_dump(isset($obj->returnArray()[1]));
var_dump(isset($obj->returnThis()->returnArray()[1]));
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 7.0.0 - 7.0.20 , 7.1.0 - 7.1.20 , 7.2.0 - 7.2.33 , 7.3.16 - 7.3.33 , 7.4.0 - 7.4.33 , 8.0.0 - 8.0.30 , 8.1.0 - 8.1.28 , 8.2.0 - 8.2.18 , 8.3.0 - 8.3.6 bool(true)
bool(true)
Output for 5.5.24 - 5.5.35 , 5.6.8 - 5.6.28 Fatal error: Cannot use isset() on the result of a function call (you can use "null !== func()" instead) in /in/M78P4 on line 14
Process exited with code 255 . preferences:dark mode live preview
140.29 ms | 402 KiB | 183 Q