<?php
class A
{
private function __construct()
{
throw new Exception('thrown');
}
public function A()
{
return array('a', 'b', 'c');
}
public static function I()
{
return new A();
}
}
$instance = A::I();
$A = call_user_func_array('A::A', array());
print $A[1];
Fatal error: Uncaught Exception: thrown in /in/UGIZE:7
Stack trace:
#0 /in/UGIZE(17): A->__construct()
#1 /in/UGIZE(21): A::I()
#2 {main}
thrown in /in/UGIZE on line 7
Process exited with code 255.
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Fatal error: Uncaught Exception: thrown in /in/UGIZE:7
Stack trace:
#0 /in/UGIZE(17): A->__construct()
#1 /in/UGIZE(21): A::I()
#2 {main}
thrown in /in/UGIZE on line 7
Process exited with code 255.
Output for 5.5.24 - 5.5.35, 5.6.8 - 5.6.28
Fatal error: Uncaught exception 'Exception' with message 'thrown' in /in/UGIZE:7
Stack trace:
#0 /in/UGIZE(17): A->__construct()
#1 /in/UGIZE(21): A::I()
#2 {main}
thrown in /in/UGIZE on line 7
Process exited with code 255.