SPL is not initialized before PDO, so inheriting from SPL's runtime exception class gives PDO a broken exception class.
We don't currently have a way to express this kind of "soft" dependency in the build system, so I'm disabling inheriting from the runtime exception for now.
#endif
INIT_CLASS_ENTRY(ce, "PDOException", NULL);
-#if defined(HAVE_SPL) && ((PHP_MAJOR_VERSION > 5) || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 1))
+#if can_handle_soft_dependency_on_SPL && defined(HAVE_SPL) && ((PHP_MAJOR_VERSION > 5) || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 1))
pdo_exception_ce = zend_register_internal_class_ex(&ce, spl_ce_RuntimeException, NULL TSRMLS_CC);
#else
pdo_exception_ce = zend_register_internal_class_ex(&ce, zend_exception_get_default(), NULL TSRMLS_CC);