updated connectInterceptor in line with PHP's StackInterceptor and updated examples