????JFIF??x?x????'
Server IP : 79.136.114.73 / Your IP : 216.73.216.238 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/self/root/home/b8009/php-5.6.22/ext/mysqli/tests/ |
Upload File : |
--TEST-- mysqli_fetch_object() - calling constructor on class wo constructor --SKIPIF-- <?php require_once('skipif.inc'); require_once('skipifemb.inc'); require_once('skipifconnectfailure.inc'); ?> --FILE-- <?php require_once("connect.inc"); $tmp = NULL; $link = NULL; require('table.inc'); if (!$res = mysqli_query($link, "SELECT id AS ID, label FROM test AS TEST ORDER BY id LIMIT 5")) { printf("[001] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); } class mysqli_fetch_object_test { public $a = null; public $b = null; public function toString() { var_dump($this); } } printf("No exception with PHP:\n"); var_dump($obj = new mysqli_fetch_object_test(1, 2)); printf("\nException with mysqli. Note that at all other places we throws errors but no exceptions unless the error mode has been changed:\n"); try { var_dump($obj = mysqli_fetch_object($res, 'mysqli_fetch_object_test', array(1, 2))); } catch (Exception $e) { printf("Exception: %s\n", $e->getMessage()); } printf("\nFatal error with PHP (but no exception!):\n"); var_dump($obj->mysqli_fetch_object_test(1, 2)); mysqli_close($link); print "done!"; ?> --CLEAN-- <?php require_once("clean_table.inc"); ?> --EXPECTF-- No exception with PHP: object(mysqli_fetch_object_test)#%d (%d) { [%u|b%"a"]=> NULL [%u|b%"b"]=> NULL } Exception with mysqli. Note that at all other places we throws errors but no exceptions unless the error mode has been changed: Exception: Class mysqli_fetch_object_test does not have a constructor hence you cannot use ctor_params Fatal error with PHP (but no exception!): Fatal error: Call to undefined method mysqli_fetch_object_test::mysqli_fetch_object_test() in %s on line %d