Warning: stream_socket_client(): php_network_getaddresses: getaddrinfo failed: System error in /home/mathieu/www/rodic-wp/wordpress-20160713/wp-includes/class-wp-http-streams.php on line 150

Warning: stream_socket_client(): unable to connect to ssl://rodic.fr:443 (php_network_getaddresses: getaddrinfo failed: System error) in /home/mathieu/www/rodic-wp/wordpress-20160713/wp-includes/class-wp-http-streams.php on line 150
August 2014 – Mathieu Rodic

Convert an object to an array in PHP

PHP_Logo

What? The function introduced below alows you to recursively convert an object to an array. See also: Convert an array to an object in PHP The code function object_to_array($variable){ if (is_object($variable)){ $array = array(); foreach ($variable as $key=>$value){ $array[$key] = object_to_array($value); } return $array; } else{ return $variable; } }


Warning: Unknown: open(/var/lib/php5/sessions/sess_2c4ag6qa1068qm8njcqfaa3cq4, O_RDWR) failed: Permission denied (13) in Unknown on line 0

Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php5/sessions) in Unknown on line 0